Payone Credit card workflow with pre-authorization runs twice (?)
Hello,
we are currently integrating PayOne as PSP with direct debit and credit card at the moment.
We followed the current documentation, where a PayoneCheckoutPostSavePlugin should be registered.
Its responsible for doing the authorization/ pre-authorization for credit card for example.
Also the OMS flow for credit card includes a Payone/PreAuthorize command plugin, which is doing exactly the same pre-authorize call.
And thats the problem. Doing it twice won't work for the second time and the checkout will end up in a fail whale. Payone says "reference already used" or so for the second call.
I think this is an error and pre-authorize should be excluded at least for any payment method that itself contains a pre-authorization, but i also can hardly imagine that this wasn't discovered before.
Unfortunately it seems, the integration docs are really outdated here or have massive typos.
Does somebody successfully integrated payone last time or know what i do miss?
Best regards
Best Answer
-
Thanks for reporting an issue with Payone processing.
I have checked how PayOne authorization works, and I can confirm that 2 calls one after another are causing an error during order placement.
In order to fix this issue today, I suggest you to change the OMS process in the following way:
1. add a new status - `pre-authorization requested`2. create a new transition
<transition happy="true">
<source>new</source>
<target>pre-authorization requested</target>
</transition>and update 3 transitions with the <event>pre-authorize</event>:
<transition happy="true" condition="Payone/PreAuthorizationIsApproved">
<source>pre-authorization requested</source>
<target>pre-authorization pending</target>
</transition>
<transition condition="Payone/PreAuthorizationIsError">
<source>pre-authorization requested</source>
<target>invalid</target>
</transition>
<transition condition="Payone/PreAuthorizationIsRedirect">
<source>pre-authorization requested</source>
<target>3D secure verification</target>
</transition>
This will:
1. remove consequent authorised calls, keeping the one in PostSaveHook in order to get the redirect URL (if any) and redirect the customer
2. keep the OMS process in-tact.Please make sure to update only the processes, where authorisation/pre-authorisation command is actually present.
7
Answers
-
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,056 ⚖️ - Guardians (admin)
Heyhey @ingo.kaiser ,
I hope somebody else can add their additional experience here.
What you describing does sound strange to me as well. I suggest you create a bug-ticket via the support portal so the dedicated team can have a look and provide feedback and/or a fix.
All the best,
Florian
0 -
Hi @fsmeier ,
yes, i also created a support ticket before, but wanted to max out my possibilities^^sometimes somebody faced the same situation or can give a crucial hint. :)
Best regards
1 -
Thanks for reporting an issue with Payone processing.
I have checked how PayOne authorization works, and I can confirm that 2 calls one after another are causing an error during order placement.
In order to fix this issue today, I suggest you to change the OMS process in the following way:
1. add a new status - `pre-authorization requested`2. create a new transition
<transition happy="true">
<source>new</source>
<target>pre-authorization requested</target>
</transition>and update 3 transitions with the <event>pre-authorize</event>:
<transition happy="true" condition="Payone/PreAuthorizationIsApproved">
<source>pre-authorization requested</source>
<target>pre-authorization pending</target>
</transition>
<transition condition="Payone/PreAuthorizationIsError">
<source>pre-authorization requested</source>
<target>invalid</target>
</transition>
<transition condition="Payone/PreAuthorizationIsRedirect">
<source>pre-authorization requested</source>
<target>3D secure verification</target>
</transition>
This will:
1. remove consequent authorised calls, keeping the one in PostSaveHook in order to get the redirect URL (if any) and redirect the customer
2. keep the OMS process in-tact.Please make sure to update only the processes, where authorisation/pre-authorisation command is actually present.
7 -
Thanks a lot for digging deep into that topic quickly. I applied the fix already
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 69 Spryker News
- 896 Developer Corner
- 758 Spryker Development
- 83 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 23 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 68 Spryker Safari Questions
- 50 Random