The test where the $user_id = 1, $subscription_customer_id = null, $first_payment_customer_id = 'cst_8wmqcHMN4U_first' and $expected = 'cst_8wmqcHMN4U_first' currently fails.
I think this behavior has changed because we changed the implementation of get_customer_id_for_subscription( Subscription $subscription ):
In the current version we no longer look at the 'first' payment of a subscription, the Mollie customer ID and the Mollie mandate ID are simply stored within the subscription metadata.
Therefore, we think that this test case is no longer relevant for now, if it later turns out to be the case, we can revise this issue.
We currently have a test in this library with which we test whether the search for a Mollie customer ID for a Pronamic Pay payment goes well.
https://github.com/pronamic/wp-pronamic-pay-mollie/blob/141a1d555ecac81491d942f889972b8bd8d88a95/tests/src/GatewayTest.php#L238-L316
The test where the
$user_id = 1
,$subscription_customer_id = null
,$first_payment_customer_id = 'cst_8wmqcHMN4U_first'
and$expected = 'cst_8wmqcHMN4U_first'
currently fails.I think this behavior has changed because we changed the implementation of
get_customer_id_for_subscription( Subscription $subscription )
:https://github.com/pronamic/wp-pronamic-pay-mollie/blob/29070a8f9fb2a071d48abecb36205be71c301487/src/Gateway.php#L554-L576
In the current version we no longer look at the 'first' payment of a subscription, the Mollie customer ID and the Mollie mandate ID are simply stored within the subscription metadata.
Therefore, we think that this test case is no longer relevant for now, if it later turns out to be the case, we can revise this issue.