$products[1]['ItemName'] = 'my item 2'; //Item Name $products[1]['ItemPrice'] = 10; //Item Price $products[1]['ItemNumber'] = 'xxx2'; //Item Number $products[1]['ItemDesc'] = 'good item 2'; //Item Number $products[1]['ItemQty'] = 3; // Item Quantity */ //-------------------- prepare charges ------------------------- $charges = []; //Other important variables like tax, shipping cost $charges['TotalTaxAmount'] = 0; //Sum of tax for all items in this order. $charges['HandalingCost'] = 0; //Handling cost for this order. $charges['InsuranceCost'] = 0; //shipping insurance cost for this order. $charges['ShippinDiscount'] = 0; //Shipping discount for this order. Specify this as negative number. $charges['ShippinCost'] = 0; //Although you may change the value later, try to pass in a shipping amount that is reasonably accurate. //------------------SetExpressCheckOut------------------- //We need to execute the "SetExpressCheckOut" method to obtain paypal token $paypal->SetExpressCheckOut($products, $charges); } elseif (_GET('token') != '' && _GET('PayerID') != '') { //------------------DoExpressCheckoutPayment------------------- //Paypal redirects back to this page using ReturnURL, We should receive TOKEN and Payer ID //we will be using these two variables to execute the "DoExpressCheckoutPayment" //Note: we haven't received any payment yet. $paypal->DoExpressCheckoutPayment(); } else { //order form }