Module: MixinBot::API::LegacyPayment
- Included in:
- MixinBot::API
- Defined in:
- lib/mixin_bot/api/legacy_payment.rb
Instance Method Summary collapse
Instance Method Details
#pay_url(**kwargs) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/mixin_bot/api/legacy_payment.rb', line 6 def pay_url(**kwargs) format( 'https://mixin.one/pay?recipient=%<recipient_id>s&asset=%<asset>s&amount=%<amount>s&trace=%<trace>s&memo=%<memo>s', recipient_id: kwargs[:recipient_id], asset: kwargs[:asset_id], amount: kwargs[:amount].to_s, trace: kwargs[:trace], memo: kwargs[:memo] ) end |
#verify_payment(**kwargs) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/mixin_bot/api/legacy_payment.rb', line 18 def verify_payment(**kwargs) path = '/payments' payload = { asset_id: kwargs[:asset_id], opponent_id: kwargs[:opponent_id], amount: kwargs[:amount].to_s, trace_id: kwargs[:trace] } client.post path, **payload end |