Module: Adyen::REST::AuthorisePayment

Included in:
Client
Defined in:
lib/adyen/rest/authorise_payment.rb

Overview

This module implements the Payment.authorise, and Payment.authorise3d API calls, and includes a custom response class to make handling the response easier.

Defined Under Namespace

Classes: ListRecurringDetailsResponse, Request, Response

Instance Method Summary collapse

Instance Method Details

#authorise_payment(attributes) ⇒ Adyen::REST::AuthorisePayment::Response Also known as: authorize_payment

Sends an authorise payment request to Adyen’s webservice.

Parameters:

  • attributes (Hash)

    The attributes to include in the request.

Returns:

See Also:



99
100
101
102
# File 'lib/adyen/rest/authorise_payment.rb', line 99

def authorise_payment(attributes)
  request = authorise_payment_request(attributes)
  execute_request(request)
end

#authorise_payment_3dsecure(attributes) ⇒ Adyen::REST::AuthorisePayment::Response Also known as: authorize_payment_3dsecure

Sends a 3Dsecure-enabled authorise payment request to Adyen’s webservice.

The response differs based on the credit card uses in the transaction. For some credit cards, an additional offsite step may be required to complete the transaction. Check .redirect_shopper? to see if this is the case. Other cards are not 3DSecure-enabled, and may immediately authorise the transaction. Check .authorised? to see if this is the case.

Parameters:

  • attributes (Hash)

    The attributes to include in the request.

Returns:

See Also:



133
134
135
136
# File 'lib/adyen/rest/authorise_payment.rb', line 133

def authorise_payment_3dsecure(attributes)
  request = authorise_payment_3dsecure_request(attributes)
  execute_request(request)
end

#authorise_payment_3dsecure_request(attributes = {}) ⇒ Adyen::REST::AuthorisePayment::Response Also known as: authorize_payment_3dsecure_request

Generates a Payment.authorise3d request to Adyen’s webservice.

The response differs based on the credit card uses in the transaction. For some credit cards, an additional offsite step may be required to complete the transaction. Check .redirect_shopper? to see if this is the case. Other cards are not 3DSecure-enabled, and may immediately authorise the transaction. Check .authorised? to see if this is the case.

Parameters:

  • attributes (Hash) (defaults to: {})

    The attributes to include in the request.

Returns:

See Also:



116
117
118
119
# File 'lib/adyen/rest/authorise_payment.rb', line 116

def authorise_payment_3dsecure_request(attributes = {})
  Adyen::REST::AuthorisePayment::Request.new('Payment.authorise3d', attributes,
      response_class: Adyen::REST::AuthorisePayment::Response)
end

#authorise_payment_request(attributes = {}) ⇒ Adyen::REST::Request Also known as: authorize_payment_request

Generates Payment.authorise request for Adyen’s webservice.

Parameters:

  • attributes (Hash) (defaults to: {})

    The attributes to include in the request.

Returns:

See Also:



88
89
90
91
# File 'lib/adyen/rest/authorise_payment.rb', line 88

def authorise_payment_request(attributes = {})
  Adyen::REST::AuthorisePayment::Request.new('Payment.authorise', attributes,
      response_class: Adyen::REST::AuthorisePayment::Response)
end

#authorise_recurring_payment(attributes) ⇒ Adyen::REST::AuthorisePayment::Response

Sends an authorise recurring payment request to Adyen’s webservice.

Parameters:

  • attributes (Hash)

    The attributes to include in the request.

Returns:

See Also:



153
154
155
156
# File 'lib/adyen/rest/authorise_payment.rb', line 153

def authorise_recurring_payment(attributes)
  request = authorise_recurring_payment_request(attributes)
  execute_request(request)
end

#authorise_recurring_payment_request(attributes = {}) ⇒ Adyen::REST::Request

Generates Payment.authorise request with recurring for Adyen’s webservice.

Parameters:

  • attributes (Hash) (defaults to: {})

    The attributes to include in the request.

Returns:

See Also:



142
143
144
145
# File 'lib/adyen/rest/authorise_payment.rb', line 142

def authorise_recurring_payment_request(attributes={})
  Adyen::REST::AuthoriseRecurringPayment::Request.new('Payment.authorise', attributes,
      response_class: Adyen::REST::AuthorisePayment::Response)
end

#list_recurring_details(attributes) ⇒ Adyen::REST::AuthorisePayment::ListRecurringDetailsResponse

Sends an list recurring details request to Adyen’s webservice. The response responds to .details and .references with recurring data.



221
222
223
224
# File 'lib/adyen/rest/authorise_payment.rb', line 221

def list_recurring_details(attributes)
  request = list_recurring_details_request(attributes)
  execute_request(request)
end

#list_recurring_details_request(attributes = {}) ⇒ Adyen::REST::ListRecurringDetailsPayment::Request

Generates Recurring.listRecurringDetails request for Adyen’s webservice.

Parameters:

  • attributes (Hash) (defaults to: {})

    The attributes to include in the request.

Returns:

See Also:



210
211
212
213
# File 'lib/adyen/rest/authorise_payment.rb', line 210

def list_recurring_details_request(attributes = {})
  Adyen::REST::ListRecurringDetailsPayment::Request.new('Recurring.listRecurringDetails', attributes,
      response_class: Adyen::REST::AuthorisePayment::ListRecurringDetailsResponse)
end

#reauthorise_recurring_payment(attributes) ⇒ Adyen::REST::AuthorisePayment::Response Also known as: reauthorize_recurring_payment

Sends an authorise recurring payment request to Adyen’s webservice. This method can be called if a previous contract was established with #authorise_recurring_payment

Parameters:

  • attributes (Hash)

    The attributes to include in the request.

Returns:

See Also:



175
176
177
178
# File 'lib/adyen/rest/authorise_payment.rb', line 175

def reauthorise_recurring_payment(attributes)
  request = reauthorise_recurring_payment_request(attributes)
  execute_request(request)
end

#reauthorise_recurring_payment_request(attributes = {}) ⇒ Adyen::REST::Request Also known as: reauthorize_recurring_payment_request

Generates Payment.authorise request with recurring for Adyen’s webservice. This method can be called if a previous contract was established with #authorise_recurring_payment

Parameters:

  • attributes (Hash) (defaults to: {})

    The attributes to include in the request.

Returns:

See Also:



163
164
165
166
# File 'lib/adyen/rest/authorise_payment.rb', line 163

def reauthorise_recurring_payment_request(attributes={})
  Adyen::REST::ReauthoriseRecurringPayment::Request.new('Payment.authorise', attributes,
      response_class: Adyen::REST::AuthorisePayment::Response)
end