Payments. Need to set custom transaction reference if total to pay is 0
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Payments. Need to set custom transaction reference if total to pay is 0
Hi.
I have implemented a payment provider, and I need to handle the case where the order is paid in full by a voucher, ie 0 to pay.
I've read through this thread: viewtopic.php?f=15&t=3717&p=14812&hilit ... ero#p14812 and understand that the Standard.php in the aimeos vendor folder client/html/src/Client/Html/Checkout/Standard/Process/ controls this by returning null in that case and setting payment status to authorized, and through this bypasses the process code in the custom payment provider which would otherwise setup the payment form etc.
This is fine, but in the thank you page I end up at, the transactionReference that I normally get from the payment call is missing since the call is never performed. To solve this, I need to set a custom transaction reference, but can't figure out how to do that since the payment provider class is skipped in this case.
My thought was to override the Standard.php and solving it in there, tried it by adding it to the ext/<name>/client/html/src/Client/Html/Checkout/Standard/Process/ folder , just as with templates etc, but it never gets called. Only the one in the aimeos vendor path is called
How should I go about this in a simple way?
I have implemented a payment provider, and I need to handle the case where the order is paid in full by a voucher, ie 0 to pay.
I've read through this thread: viewtopic.php?f=15&t=3717&p=14812&hilit ... ero#p14812 and understand that the Standard.php in the aimeos vendor folder client/html/src/Client/Html/Checkout/Standard/Process/ controls this by returning null in that case and setting payment status to authorized, and through this bypasses the process code in the custom payment provider which would otherwise setup the payment form etc.
This is fine, but in the thank you page I end up at, the transactionReference that I normally get from the payment call is missing since the call is never performed. To solve this, I need to set a custom transaction reference, but can't figure out how to do that since the payment provider class is skipped in this case.
My thought was to override the Standard.php and solving it in there, tried it by adding it to the ext/<name>/client/html/src/Client/Html/Checkout/Standard/Process/ folder , just as with templates etc, but it never gets called. Only the one in the aimeos vendor path is called
How should I go about this in a simple way?
_____________
Laravel 8 with Aimeos 2021.10.7 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25
Laravel 8 with Aimeos 2021.10.7 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25
Re: Payments. Need to set custom transaction reference if total to pay is 0
Why don't you just test for the transation reference parameter and if it's not there, do nothing?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star