We got a payment failure (3DS) ; the payment was created as new with the amount of zero but the order was placed because of the miss of a DeclineException in the gateway to avoid the checkout to reach the complete checkout step.
Issue fork commerce_payplug-3515023
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
nicolasgraphThis would need tests.
Waiting #3515036 to be fixed.Comment #4
nicolasgraphManual tests failed. The order is still placed.Comment #6
nicolasgraphOk, I get it, in my failing manual test case,
onNotify()is not called, the payment is managed throughonReturn()which do... nothing.While the payment entity creation can be managed by
onNotify()only, the remote payment validation must be processed byonReturn()too to throw theDeclineExceptionin case of failure.Comment #9
nicolasgraphI confirm the current MR state do fix my issue in live mode.
Still needs attention and ideally, some tests.
Comment #10
dom. commentedI have added a 5.x branch with Commerce 3.x support on Drupal 11 and also updating the underneath Payplug library to the latest (3.6.0). There may be something fixed on there side for this.
I created a brand new Commerce Kickstart env with Commerce Payplug on Commerce 3.x and tried the basics: anonymous cart payment both with a valid Visa card and a failing DS MasterCard and both scenarios worked as expected (I was blocked at offsite payment gate using the mastercard)
Test cards available here: https://docs.payplug.com/api/apiref.html#api-testing
Could you have a new try with those updates and let me know how to reproduce otherwise ?
Comment #11
dom. commentedComment #12
nicolasgraphThanks for your reply @dom.
Unfortunatly I was not able to reproduce the bug in test mode.
In test mode, I'm not redirected to the site on payment failure, while in live mode I am.
The 5.x branch do not fix the issue bescause
onReturn()is still empty and that's the method called when Payplug redirects to the site in my case.Also I didn't try the v3 but I suspect #3295358 to be a duplicate.
Comment #13
nicolasgraphMerging 5.x introduced errors ; waiting #3428466 to land before to continue.
Comment #15
nicolasgraphComment #16
nicolasgraphComment #17
nicolasgraphWe get the following error on return:
Indeed, the payload was empty for this payment return.I guess we need to retrieve the remote payment to truly validate its status on return, as done in the Magento module.
This mean we need to create the payment entity early, from the remote payment creation response, to store the remote ID to request later on.
Comment #18
nicolasgraphError described in #17 may be caused by a server error we fixed ; last orders were placed with no error.
I keep an eye on this to fix or merge asap.
Comment #19
nicolasgraphComment #20
maetvatech commentedComment #22
nicolasgraph