我已经创建并向客户发送了发票,然后我使用检索发票进行检查。状态为“已发送”,但客户没有收到邮件中的任何发票。这是我的代码:
$send = "curl -v -X 'POST' 'https://api.sandbox.paypal.com/v1/invoicing/invoices/INV2-DZF4-Y9AU-4L7U-ZF7W/send' -H 'Content-Type: application/json' -H 'Authorization: Bearer " . $access_token . "'";
exec($send, $sendResult);
$receive = "curl -v -X 'GET' 'https://api.sandbox.paypal.com/v1/invoicing/invoices/INV2-DZF4-Y9AU-4L7U-ZF7W' -H 'Authorization: Bearer " . $access_token . "'";
exec($receive, $receiveResult);
$receiveResultReponse = json_decode(implode(" ", $receiveResult));
print_r($receiveResultReponse);($receiveResultReponse);
响应:
stdClass Object
(
[id] => INV2-DZF4-Y9AU-4L7U-ZF7W
[number] => 0122
[status] => SENT
[merchant_info] => stdClass Object
(
...
[metadata] => stdClass Object
(
[created_date] => 2015-08-31 02:22:21 PDT
[first_sent_date] => 2015-08-31 02:22:22 PDT
[last_sent_date] => 2015-08-31 02:22:22 PDT
[payer_view_url] => https://www.sandbox.paypal.com/cgi_bin/webscr?cmd=_pay-inv&viewtype=altview&id=INV2-DZF4-Y9AU-4L7U-ZF7W
)
)
没有收到来自客户的发票电子邮件。
最佳答案
沙盒不发送电子邮件...
The email address doesn't need to be a real email address; the Sandbox doesn't send any email outside of the Sandbox environment.
引用号:Creating Sandbox Test Accounts
你可以:
- 检查Notifications
- 以您的沙盒买家身份登录 Paypal Sandbox site - 您应该看到买家收到的发票
第...
关于php - 使用 Paypal REST api 发送发票时,客户收不到电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32308302/