am正在尝试从贝宝webhook获取自动续订响应并保存到表中。在mock调用模拟器中,它的显示无法验证webhook。我把我得到的东西写进日志文件。我正在使用laravel框架,如果有人能帮忙,那将是很棒的
production.DEBUG: {"id":"WH-2WR32451HC0233532-67976317FL4543714","event_version":"1.0","create_time":"2014-10-23T17:23:52Z","resource_type":"sale","event_type":"PAYMENT.SALE.COMPLETED","summary":"A successful sale payment was made for $ 0.48 USD","resource":{"id":"80021663DE681814L","create_time":"2014-10-23T17:22:56Z","update_time":"2014-10-23T17:23:04Z","amount":{"total":"0.48","currency":"USD"},"payment_mode":"ECHECK","state":"completed","protection_eligibility":"ELIGIBLE","protection_eligibility_type":"ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE","clearing_time":"2014-10-30T07:00:00Z","parent_payment":"PAY-1PA12106FU478450MKRETS4A","links":[{"href":"https://api.paypal.com/v1/payments/sale/80021663DE681814L","rel":"self","method":"GET"},{"href":"https://api.paypal.com/v1/payments/sale/80021663DE681814L/refund","rel":"refund","method":"POST"},{"href":"https://api.paypal.com/v1/payments/payment/PAY-1PA12106FU478450MKRETS4A","rel":"parent_payment","method":"GET"}]},"links":[{"href":"https://api.paypal.com/v1/notifications/webhooks-events/WH-2WR32451HC0233532-67976317FL4543714","rel":"self","method":"GET"},{"href":"https://api.paypal.com/v1/notifications/webhooks-events/WH-2WR32451HC0233532-67976317FL4543714/resend","rel":"resend","method":"POST"}]}
[2021-12-07 16:59:47] production.DEBUG: Array
(
production.DEBUG: PayPalApiVerifyWebhookSignatureResponse Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[verification_status] => FAILURE
)
)
我想从webhook响应中保存哪个用户付费、金额、时间、组等,我再说一遍,这是订阅的自动续订,所以它是自动触发的。
Mock webhook无法验证。订阅沙箱环境中的webhook并在那里生成事件,如果您希望验证它们的话。