What is this full path to require_once '/AmazonPay/Client.php'?

81 Views Asked by At

I'm a newbie. I'm trying to integrate with Amazon Pay. The sample code from Amazon has the below,

session_start();
require_once '/AmazonPay/Client.php';

So, if my payment PHP file is located at http://localhost/template/payment.php where should the /AmazonPay/Client.php' file be?

localhost/template/AmazonPay/Client.php

or

localhost/AmazonPay/Client.php
1

There are 1 best solutions below

0
On

You don't need to use the Client.php in the front-end(localhost). We can access the Client.php backend via API Calls to the same. If you want to know the path of Client.php, Go to VisualStudio Code and browse the Client.php in the Package. Right click on file and select "Copy Relative Path"

Using the copied value, one can easily paste that in,

require_once "<Copied_Path>"