-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple Adyen payments for single Pronamic Pay payment #1
Comments
In pronamic/wp-pronamic-pay#289 we discovered that notifications can trigger payment status updates on the wrong subsite in a multisite, if the merchant reference (Pronamic Pay payment ID) is the same across sites and all sites are receiving the same notifications from Adyen (that is, no differentiation across sites through merchant accounts). To resolve that issue, we need the single Adyen transaction for a Pronamic Pay payment (this issue) and make sure to check if the |
This is not possible anymore since #6. An other idea would be to add the site ID as metadata in a multisite environment and make sure it matches the current site ID when handling notification items. |
Discussed at Pronamic HQ: <?php
$network_id = '1';
$blog_id = '3';
$payment_id = '98765';
$reference = sprintf( '%s-%s-%s', $network_id, $blog_id, $payment_id );
var_dump( $reference );
list( $scan_network_id, $scan_blog_id, $scan_payment_id ) = sscanf( $reference, '%d-%d-%d' );
var_dump( $scan_network_id );
var_dump( $scan_blog_id );
var_dump( $scan_payment_id ); |
On further exploration it became clear that including transaction metadata in notifications would require additional configuration in the webhook settings and is only available for payments using 3D Secure. Because of the above, we chose to extend the merchant reference with network and blog IDs in 1ae804b. As we now need 'multiple references' within the reference, we opted for the format
|
Our current implementation of the Adyen drop-in can result in multiple payments at Adyen for a single Pronamic Pay payment. This is probably undesired as this is the only gateway integration where this is possible.
Multiple payments can occur in for example the following cases:
This previously also resulted in an issue with a failed payment updating a later successfully paid payment in pronamic/wp-pronamic-pay#245.
The text was updated successfully, but these errors were encountered: