File location (for Anthony Cassara Anthony ) SFTP/or any other file IDE -> /api/process-payment.php

row 29 – url for Canada
row 31 – url for everywhere else

This is a stand-alone file it does not have any dependencies with other files or functions, so if you need to use it elsewhere in the future just create the /api/ folder on the same level where /wp-content/ and place the process-payment.php. The following code is assigning the redirect url based on the $country_name:

if ($country_name == 'Canada') {

    $redirect_url = 'https://app.paythen.co/template/hfdbi4frf1';

} else {

    $redirect_url = 'https://app.paythen.co/template/bbio5nwt4h';

}