我拥有PayPal expresscheckout的问题。 我用集成向导https://www.paypal-labs.com/integrationwizard/ecpaypal/main.php的代码,一切工作正常,但是当我重定向到贝宝我想要有一个像贝宝的页面上的总量和种类描述的订单总结,但在我的情况下它的空白(如在此屏幕上http://imageshack.us/photo/my-images/819/blankv.png/)我可以把我的代码片段,我使用:
// ==================================
// PayPal Express Checkout Module
// ==================================
//'------------------------------------
//' The paymentAmount is the total value of
//' the shopping cart, that was set
//' earlier in a session variable
//' by the shopping cart page
//'------------------------------------
$paymentAmount = $_SESSION["Payment_Amount"];
//'------------------------------------
//' When you integrate this code
//' set the variables below with
//' shipping address details
//' entered by the user on the
//' Shipping page.
//'------------------------------------
$sql = "SELECT * FROM orders_shipping_address WHERE orderid={$_SESSION['orderId']}";
$shipping_address = $this->db->query($sql)->fetchAll();
$shipToName = $shipping_address[0]['lastname'] . " " . $shipping_address[0]['firstname'];
$shipToStreet = $shipping_address[0]['street1'];
$shipToStreet2 = $shipping_address[0]['street2']; //Leave it blank if there is no value
$shipToCity = $shipping_address[0]['city'];
$shipToState = "Romania";
$shipToCountryCode = "RO"; // Please refer to the PayPal country codes in the API documentation
$shipToZip = $shipping_address[0]['zip'];
$phoneNum = $shipping_address[0]['phone'];
//'------------------------------------
//' The currencyCodeType and paymentType
//' are set to the selections made on the Integration Assistant
//'------------------------------------
$currencyCodeType = $_SESSION['currencyCodeType'] = "EUR";
$paymentType = $_SESSION['PaymentType'] = "Sale";
//'------------------------------------
//' The returnURL is the location where buyers return to when a
//' payment has been succesfully authorized.
//'
//' This is set to the value entered on the Integration Assistant
//'------------------------------------
$returnURL = $ret;
//'------------------------------------
//' The cancelURL is the location buyers are sent to when they hit the
//' cancel button during authorization of payment during the PayPal flow
//'
//' This is set to the value entered on the Integration Assistant
//'------------------------------------
$cancelURL = $cancel;
//'------------------------------------
//' Calls the SetExpressCheckout API call
//'
//' The CallMarkExpressCheckout function is defined in the file PayPalFunctions.php,
//' it is included at the top of this file.
//'-------------------------------------------------
$resArray = CallMarkExpressCheckout ($paymentAmount, $currencyCodeType, $paymentType, $returnURL,
$cancelURL, $shipToName, $shipToStreet, $shipToCity, $shipToState,
$shipToCountryCode, $shipToZip, $shipToStreet2, $phoneNum
);
$ack = strtoupper($resArray["ACK"]);
if($ack=="SUCCESS" || $ack=="SUCCESSWITHWARNING")
{
//dump($resArray);
//die;
$token = urldecode($resArray["TOKEN"]);
$_SESSION['reshash']=$token;
RedirectToPayPal ($token);
}
任何帮助将是非常apreciated,在此先感谢。
此数据也需要包含在DoExpressCheckoutPayment中,如果您希望它出现在买方的交易详情以及您自己的交易历史记录中。 – Robert