このフォームを使用して、paypal サンドボックス サイトでリクエストを送信しています。
<form name="_xclick" action="https://www.sandbox.paypal.com/cgi-bin/webscr"
method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="MY_EMAIL">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="item_name" value="Book!">
<input type="hidden" name="amount" value="13">
<input type="hidden" name="return" value="THIS URL">
<input type="hidden" name="notify_url" value="MY_IPN">
<input type="image" src="http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif"
border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
置き換える値はMY_EMAIL
とのみですMY_IPN
。特に後者は私のipn.php
ファイルへのリンクです
include('ipnlistener.php');
$listener = new IpnListener();
// tell the IPN listener to use the PayPal test sandbox
$listener->use_sandbox = true;
// try to process the IPN POST
try {
$listener->requirePostMethod();
$verified = $listener->processIpn();
} catch (Exception $e) {
error_log($e->getMessage());
}
error_log($listener->getTextReport());
(ipnlistener.php のソースは github にあります) . 注文すると、すべてがスムーズに機能します(サンドボックスから実際のペイパルに切り替えると、PayPalサンドボックス機能を使用するにはログインしてくださいというバグはないと思います)。
問題は、注文が正しく行われ、サンドボックス アカウントで支払いを受け取ることです。
Hello Test Store, You received a payment of €13.00 EUR from xxx xxx (xxx@test.test)
しかし、私のerror_logには次のように表示されます:
payment_status Pending
payment_status
が に設定されている場合でも、デジタル商品を受け入れて配信するように、ipn.php ファイルをコーディングする必要がありPending
ますか? 私がフォローしているガイドでは、payment_status がCompleted
.
ペイパル サンドボックス サーバーから確認メールが送信されないのはなぜですか?