Method: Adyen::API#capture_payment

Defined in:
lib/adyen/api.rb

#capture_payment(psp_reference, amount) ⇒ PaymentService::CaptureResponse

Capture an authorised payment.

You can also configure your merchant account to automatically capture authorised payments in the merchant account settings.

Note that the response of this request will only indicate whether or not the request has been successfuly received. Check the notitification for the actual mutation status.

Parameters:

  • psp_reference (String)

    The PSP reference, from Adyen, of the previously authorised request.

  • amount (Hash)

    A hash describing the money to charge.

Options Hash (amount):

  • :currency (String)

    The ISO currency code (EUR, GBP, USD, etc).

  • :value (Integer)

    The value of the payment in discrete cents, unless the currency does not have cents.

Returns:

See Also:



289
290
291
# File 'lib/adyen/api.rb', line 289

def capture_payment(psp_reference, amount)
  PaymentService.new(:psp_reference => psp_reference, :amount => amount).capture
end