0
我已經爲CreateRecurringPaymentsProfile嵌入了此代碼,但是當我將此代碼放入expresscheckout模塊(paypalwpp.php)後付款返回到網站後,它顯示空白頁面,任何一個解決此問題的代碼均可。zencart中的快速結帳模塊
if(isset($_SESSION['r'])){
$t = $_SESSION['paypal_ec_token'];
$amount = $_SESSION['total_amount'];
$frequency = $_SESSION['r'];
$d = date('c');
$token = urlencode("$t");
$paymentAmount = urlencode($amount);
$currencyID = urlencode("USD");
$startDate = urlencode("$d");
$billingPeriod = urlencode("Week");
$billingFreq = urlencode($frequency);
$nvpStr="&TOKEN=$token&AMT=$paymentAmount&CURRENCYCODE=$currencyID&PROFILESTARTDATE=$startDate";
$nvpStr .= "&BILLINGPERIOD=$billingPeriod&BILLINGFREQUENCY=$billingFreq";
$nvpStr .= "&DESC=Recurring Payment";
$httpParsedResponseAr = self::PPHttpPost('CreateRecurringPaymentsProfile', $nvpStr);
if("SUCCESS" == strtoupper($httpParsedResponseAr["ACK"]) || "SUCCESSWITHWARNING" == strtoupper($httpParsedResponseAr["ACK"])) {
$profile_id = $httpParsedResponseAr['PROFILEID'];
$profile_id = str_replace("%2d","-",$profile_id);
$q = mysql_query("insert into recurring_profiles(profile_id) values('$profile_id')") or die(mysql_error());
$recu_id = mysql_insert_id();
if($q){
unset($_SESSION['total_amount']);
$_SESSION['s'] = true;
$_SESSION['recu_id'] = $recu_id;
}
else{
echo "<h1>Sorry PROFILEID ERROR";
}
//exit('CreateRecurringPaymentsProfile Completed Successfully: '.print_r($httpParsedResponseAr, true));
}
else {
//echo "<br/><h1>Problem Occurs please shop again sorry for this inconvinence<br/>";
//exit('CreateRecurringPaymentsProfile failed: ' . print_r($httpParsedResponseAr, true));
}
}