Skip to content

bekicot/xendit-rails

Repository files navigation

Xendit Rails

A drop in rails engine for receiving payment via xendit.

Installation

gem 'xendit-rails', github: 'bekicot/xendit-rails'

And then execute:

$ bundle
Using xendit-rails 0.x.x from https://github.com/bekicot/xendit-rails.git (at master@xxxxxxx)

Copy migration files

$ bin/rails xendit:install:migrations
Copied migration 20200410225858_create_xendit_virtual_accounts.xendit.rb from xendit
Copied migration 20200410225859_create_xendit_payments.xendit.rb from xendit

Mount the engine to your routes

mount Xendit::Rails::Engine => 'xendit-rails'

And then add the callback to your xendit account

  • FVA Paid: https://yourdomain.com/xendit-rails/callbacks/virtual_accounts/paid
  • FVA Created: https://yourdomain.com/xendit-rails/callbacks/virtual_accounts/
  • Invoice Paid/Expired: https://yourdomain.com/xendit-rails/callbacks/invoices/paid_or_expired

Configuration

# config/initializers/xendit_rails.rb

Xendit.callback_token = 'Your Xendit Callback Token'

Support

Nuhun!!

License

The gem is available as open source under the terms of the MIT License.

About

A drop in rails engine for receiving payment via xendit.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published