1

クライアントのウェブサイト用にPaypalの[今すぐ購入]ボタンを作成しているときに問題が発生しました。名、姓、メールアドレス、アイテム名は使用されますが、請求先住所も価格も使用されません。単純なプロセスであるべきものについては非常に奇妙です。これが私のコードです:

$invoicenumber = $row['InvoiceNumber'];
$totalquantity = $row['TotalQuantity'];
$totalprice = $row['TotalPrice'];
$costofshipping = $row['CostOfShipping'];
$firstname = $row['FirstName'];
$lastname = $row['LastName'];
$billingstreetaddress = $row['BillingStreetAddress'];
$billingapartmentnumber = $row['BillingApartmentNumber'];
$billingcity = $row['BillingCity'];
$billingstate = $row['BillingState'];
$billingzipcode = $row['BillingZipCode'];
$emailaddress = $row['EmailAddress'];
echo "<form action='https://www.paypal.com/cgi-bin/webscr' method='post'>
<input type='hidden' name='cmd' value='_s-xclick'>
<INPUT TYPE='hidden' NAME='business' VALUE='payments@companyname.com'>
<INPUT TYPE='hidden' NAME='invoice' VALUE='$invoicenumber'>
<INPUT TYPE='hidden' NAME='undefined_quantity' VALUE='$totalquantity'>
<INPUT TYPE='hidden' NAME='item_name' VALUE='CompanyNamePurchase'>
<INPUT TYPE='hidden' NAME='amount' VALUE='$totalprice'>
<INPUT TYPE='hidden' NAME='shipping' VALUE='$costofshipping'>
<INPUT TYPE='hidden' NAME='currency_code' VALUE='USD'>
<INPUT TYPE='hidden' NAME='first_name' VALUE='$firstname'>
<INPUT TYPE='hidden' NAME='last_name' VALUE='$lastname'>
<INPUT TYPE='hidden' NAME='address1' VALUE='$billingstreetaddress'>
<INPUT TYPE='hidden' NAME='address2' VALUE='$billingapartmentnumber'>
<INPUT TYPE='hidden' NAME='city' VALUE='$billingcity'>
<INPUT TYPE='hidden' NAME='state' VALUE='$billingstate'>
<INPUT TYPE='hidden' NAME='zip' VALUE='$billingzipcode'>
<INPUT TYPE='hidden' NAME='lc' VALUE='US'>
<INPUT TYPE='hidden' NAME='email' VALUE='$emailaddress'>
input type='hidden' name='hosted_button_id' value='paypalclientnumber'>
<input type='image' id='paypalsubmitbutton' style='top:750px;left:65%;position:absolute;'     src='https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif' border='0'    name='submit' alt='PayPal - The safer, easier way to pay online!'>
<img alt='' border='0' src='https://www.paypalobjects.com/en_US/i/scr/pixel.gif'    width='1' height='1'>
</form>";

/ *これはソースコードです。請求書番号が通過せず、価格と数量がゼロで、住所はそこにありますが、ペイパルには通過しません。送料もあります。* /

<form action='https://www.paypal.com/cgi-bin/webscr' method='post'>
<input type='hidden' name='cmd' value='_s-xclick'>
<INPUT TYPE='hidden' NAME='business' VALUE='payments@companyname.com'>
<INPUT TYPE='hidden' NAME='invoice' VALUE=''>
<INPUT TYPE='hidden' NAME='undefined_quantity' VALUE='0'>
<INPUT TYPE='hidden' NAME='item_name' VALUE='CompanyNamePurchase'>
<INPUT TYPE='hidden' NAME='amount' VALUE='0.00'>
<INPUT TYPE='hidden' NAME='shipping' VALUE='7.00'>
<INPUT TYPE='hidden' NAME='currency_code' VALUE='USD'>
<INPUT TYPE='hidden' NAME='first_name' VALUE='Multigrain'>
<INPUT TYPE='hidden' NAME='last_name' VALUE='Cheerios'>
<INPUT TYPE='hidden' NAME='address1' VALUE='2 Spoonful Way'>
<INPUT TYPE='hidden' NAME='address2' VALUE='myemailaddress@email.com'>
<INPUT TYPE='hidden' NAME='city' VALUE='Brooklyn'>
<INPUT TYPE='hidden' NAME='state' VALUE='New York'>
<INPUT TYPE='hidden' NAME='zip' VALUE='11203'>
<INPUT TYPE='hidden' NAME='lc' VALUE='US'>
<INPUT TYPE='hidden' NAME='email' VALUE=''>
<input type='hidden' name='hosted_button_id' value='paypalidjumbledletters&#s'>
<input type='image' id='paypalsubmitbutton'     style='top:750px;left:65%;position:absolute;' src='https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif' border='0' name='submit' alt='PayPal - The safer, easier way to pay online!'>
<img alt='' border='0' src='https://www.paypalobjects.com/en_US/i/scr/pixel.gif' width='1' height='1'>
</form>
4

1 に答える 1

0

ボタンがホストされていないボタンであることを確認することに加えて、アドレス変数の受け渡しに問題がある場合は、状態が省略されていることを確認してください。つまり、マサチューセッツではなくMAです。これが私にとっての解決策でした。

于 2013-01-13T23:49:14.377 に答える