Plugin not yet compatible with latest SDK Version? Problems with unpaid CC order
-
We switched to SDK 3.5 but callbacks made to the wp/woo api are different, than what this plugin expects (check the proceess_payment method). Did the API payload change or is this a general plugin error?
- the plugin expects resultCode, Adyen sends eventCode. So since that field isn’t present always, order might be marked as paid for although they really aren’t.
- Example: Adyen sends a response with eventCode:AUTHORISATION and success:false, but the plugin ignores this failed.
I think one needs to check for success:true or at least check if the $result[‘resultCode] is set.
as an improvement suggestion or enhancement, I would like to request some sort of database logging. This could be easily added by modifying the PGAWC_Adyen_Logger:log method and adding the necessary maybe_create_table to the plugin activation.
That said, it would be nice to log the API calls made from WC as well as the Notifications received from Adyen (which is what I did in order to being able to debug something)
global $wpdb; if (is_object($message)) { $message = serialize($message); } if (is_array($message)) { $message = json_encode($message, 384); } error_log($message); $now = new \DateTimeImmutable('now', new \DateTimeZone(get_option('timezone_string'))); $wpdb->insert('wp_adyen_log', ['request' => $message, 'created_at' => $now->format('c')]);
Edit: I saw that the web hooks are stored to _woocommerce_adyen_payment_data but it seems here too the success field, that the handle() method validates is missing.
Kind regards.
- The topic ‘Plugin not yet compatible with latest SDK Version? Problems with unpaid CC order’ is closed to new replies.