Class: Adyen::API::PaymentService
- Inherits:
-
SimpleSOAPClient
- Object
- SimpleSOAPClient
- Adyen::API::PaymentService
- Extended by:
- TestHelpers
- Defined in:
- lib/adyen/api/payment_service.rb,
lib/adyen/api/test_helpers.rb,
lib/adyen/api/templates/payment_service.rb
Overview
This is the class that maps actions to Adyen’s Payment SOAP service.
It’s encouraged to use the shortcut methods on the Adyen::API module, which abstracts away the difference between this service and the RecurringService. Henceforth, for extensive documentation you should look at the Adyen::API documentation.
The most important difference is that you instantiate a PaymentService with the parameters that are needed for the call that you will eventually make.
Defined Under Namespace
Modules: TestHelpers Classes: AuthorisationResponse, BilletResponse, CancelOrRefundResponse, CancelResponse, CaptureResponse, ModificationResponse, RefundResponse
Constant Summary collapse
- ENDPOINT_URI =
The Adyen Payment SOAP service endpoint uri.
'https://pal-%s.adyen.com/pal/servlet/soap/Payment'- CAPTURE_LAYOUT =
modification_request_with_amount(:capture)
- REFUND_LAYOUT =
modification_request_with_amount(:refund)
- CANCEL_LAYOUT =
modification_request(:cancel)
- CANCEL_OR_REFUND_LAYOUT =
modification_request(:cancelOrRefund)
- LAYOUT =
" <payment:authorise xmlns:payment=\"http://payment.services.adyen.com\" xmlns:recurring=\"http://recurring.services.adyen.com\" xmlns:common=\"http://common.services.adyen.com\">\n <payment:paymentRequest>\n <payment:merchantAccount>%s</payment:merchantAccount>\n <payment:reference>%s</payment:reference>\n %s\n </payment:paymentRequest>\n </payment:authorise>\n"- AMOUNT_PARTIAL =
" <payment:amount>\n <common:currency>%s</common:currency>\n <common:value>%s</common:value>\n </payment:amount>\n"- CARD_PARTIAL =
" <payment:card>\n <payment:holderName>%s</payment:holderName>\n <payment:number>%s</payment:number>\n <payment:expiryYear>%s</payment:expiryYear>\n <payment:expiryMonth>%02d</payment:expiryMonth>\n %s\n </payment:card>\n"- CARD_CVC_PARTIAL =
" <payment:cvc>%s</payment:cvc>\n"- ONE_CLICK_CARD_PARTIAL =
" <payment:card>\n <payment:cvc>%s</payment:cvc>\n </payment:card>\n"- INSTALLMENTS_PARTIAL =
" <payment:installments>\n <common:value>%s</common:value>\n </payment:installments>\n"- SOCIAL_SECURITY_NUMBER_PARTIAL =
" <payment:socialSecurityNumber>%s</payment:socialSecurityNumber>\n"- DELIVERY_DATE_PARTIAL =
" <deliveryDate xmlns=\"http://payment.services.adyen.com\">%s</deliveryDate>\n"- SELECTED_BRAND_PARTIAL =
" <payment:selectedBrand>%s</payment:selectedBrand>\n"- SHOPPER_NAME_PARTIAL =
" <payment:shopperName>\n <common:firstName>%s</common:firstName>\n <common:lastName>%s</common:lastName>\n </payment:shopperName>\n"- SHOPPER_STATEMENT =
" <payment:shopperStatement>%s</payment:shopperStatement>\n"- ENCRYPTED_CARD_PARTIAL =
" <additionalAmount xmlns=\"http://payment.services.adyen.com\" xsi:nil=\"true\" />\n <additionalData xmlns=\"http://payment.services.adyen.com\">\n <entry>\n <key xsi:type=\"xsd:string\">card.encrypted.json</key>\n <value xsi:type=\"xsd:string\">%s</value>\n </entry>\n </additionalData>\n"- ENABLE_RECURRING_CONTRACTS_PARTIAL =
" <payment:recurring>\n <payment:contract>RECURRING,ONECLICK</payment:contract>\n </payment:recurring>\n"- RECURRING_PAYMENT_BODY_PARTIAL =
" <payment:recurring>\n <payment:contract>RECURRING</payment:contract>\n </payment:recurring>\n <payment:selectedRecurringDetailReference>%s</payment:selectedRecurringDetailReference>\n <payment:shopperInteraction>ContAuth</payment:shopperInteraction>\n"- ONE_CLICK_PAYMENT_BODY_PARTIAL =
" <payment:recurring>\n <payment:contract>ONECLICK</payment:contract>\n </payment:recurring>\n <payment:selectedRecurringDetailReference>%s</payment:selectedRecurringDetailReference>\n"- SHOPPER_PARTIALS =
{ :reference => ' <payment:shopperReference>%s</payment:shopperReference>', :email => ' <payment:shopperEmail>%s</payment:shopperEmail>', :ip => ' <payment:shopperIP>%s</payment:shopperIP>', :statement => ' <payment:shopperStatement>%s</payment:shopperStatement>', }
- FRAUD_OFFSET_PARTIAL =
'<payment:fraudOffset>%s</payment:fraudOffset>'- CAPTURE_DELAY_PARTIAL =
'<payment:captureDelayHours>%s</payment:captureDelayHours>'
Constants included from TestHelpers
TestHelpers::AUTHORISATION_REFUSED_RESPONSE, TestHelpers::AUTHORISATION_REQUEST_INVALID_RESPONSE, TestHelpers::AUTHORISE_RESPONSE
Constants inherited from SimpleSOAPClient
SimpleSOAPClient::CACERT, SimpleSOAPClient::ENVELOPE
Instance Attribute Summary
Attributes inherited from SimpleSOAPClient
Instance Method Summary collapse
- #authorise_one_click_payment ⇒ Object
- #authorise_payment ⇒ Object
- #authorise_recurring_payment ⇒ Object
- #cancel ⇒ Object
- #cancel_or_refund ⇒ Object
- #capture ⇒ Object
- #generate_billet ⇒ Object
- #refund ⇒ Object
Methods included from TestHelpers
invalid_stub, refused_stub, stub_invalid!, stub_refused!, stub_success!, success_stub
Methods inherited from SimpleSOAPClient
#call_webservice_action, endpoint, #initialize, #validate_parameter_value!, #validate_parameters!
Constructor Details
This class inherits a constructor from Adyen::API::SimpleSOAPClient
Instance Method Details
#authorise_one_click_payment ⇒ Object
59 60 61 |
# File 'lib/adyen/api/payment_service.rb', line 59 def make_payment_request(, AuthorisationResponse) end |
#authorise_payment ⇒ Object
49 50 51 |
# File 'lib/adyen/api/payment_service.rb', line 49 def make_payment_request(, AuthorisationResponse) end |
#authorise_recurring_payment ⇒ Object
54 55 56 |
# File 'lib/adyen/api/payment_service.rb', line 54 def make_payment_request(, AuthorisationResponse) end |
#cancel ⇒ Object
74 75 76 |
# File 'lib/adyen/api/payment_service.rb', line 74 def cancel make_payment_request(cancel_request_body, CancelResponse) end |
#cancel_or_refund ⇒ Object
79 80 81 |
# File 'lib/adyen/api/payment_service.rb', line 79 def cancel_or_refund make_payment_request(cancel_or_refund_request_body, CancelOrRefundResponse) end |
#capture ⇒ Object
64 65 66 |
# File 'lib/adyen/api/payment_service.rb', line 64 def capture make_payment_request(capture_request_body, CaptureResponse) end |
#generate_billet ⇒ Object
44 45 46 |
# File 'lib/adyen/api/payment_service.rb', line 44 def generate_billet make_payment_request(generate_billet_request_body, BilletResponse) end |
#refund ⇒ Object
69 70 71 |
# File 'lib/adyen/api/payment_service.rb', line 69 def refund make_payment_request(refund_request_body, RefundResponse) end |