module Adyen::REST::ModifyPayment

This module implements the Payment.capture API to capture previously authorised payments.

Public Instance Methods

cancel_or_refund_payment(attributes = {}) click to toggle source

Constructs and issues a Payment.cancel API call.

   # File lib/adyen/rest/modify_payment.rb
80 def cancel_or_refund_payment(attributes = {})
81   request = cancel_or_refund_payment_request(attributes)
82   execute_request(request)
83 end
cancel_or_refund_payment_request(attributes = {}) click to toggle source
   # File lib/adyen/rest/modify_payment.rb
85 def cancel_or_refund_payment_request(attributes = {})
86   Adyen::REST::ModifyPayment::Request.new('Payment.cancelOrRefund', attributes,
87     prefix: 'modification_request',
88     response_class: Adyen::REST::ModifyPayment::Response,
89     response_options: {
90       prefix: 'modification_result',
91       expects: '[cancelOrRefund-received]'
92     }
93   )
94 end
cancel_payment(attributes = {}) click to toggle source

Constructs and issues a Payment.cancel API call.

   # File lib/adyen/rest/modify_payment.rb
46 def cancel_payment(attributes = {})
47   request = cancel_payment_request(attributes)
48   execute_request(request)
49 end
cancel_payment_request(attributes = {}) click to toggle source
   # File lib/adyen/rest/modify_payment.rb
51 def cancel_payment_request(attributes = {})
52   Adyen::REST::ModifyPayment::Request.new('Payment.cancel', attributes,
53     prefix: 'modification_request',
54     response_class: Adyen::REST::ModifyPayment::Response,
55     response_options: {
56       prefix: 'modification_result',
57       expects: '[cancel-received]'
58     }
59   )
60 end
capture_payment(attributes = {}) click to toggle source

Constructs and issues a Payment.capture API call.

   # File lib/adyen/rest/modify_payment.rb
29 def capture_payment(attributes = {})
30   request = capture_payment_request(attributes)
31   execute_request(request)
32 end
capture_payment_request(attributes = {}) click to toggle source
   # File lib/adyen/rest/modify_payment.rb
34 def capture_payment_request(attributes = {})
35   Adyen::REST::ModifyPayment::Request.new('Payment.capture', attributes,
36     prefix: 'modification_request',
37     response_class: Adyen::REST::ModifyPayment::Response,
38     response_options: {
39       prefix: 'modification_result',
40       expects: '[capture-received]'
41     }
42   )
43 end
refund_payment(attributes = {}) click to toggle source

Constructs and issues a Payment.cancel API call.

   # File lib/adyen/rest/modify_payment.rb
63 def refund_payment(attributes = {})
64   request = refund_payment_request(attributes)
65   execute_request(request)
66 end
refund_payment_request(attributes = {}) click to toggle source
   # File lib/adyen/rest/modify_payment.rb
68 def refund_payment_request(attributes = {})
69   Adyen::REST::ModifyPayment::Request.new('Payment.refund', attributes,
70     prefix: 'modification_request',
71     response_class: Adyen::REST::ModifyPayment::Response,
72     response_options: {
73       prefix: 'modification_result',
74       expects: '[refund-received]'
75     }
76   )
77 end