module Adyen::REST::AuthorisePayment

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

Public Instance Methods

authorise_payment(attributes) click to toggle source

Sends an authorise payment request to Adyen's webservice. @param attributes [Hash] The attributes to include in the request. @return [Adyen::REST::AuthorisePayment::Response] The response from Adyen.

The response responds to <tt>.authorised?</tt> to check whether the
authorization was successful.

@see Adyen::REST::AuthorisePayment::Response#authorised?

    # File lib/adyen/rest/authorise_payment.rb
101 def authorise_payment(attributes)
102   request = authorise_payment_request(attributes)
103   execute_request(request)
104 end
Also aliased as: authorize_payment
authorise_payment_3dsecure(attributes) click to toggle source

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.

@param attributes [Hash] The attributes to include in the request. @return [Adyen::REST::AuthorisePayment::Response] The response from Adyen. @see Adyen::REST::AuthorisePayment::Response#redirect_shopper? @see Adyen::REST::AuthorisePayment::Response#authorised?

    # File lib/adyen/rest/authorise_payment.rb
137 def authorise_payment_3dsecure(attributes)
138   request = authorise_payment_3dsecure_request(attributes)
139   execute_request(request)
140 end
Also aliased as: authorize_payment_3dsecure
authorise_payment_3dsecure_request(attributes = {}) click to toggle source

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.

@param attributes [Hash] The attributes to include in the request. @return [Adyen::REST::AuthorisePayment::Response] The response from Adyen. @see Adyen::REST::AuthorisePayment::Response#redirect_shopper? @see Adyen::REST::AuthorisePayment::Response#authorised?

    # File lib/adyen/rest/authorise_payment.rb
118 def authorise_payment_3dsecure_request(attributes = {})
119   Adyen::REST::AuthorisePayment::Request.new('Payment.authorise3d', attributes,
120       prefix: 'payment_request_3d',
121       response_class: Adyen::REST::AuthorisePayment::Response,
122       response_options: { prefix: 'payment_result' })
123 end
authorise_payment_request(attributes = {}) click to toggle source

Generates Payment.authorise request for Adyen's webservice. @param (see authorise_payment) @return [Adyen::REST::Request] The request to send @see authorise_payment

   # File lib/adyen/rest/authorise_payment.rb
88 def authorise_payment_request(attributes = {})
89   Adyen::REST::AuthorisePayment::Request.new('Payment.authorise', attributes,
90       prefix: 'payment_request',
91       response_class: Adyen::REST::AuthorisePayment::Response,
92       response_options: { prefix: 'payment_result' })
93 end
Also aliased as: authorize_payment_request
authorise_recurring_payment(attributes) click to toggle source

Sends an authorise recurring payment request to Adyen's webservice. @param attributes [Hash] The attributes to include in the request. @return [Adyen::REST::AuthorisePayment::Response] The response from Adyen.

The response responds to <tt>.authorised?</tt> to check whether the
authorization was successful.

@see Adyen::REST::AuthorisePayment::Response#authorised?

    # File lib/adyen/rest/authorise_payment.rb
159 def authorise_recurring_payment(attributes)
160   request = authorise_recurring_payment_request(attributes)
161   execute_request(request)
162 end
authorise_recurring_payment_request(attributes={}) click to toggle source

Generates Payment.authorise request with recurring for Adyen's webservice. @param (see authorise_recurring_payment) @return [Adyen::REST::Request] The request to send @see authorise_recurring_payment

    # File lib/adyen/rest/authorise_payment.rb
146 def authorise_recurring_payment_request(attributes={})
147   Adyen::REST::AuthoriseRecurringPayment::Request.new('Payment.authorise', attributes,
148       prefix: 'payment_request',
149       response_class: Adyen::REST::AuthorisePayment::Response,
150       response_options: { prefix: 'payment_result' })
151 end
authorize_payment(attributes)
Alias for: authorise_payment
authorize_payment_3dsecure(attributes)
authorize_payment_3dsecure_request(attributes = {})
authorize_payment_request(attributes = {})
list_recurring_details(attributes) click to toggle source

Sends an list recurring details request to Adyen's webservice. @param attributes [Hash] The attributes to include in the request. @return [Adyen::REST::AuthorisePayment::ListRecurringDetailsResponse] The response from Adyen. The response responds to .details and .references with recurring data. @see Adyen::REST::AuthorisePayment::ListRecurringDetailsResponse#references @see Adyen::REST::AuthorisePayment::ListRecurringDetailsResponse#details

    # File lib/adyen/rest/authorise_payment.rb
231 def list_recurring_details(attributes)
232   request = list_recurring_details_request(attributes)
233   execute_request(request)
234 end
list_recurring_details_request(attributes = {}) click to toggle source

Generates Recurring.listRecurringDetails request for Adyen's webservice. @param (see list_recurring_details) @return [Adyen::REST::ListRecurringDetailsPayment::Request] The request to send @see list_recurring_details

    # File lib/adyen/rest/authorise_payment.rb
218 def list_recurring_details_request(attributes = {})
219   Adyen::REST::ListRecurringDetailsPayment::Request.new('Recurring.listRecurringDetails', attributes,
220       prefix: 'recurring_details_request',
221       response_class: Adyen::REST::AuthorisePayment::ListRecurringDetailsResponse,
222       response_options: { prefix: 'recurring_details_result' })
223 end
reauthorise_recurring_payment(attributes) click to toggle source

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 @param attributes [Hash] The attributes to include in the request. @return [Adyen::REST::AuthorisePayment::Response] The response from Adyen.

The response responds to <tt>.authorised?</tt> to check whether the
authorization was successful.

@see Adyen::REST::AuthorisePayment::Response#authorised?

    # File lib/adyen/rest/authorise_payment.rb
183 def reauthorise_recurring_payment(attributes)
184   request = reauthorise_recurring_payment_request(attributes)
185   execute_request(request)
186 end
reauthorise_recurring_payment_request(attributes={}) click to toggle source

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 @param (see authorise_recurring_payment) @return [Adyen::REST::Request] The request to send @see authorise_recurring_payment

    # File lib/adyen/rest/authorise_payment.rb
169 def reauthorise_recurring_payment_request(attributes={})
170   Adyen::REST::ReauthoriseRecurringPayment::Request.new('Payment.authorise', attributes,
171       prefix: 'payment_request',
172       response_class: Adyen::REST::AuthorisePayment::Response,
173       response_options: { prefix: 'payment_result' })
174 end
reauthorize_recurring_payment(attributes)
reauthorize_recurring_payment_request(attributes={})