vippsas / vipps-recurring-woocommerce

Vipps Recurring payments for WooCommerce
GNU Affero General Public License v3.0
6 stars 4 forks source link

A few bugs regarding Vipps' new retry logic #11

Closed Marcuzz closed 4 years ago

Marcuzz commented 4 years ago

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

Marcuzz commented 4 years ago

I've been informed both of these cases should no longer be possible in Vipps itself