It is now possible for a charge to move from FAILED to CHARGED, currently this leaves the order as "failed" in Woo because we do not check charges after they have been registered as FAILED.
There are a few ways we can fix this, but at the moment I think the best way to do this is to set a flag on failed orders which will tick down and retry at least 5 times. Afterwards it should remove the flag and consider this charge as actually failed.
UPDATE: The above "bug" is apparently not intended behaviour in Vipps as it breaks state management of a charge in this plugin and probably in a lot of other implementations. It should hopefully be fixed soon.
Another case I have seen is the confusing case in which an agreement can be PENDING when initialCharge has failed, thus the plugin will try to charge it one more time before marking the agreement as FAILED. This could be fixed by simply not adding the note for "pending charge created" if the charge is immediately marked as FAILED
It is now possible for a charge to move from
FAILED
toCHARGED
, currently this leaves the order as "failed" in Woo because we do not check charges after they have been registered asFAILED
.There are a few ways we can fix this, but at the moment I think the best way to do this is to set a flag on failed orders which will tick down and retry at least 5 times. Afterwards it should remove the flag and consider this charge as actually failed.
UPDATE: The above "bug" is apparently not intended behaviour in Vipps as it breaks state management of a charge in this plugin and probably in a lot of other implementations. It should hopefully be fixed soon.
Another case I have seen is the confusing case in which an agreement can be PENDING when initialCharge has failed, thus the plugin will try to charge it one more time before marking the agreement as
FAILED
. This could be fixed by simply not adding the note for "pending charge created" if the charge is immediately marked asFAILED