Sha256: 9dbaa23c9726ba537a928d0e31425f9ab9ed4381bcc702c31e10615d90c8fcbb
Contents?: true
Size: 1.17 KB
Versions: 4
Compression:
Stored size: 1.17 KB
Contents
# Paytureman Payture InPay API implementation ## Installation Add this line to your application's Gemfile: gem 'paytureman' And then execute: $ bundle Or install it yourself as: $ gem install paytureman ## Usage ```ruby require 'paytureman' order_id = SecureRandom.uuid # generate an order ID amount = 123.15 # amount to be charged customer_ip = "123.45.67.89" # customer's IP address # create initial payment payment = Paytureman::PaymentNew.new(order_id, amount, customer_ip) # prepare it payment = payment.prepare # ... assert(payment.kind_of?(Paytureman::PaymentPrepared)) puts "Please, visit #{payment.url} to proceed with the payment. Then press Enter." gets # mark it as blocked payment = payment.blocked # ... assert(payment.kind_of?(Paytureman::PaymentBlocked)) # charge the customer payment = payment.charge # ... assert(payment.kind_of?(Paytureman::PaymentCharged)) ``` ## Contributing 1. Fork it ( http://github.com/SkyWriter/paytureman/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
paytureman-0.5.0 | README.md |
paytureman-0.3.0 | README.md |
paytureman-0.2.0 | README.md |
paytureman-0.1.2 | README.md |