https://github.com/snkrheadz/omise-webhook
This is a simple Sinatra app created for Omise Webhook local test with ngrok.
https://github.com/snkrheadz/omise-webhook
omise-webhook ruby sinatra
Last synced: 4 months ago
JSON representation
This is a simple Sinatra app created for Omise Webhook local test with ngrok.
- Host: GitHub
- URL: https://github.com/snkrheadz/omise-webhook
- Owner: snkrheadz
- Created: 2017-01-20T15:30:17.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-01T01:21:10.000Z (over 3 years ago)
- Last Synced: 2025-04-04T00:11:58.891Z (about 1 year ago)
- Topics: omise-webhook, ruby, sinatra
- Language: Ruby
- Size: 8.79 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Omise Webhook app
This is a simple Sinatra app created for Omise Webhook local test with ngrok.
## Requirements
- ruby : version 2.3.1
- bundler
- ngrok
- Omise Ruby Client
- Omise Test Secret Key
- .env
## Getting started
1: Install bundler if you haven't installed it yet.
```shell
gem install bundler
```
2: Install gem file.
```shell
bundle install --path vendor/bundle
```
3: Install [ngrok](https://ngrok.com/) over homebrew
```shell
brew cask install ngrok
```
4: Create `.env` file and edit with your omise test secret key, you can get your test secret key from
```
OMISE_TEST_SECRET_KEY=skey_test_xxxREPLACE_THIS_KEY_WITH_YOURS
```
## Start application
Start Sinatra app with command below.
```shell
bundle exec ruby app.rb
```
And next, start ngrok with command below.
```shell
ngrok http 3000
```
And then open your favorite web browser to open [Omise Webhook Endpoint Edit page](https://dashboard.omise.co/test/webhooks/edit) .
And edit that webhook endpoint with the url issued by ngrok for forwarding to your localhost:3000 which is displayed in your window like `https://THIS_IS_UID.ngrok.io` and `/omise/webhook` .
e.g. ENDPOINT: `https://THIS_IS_UID.ngrok.io/omise/webhook`
## Logs?
Yes, this sinatra app will create json files with the request body when it received HTTP request at `/omise/webhook` .
### Maintainers
- [akinrt](https://github.com/akinrt)
### Versioning
Semantic Versioning 0.1.2 as defined at .
### License
MIT License. Copyright 2017 Akira Narita.