Sha256: dbb0346c7b3934534bd4623c0ce20aeba447eed35de5fffec6961085a9c32ac6
Contents?: true
Size: 788 Bytes
Versions: 5
Compression:
Stored size: 788 Bytes
Contents
module Workarea class Payment module Authorize class Paypal include OperationImplementation include CreditCardOperation delegate :gateway, to: Workarea::Paypal def complete! transaction.response = handle_active_merchant_errors do gateway.authorize( transaction.amount.cents, token: tender.token, payer_id: tender.payer_id, currency: transaction.amount.currency ) end end def cancel! return unless transaction.success? transaction.cancellation = handle_active_merchant_errors do gateway.void(transaction.response.params['transaction_id']) end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems