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

Requesting payment methods not optimal #7

Closed remcotolsma closed 1 year ago

remcotolsma commented 2 years ago

To retrieve the available payment methods we currently do 6 requests:

https://github.com/pronamic/wp-pronamic-pay-mollie/blob/8444f3af6b00720ac7eb17f32d7378147671ebae/src/Gateway.php#L113-L170

https://github.com/pronamic/wp-pronamic-pay-mollie/blob/8444f3af6b00720ac7eb17f32d7378147671ebae/tests/src/GatewayTest.php#L59-L64

This is not optimal and we can simplify it in the future via, for example, https://docs.mollie.com/reference/v2/methods-api/list-all-methods.

This is also related to the following issue:

remcotolsma commented 1 year ago

This is fixed / simplified in https://github.com/pronamic/wp-pronamic-pay-mollie/commit/aba5a4fdd0d05400836df85a52178eeeb91f08b4.