Open Yondz opened 7 years ago
Hi @Yondz
i wonder if inserting multiple forms is the way to go, are you forced to use that behaviour ?
Is it to enhance the UX ?
Hi @acidjames
I know it is not the way this bundle was designed for, but I need to instanciate several pre-configured payment buttons on the same page (VISA, Mastercard, CB, ..), and thus set PBX_TYPECARTE var to the proper value -> generate the PBX_HMAC for each button.
This way the user goes directly to the pre-configured payment method.
Yondz
Hi @Yondz
i've never used the VISA, MASTERCARD variables, i have only been using CB, does it make any difference ? (if you have looked into the docs)
Hi,
I found a small issue when I tried to generate several forms for one page (one form per payment type), the field PBX_HMAC is not regenerated for each form.
It seems that once the service has been called and a form generated, this parameter is set for the execution lifetime, due to this if condition in Lexik\Bundle\PayboxBundle\Paybox\System\Base\Request (line 129-133) :
To overcome this, I extended this class in my app by adding this parameter
And commented the condition like this :
It works well :)
Btw, I also had to extend \Lexik\Bundle\PayboxBundle\Paybox\System\Base\ParameterResolver for another reason, the value "ANCV" was not allowed in the PBX_TYPECARTE options, since the ParameterResolver is manually instanciated in Request::getParameters().
Yondz