php-Paypalの支払いはサンドボックスで機能しますが、ライブのPaypalでは機能しませんか?
ペイパルのビジネスアカウントで問題が発生しています。サンドボックスではすべてが正常に機能しています。ライブで使用しているフォームは次のとおりです:
<form method="post" action="https://www.paypal.com/cgi-bin/webscr" id="paypalForm">
<input type="hidden" value="_xclick" name="cmd">
<input type="hidden" value="[email protected]" name="business">
<input type="hidden" value="1" name="quantity">
<input type="hidden" value="website" name="item_name">
<input type="hidden" value="MDAW" name="item_number">
<input type="hidden" value="0.3" name="amount">
<input type="hidden" value="0" name="shipping">
<input type="hidden" value="http://www.website.com/ipn.php" name="notify_url">
<input type="hidden" value="USD" name="currency_code">
<input type="hidden" value="http://website.com/orderconfirm.php" name="return">
<input type="hidden" value="12" name="custom"> <a class="btn btn-primary" href="selectpixel.php"><i class="fa fa-angle-double-left"></i> Back</a>
<button id="btnOrderForm" class="btn btn-success" type="button">Make Payment via PayPal</button>
</form>
以下は、サンドボックスを通過するときにカスタム値を正しく受信するIPNURLです。 http://www.website.com/ipn.php
しかし、ライブペイパルで何が起こっているのかはわかりません。トランザクションが成功した後でも、サイトに戻ることはできず、ipn.phpファイルでカスタム変数を受け取ることもできません。
IPN URLはサンドボックスと同じであり、それ以外はすべて同じです。
ユーザーが[今すぐ支払う]ボタンをクリックすると、ペイパルにリダイレクトされ、ライブペイパル取引の場合は支払い後の支払いから混乱しますが、ユーザーは正常に支払うことができますが、ウェブサイトとIPNに戻ることはありません情報を更新するためにhttp://website.com/ipn.phpのURLに戻されません。
答え :
解決策:
まず、アクセス時に「HTTP404-ファイルが見つかりません」と表示されるリンク( http://www.website.com/ipn.php )。したがって、このページを使用可能なページに変更する必要があります。 PayPalの最新のIPNサンプルコードのリンク( https://github.com/paypal/ipn-code-samples )にアクセスし、それに応じてIPNスクリプトページに更新することができます。
次に、リンク( https://developer.paypal.com/docs/classic/button-manager/integration-guide/ButtonManagerHTMLVariables/?mark=html )を参照してください。 PayPalボタンのHTML変数。変数「return」は、顧客が支払いを完了した後に顧客をページにリダイレクトする関数用です。変数「notify_url」は、トランザクション情報についてWebサーバーのバックエンドに通知する関数用のPayPalIPN用に設計されています。 PayPal IPNの詳細については、以下のリンクにアクセスしてください( https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/ )
答え :
解決策:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Test_Item">
<input type="hidden" name="item_number" value="MDAW">
<input type="hidden" name="amount" value="0.3">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="return" value="http://website.com/orderconfirm.php">
<input type="hidden" name="notify_url" value="http://website.com/orderconfirm.php">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="cn" value="Add special instructions to the seller">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="weight_unit" value="lbs">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<input type="image" src="https://www.sandbox.paypal.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.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
同様の質問
私たちのウェブサイトで同様の質問で答えを見つけてください。