<form method="post" action="https://api-3t.sandbox.paypal.com/nvp">
<input type="hidden" name="USER" value="ram.fobess_api1.gmail.com">
<input type="hidden" name="PWD" value="1395047802">
<input type="hidden" name="SIGNATURE" value="A5sBito4n5-BXuCBOs3GVB4hSd3CAMOtrfhtX7gYJ8IRalRwwoRJEyJQ">
<input type="hidden" name="VERSION" value="98.0">
<input type="hidden" name="PAYMENTREQUEST_0_PAYMENTACTION"
<input type="hidden" name="PAYMENTREQUEST_0_CURRENCYCODE "
value="USD">
<input name="PAYMENTREQUEST_0_AMT" value="19.95">
<input type="hidden" name="RETURNURL"
value="https://www.YourReturnURL.com">
<input type="hidden" name="CANCELURL" value="https://www.YourReturnURL.com">
<input type="hidden" name="TOKEN"
value="EC-1CX69969Y0329883A">
<input type="submit" name="METHOD" value="GetExpressCheckoutDetails">
<!-- <input type="submit" name="METHOD" value="SetExpressCheckout"> -->
</form>
这是我的代码我想将此值发布为重定向到结帐页面...如何...?
答案 0 :(得分:1)
您需要在此处提供结帐页面网址:
<input type="hidden" name="RETURNURL" value="https://www.YourReturnURL.com">
值部分中的为您提供URL。
答案 1 :(得分:0)
<?php
session_start();
$desc = 'hidsdsf';//set to the order description to be appear on the PayPal website;
$orderno = '1001';//set to unique order number;
$nettotal = '12';//set to productTotal + shipmentFee + tax;
$_SESSION["ss_last_orderno"] = $orderno;
//Save order information to database using the unique order number with status set as Pending...
$url = "https://www.sandbox.paypal.com/cgi-bin/webscr"; //Test
//$url = "https://www.paypal.com/cgi-bin/webscr"; //Live
//$ppAcc = "ram.fobess@gmail.com"; //PayPal account email
$ppAcc = "ram.fobess@outlook.com"; //PayPal account email
$cancelURL = "http://localhost/final/paypal_cancel.php";
//$returnURL = "http://localhost/final/return.php";
$returnURL = "http://localhost/final/lunch.php";
//$notiesURL = "http://localhost/final/returnfinal.php"; "<input type='hidden' name='notify_url' value='$notiesURL'>\n".
$buffer =
"<form action='$url' method='post' name='frmPayPal'>\n".
"<input type='hidden' name='business' value='$ppAcc'>\n".
"<input type='hidden' name='cmd' value='_xclick'>\n".
"<input type='hidden' display='1' value='permonth'>\n".
"<input type='hidden' name='item_name' value='$desc'>\n".
"<input type='hidden' name='item_number' value='$orderno'>\n".
"<input type='hidden' name='amount' alt='per month' value='$nettotal'>\n".
"<input type='hidden' name='no_shipping' value='1'>\n".
"<input type='hidden' name='currency_code' value='USD'>\n".
"<input type='hidden' name='handling' value='0'>\n".
"<input type='hidden' name='cancel_return' value='$cancelURL'>\n".
"<input type='hidden' name='return' value='$returnURL'>\n".
"</form>\n".
"<script language='javascript'>document.frmPayPal.submit();</script>\n";
echo($buffer);
?>
返回页面
/* Part - 3 */ $parameter_value_array = explode("\n", $ipnresult); $value_array =array(); foreach
($ parameter_value_array as $ key =&gt; $ value){$ key_values = 爆炸(&#34; =&#34;,$ value); $ value_array [$ key_values [0]] = $ key_values [1]; }$ value_array [&#39; status&#39;] ==&#39; SUCCESS&#39;){ echo utf8_decode(urldecode($ value_array [&#39; item_name&#39;])); echo&#39;if(array_key_exists("status", $value_array) &&
&#39 ;; echo utf8_decode(urldecode($ value_array [&#39; quantity&#39;])); echo&#39;
&#39 ;;回声 utf8_decode(urldecode($ value_array [&#39; PAYER_EMAIL&#39;])); echo&#39;
&#39 ;; foreach($ value_array as $ key =&gt; $ nm){// $ ram。= print_r($ value_array); $ ram。= $ key。&#39; = &#39; .utf8_decode(urldecode($纳米))&#34;
&#34 ;; }} echo $ ram; ?&GT;