我向Paypal发送API请求以支付我的一个用户,他收到了电子邮件通知,但主题行不是我向API提供的内容。
收到的电子邮件通知
COMPANYNAME has sent you a payment via .
payload = {
'sender_batch_header': {
'sender_batch_id': str(self.sender_batch_id),
'recipient_type': 'EMAIL',
'email_subject': 'COMPANYNAME has sent your CashBack!',
'email_message': 'Congratulations! Our records show you '
'earned cash back. You can receive your payment'
' now via Paypal. If you have any '
'questions, please feel free to '
'reach out to us'
},
'items': []
}
response = requests.post(url, json=payload, headers=headers)
根据贝宝(Paypal)文档“ email_subject”应该是收到的电子邮件主题,但是您会发现它有所不同。
文档链接:https://developer.paypal.com/docs/api/payments.payouts-batch/v1/#payouts_post