我正在尝试使用nodejs模块paypal-ipn来验证对paypal的付款。
我按以下格式传递验证方法数据......
{ tx: '60R52218GS3878125',
st: 'Completed',
amt: '0.01',
cc: 'GBP',
cm: '',
item_number: '' }
每次我使用它时,我都会像Paypal一样回复“无效”。
答案 0 :(得分:0)
你回馈给Paypal的是什么?根据{{3}}中的“示例IPN消息和响应”段落,您需要将您收到的非常相同的字符串发回。即
PayPal发送一条消息,类似于以下消息,价格为19.95美元 由Express Checkout购买:
mc_gross = 19.95&安培; protection_eligibility =合格&安培; address_status =确认&安培; payer_id = LPLWNMTBWMFAY&安培;税务= 0.00&安培; address_street = 1 +主+ ST&安培; PAYMENT_DATE = 20%3A12%3A59 +月+ 13%2C + 2009 + PST&安培; PAYMENT_STATUS =完成和放大器;字符集=窗口1252和放大器; address_zip = 95131&放大器; FIRST_NAME =测试和放大器; mc_fee = 0.88安培; address_country_code = US&放大器; ADDRESS_NAME =测试+用户和放大器; notify_version = 2.6&放;定制=安培; payer_status =验证和放大器; ADDRESS_COUNTRY =美国+国&安培; ADDRESS_CITY =圣+圣何塞&安培;数量= 1&安培; verify_sign = AtkOfCXbDm2hu0ZELryHFjY-Vb7PAUvS6nMXgysbElEn9v-1XcmSoGtf&安培; PAYER_EMAIL = gpmac_1231902590_per%40paypal.com&安培; txn_id = 61E67681CH3238416&安培; payment_type =即时&安培;姓氏=用户和安培; ADDRESS_STATE = CA&安培; RECEIVER_EMAIL = gpmac_1231902686_biz%40paypal .COM&安培; payment_fee = 0.88&安培; receiver_id = S8XGHLYDW9T3S&安培; txn_type = express_checkout&安培; ITEM_NAME =安培; mc_currency = USD&安培; ITEM_NUMBER =安培; residence_country = US&安培;的test_ipn = 1&安培; handling_amount = 0.00&安培; transaction_subject =安培; payment_gross = 19.95&安培;航运= 0.00
在您可以信任邮件内容之前,您必须先进行 验证邮件来自PayPal。要验证消息,您 必须按照收到的确切顺序发回内容 在它前面加上命令_notify-validate,如下所示:
https://cms.paypal.com/uk/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNIntro
所以:在尝试验证之前,请勿更改您收到的数据。