pronamic / wp-pronamic-pay-mollie

Mollie driver for the WordPress payment processing library.
http://www.wp-pay.org/gateways/mollie/
6 stars 1 forks source link

Ignore non-existing customers when determining customer ID #47

Open rvdsteege opened 3 months ago

rvdsteege commented 3 months ago

On payment start, we try to use the first existing Mollie customer ID:

https://github.com/pronamic/wp-pronamic-pay-mollie/blob/1948c7f3407fe213b7a90fa46cc7a0d8a869c923/src/Gateway.php#L1748-L1754

https://github.com/pronamic/wp-pronamic-pay-mollie/blob/1948c7f3407fe213b7a90fa46cc7a0d8a869c923/src/Gateway.php#L1835-L1855

Mollie returns the HTTP 410 'Gone' status if a customer does not exist anymore and we then ignore this customer ID. However, we do not store this permanent status and next time we test again for the existence of this customer ID.

_I just ran into timeout issues in a development environment because of this. Manually truncating the wp_pronamic_pay_mollie_* database tables resolved the issue._

CC @remcotolsma