This page demonstrates how a variable GoCardless payment works in the GoCardless WordPress plugin. We call this “name your own amount”.
Feel free to try out the link below. It’s set to use the GoCardless sandbox, i.e. test mode, which means you won’t be charged and you can follow the transaction through to the receipt page.
Test Bank Account Details
You’ll need to use the test sort code 20-00-00 and account number 55779911 when you enter your details, otherwise GoCardless won’t be able to process the test transaction.
The Variable GoCardless Payment Link…
Enter the amount that you’d like to pay (in test only!). Then click on the “NYOA Test” link to have the amount processed by GoCardless.
How You Do It
Our user details have been set up in the admin section of the plugin. It’s really simple to do – you just copy and paste the relevant details from your GoCardless account. Then set up the type of payment you want to use and include it in a redirect flow. (“Redirect flow” is GoCardless’ terminology for the payment route your customer takes from your site, to GoCardless’ hosted payment pages, and back to your site to complete the transaction.)
Then you just put the “gcp_redirect_flow” shortcode on your site’s payment page and it will automatically create the payment link for you. You can create an infinite number of payment options (e.g. one-off payments, recurring payments, or variable payment amounts (name your own amount). Each of these payment options will have an unique reference number in the admin area. In this case we are using the third payment option that we have set up. It is a variable name your own amount payment so we need to let the shortcode know which payment we want. We want “gcp_redirect_flow ref=3” which produces the link in the box above.
That’s it! Simple.
Ready To Buy?
This plugin is available for purchase only at CodeCanyon.