vippsas / vipps-recurring-woocommerce

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

Race condition when paying for an order #33

Closed Marcuzz closed 3 years ago

Marcuzz commented 3 years ago

It is technically possible to sign a payment agreement and then create yet another payment agreement on the same order.

If this happens the latest order takes precedence and when it times out the order will be marked as cancelled in Woo. We need to somehow stop this scenario from happening

Marcuzz commented 3 years ago

Possible solution: Run the cron-job for the order before checking out if an agreementId is already set on it.