From bc54d9bec6d4a269d19dc3796e4727a150083c8b Mon Sep 17 00:00:00 2001 From: Theodora Antoniou Date: Wed, 30 Aug 2023 13:13:39 +0300 Subject: [PATCH] revolut gateway docs --- src/addons/shop/gateways.md | 1 + src/addons/shop/gateways/revolut.md | 69 +++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 src/addons/shop/gateways/revolut.md diff --git a/src/addons/shop/gateways.md b/src/addons/shop/gateways.md index c66db79..733e5c4 100644 --- a/src/addons/shop/gateways.md +++ b/src/addons/shop/gateways.md @@ -15,6 +15,7 @@ Instructions are available for the following gateways: |[Stripe](/addons/shop/gateways/stripe/)|![Yes](/assets/svg/check.svg)|![Yes](/assets/svg/check.svg)|![Yes](/assets/svg/check.svg)|| |[StripeSCA](/addons/shop/gateways/stripe-sca/)|![Yes](/assets/svg/check.svg)|![Yes](/assets/svg/check.svg)|![Yes](/assets/svg/check.svg)|| |[Worldpay](/addons/shop/gateways/worldpay/)|![Yes](/assets/svg/check.svg)|![Yes](/assets/svg/check.svg)|||| +|[Revolut](/addons/shop/gateways/revolut/)|![Yes](/assets/svg/check.svg)|![Yes](/assets/svg/check.svg)|||| Tax evidence collection happens for all transactions, but only some gateways enable us to retrieve the country the payment card is registered to. diff --git a/src/addons/shop/gateways/revolut.md b/src/addons/shop/gateways/revolut.md new file mode 100644 index 0000000..35307f6 --- /dev/null +++ b/src/addons/shop/gateways/revolut.md @@ -0,0 +1,69 @@ +--- +title: Revolut +nav_groups: + - primary +--- + +*Gateway slug:* `revolut` + + +## Settings + +In your `perch/config/shop.php` file, add your settings for Revolut Business. + +```php + [ + 'revolut' => [ + 'enabled' => true, + 'test_mode' => true, + 'live' => [ + 'secret_key' => 'sk_live_ABC123', + 'publishable_key' => 'pk_live_ABC123', + ], + 'test' => [ + 'secret_key' => 'sk_test_ABC123', + 'publishable_key' => 'pk_test_ABC123', + ], + ], + ], + ]; +?> +``` + +## Payment flow + +Revolut Business is a payment-page gateway process, so the user will be sent off to Revolut's site to enter their card details. The payment flow goes like this: + + +### Step 1: Initiating checkout + +```php + +``` + +### Step 2: Shop Payment Button + +Then will return to the same page returning a `token` and puts it in a hidden field.At this point a Pay button wil show which pop ups the card field,on the completion of the payment +```php + success_url, + 'cancel_url' => $cancel_url, + 'token' =>perch_get("token") + ]); +} + ?> + ``` + ### Step 3: Complete Payment + On the $success_url add the complete payment function. + ```php ```