lib/active_merchant/billing/gateways/adyen.rb
# we recommend setting up merchant-specific endpoints.
# https://docs.adyen.com/developers/api-manual#apiendpoints
we recommend setting up merchant-specific endpoints.
we recommend setting up merchant - specific endpoints .
def success_from(action, response, options)
        if %w[RedirectShopper ChallengeShopper].include?(response.dig('resultCode')) && !options[:execute_threed] && !options[:threed_dynamic]
          response['refusalReason'] = 'Received unexpected 3DS authentication response. Use the execute_threed and/or threed_dynamic options to initiate a proper 3DS flow.'
          return false
        end
        case action.to_s
        when 'authorise', 'authorise3d'
          %w[Authorised Received RedirectShopper].include?(response['resultCode'])
        when 'capture', 'refund', 'cancel', 'cancelOrRefund'
          response['response'] == "[#{action}-received]"
        when 'adjustAuthorisation'
          response['response'] == 'Authorised' || response['response'] == '[adjustAuthorisation-received]'
        when 'storeToken'
          response['result'] == 'Success'
        when 'disable'
          response['response'] == '[detail-successfully-disabled]'
        when 'refundWithData'
          response['resultCode'] == 'Received'
        else
          false
        end
      end
def success_from ( action , response , options ) if %w[ RedirectShopper ChallengeShopper ] . include? ( response . dig ( 'resultCode' ) ) && ! options [ :execute_threed ] && ! options [ :threed_dynamic ] response [ 'refusalReason' ] = 'Received unexpected 3DS authentication response. Use the execute_threed and/or threed_dynamic options to initiate a proper 3DS flow.' return false end case action . to_s when 'authorise' , 'authorise3d' %w[ Authorised Received RedirectShopper ] . include? ( response [ 'resultCode' ] ) when 'capture' , 'refund' , 'cancel' , 'cancelOrRefund' response [ 'response' ] == "[#{action}-received]" when 'adjustAuthorisation' response [ 'response' ] == 'Authorised' || response [ 'response' ] == '[adjustAuthorisation-received]' when 'storeToken' response [ 'result' ] == 'Success' when 'disable' response [ 'response' ] == '[detail-successfully-disabled]' when 'refundWithData' response [ 'resultCode' ] == 'Received' else false end end
we recommend setting up merchant-specific endpoints.
we recommend setting up merchant - specific endpoints .
action
<not_specific>
response
<not_specific>
options
<not_specific>