I’m currently adding some additional features to my payment provider for takepayments in the UK. One of the features for payment providers is a FetchPaymentStatusAsync
option.
Although I can’t see any documentation on when this feature will be used. The description on the PaymentProvider settings states “Set whether to allow fetching payment status in the background”.
It’d be nice if this added some kind of refresh button in the Order Editor screen to refresh the current transaction state.
Anyone in Umbraco Commerce team able to shed some light on this one?
To be honest, this is a remnant of old payment gateways that require you to query for everything. Payment Providers with this implemented will call that method before loading the order into the order editor screen.
A much better option these days is to use the callback method as a webhook handler and have the payment gateway notify your provider when the payment status changes.
Thanks Matt, that makes sense.
I’m already using the callback handler for takepayments to handle the actual authorisation (FinalizeAtContinueUrl => false
). I’m then overriding GetContinueUrl
to return the customer to a screen where they can retry if the http response indicates the transaction wasn’t authorised.
What may be a bit different with takepayments is that the Callback URL is only used once per request to the gateway, it doesn’t continue to get called to receive updates as the transaction progresses through its lifecycle behind the scenes.
I’ve implemented the FetchPaymentStatusAsync
and CanFetchPaymentStatus => true;
enabled the setting on the payment provider itself as well but the method doesn’t get called when viewing the order in the Backoffice.
Shall I raise an issue or is this considered deprecated?
If it’s never getting called then yea, it should probably be raised as an issue as it should still be valid to use.
1 Like