How to define variables for PayPal purchase

Viewed 13

So im looking through some examples for PDT for Paypal purchases.

Ive come across this https://github.com/paypal/pdt-code-samples/blob/master/paypal_pdt.php so far so good. In the example some variables are accessed, hence

    $firstname = $keyarray['first_name'];
    $lastname = $keyarray['last_name'];
    $itemname = $keyarray['item_name'];
    $amount = $keyarray['payment_gross'];

(PHP, Line 42)

What im trying to do is after a purchase is completed to insert a row into a table, Though since after the payment the user is redirected, the redirect site accepted.php wouldn't know which table to use. So i thought these variables may be the solution.

I was wondering where i can define these variables, or in a sense how they are assigned? Essentially some general info about where these variables came from and how they function.

0 Answers
Related