From e12bf1a418361f47fa8cae58436b29b2d6b585ae Mon Sep 17 00:00:00 2001 From: VvanGemert Date: Thu, 6 Feb 2020 12:05:09 +0100 Subject: [PATCH] Added checkout.payment_links call, adding Pay by Link functionality --- README.md | 1 + docs/checkout.html | 17 +++++++++++++++++ lib/adyen/services/checkout.rb | 3 ++- spec/checkout_spec.rb | 1 + spec/mocks/requests/Checkout/payment_links.json | 9 +++++++++ .../mocks/responses/Checkout/payment_links.json | 9 +++++++++ spec/service_spec.rb | 1 + 7 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 spec/mocks/requests/Checkout/payment_links.json create mode 100644 spec/mocks/responses/Checkout/payment_links.json diff --git a/README.md b/README.md index cad5e83d..4b3b924a 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ adyen.checkout.version = 50 - payment_methods - payments - payments.details +- payment_links **checkout utility:** - origin_keys diff --git a/docs/checkout.html b/docs/checkout.html index eb7ae450..f0572a2f 100755 --- a/docs/checkout.html +++ b/docs/checkout.html @@ -41,6 +41,8 @@

Available methods

  • payments
  • payments.details
  • + +
  • payment_links
  • Authentication

    @@ -99,7 +101,22 @@

    Usage - Checkout API

    A successful call to payment_methods will return a list of supported payment methods along with redirect URL's so that you can send your shoppers directly to the issuer's site without losing control of front-end styling / logic.

    + You can also create a link to Adyen's hosted payment form: + +
    response = adyen.checkout.payment_links('{
    +  "amount": {
    +    "value": 1500,
    +    "currency": "EUR"
    +  },
    +  "countryCode": "US",
    +  "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
    +  "reference": "YOUR_REFERENCE"
    +}')
    + +

    A successful call to payment_links will return a url, which directs a user to Adyen's hosted payment form.

    + +