fix: paypal approve

This commit is contained in:
arcbtc
2026-05-08 03:10:04 +01:00
parent 8b426efa3e
commit d95babc750
4 changed files with 171 additions and 10 deletions
+10 -1
View File
@@ -82,13 +82,22 @@ async def test_callback_api_handles_paid_events_with_real_payments(mocker):
)
await handle_paypal_event(
{
"id": "evt_paypal",
"id": "evt_paypal_approved",
"event_type": "CHECKOUT.ORDER.APPROVED",
"resource": {
"purchase_units": [{"invoice_id": payment.payment_hash}],
},
}
)
await handle_paypal_event(
{
"id": "evt_paypal",
"event_type": "PAYMENT.CAPTURE.COMPLETED",
"resource": {
"purchase_units": [{"invoice_id": payment.payment_hash}],
},
}
)
await handle_stripe_event({"id": "evt_unhandled", "type": "customer.created"})
assert fiat_status_mock.await_count == 2