Problem/Motivation
Heloo!
So, i've installed the module today. We are still testing the payment methods.
After the payment is done, there is a link to redirect to https://domain.pt/checkout/212/complete, however drupal automatically redirects to the payment page again "https://domain.pt/checkout/212/payment".
Also got an warning, not sure if it is related:
Deprecated function: Function money_format() is deprecated in Drupal\commerce_monetico\PluginForm\MoneticoPaymentForm->buildConfigurationForm() (line 74 of modules/commerce_monetico/src/PluginForm/MoneticoPaymentForm.php).
Drupal\commerce_monetico\PluginForm\MoneticoPaymentForm->buildConfigurationForm(Array, Object) (Line: 108)
Drupal\commerce_payment\Plugin\Commerce\InlineForm\PaymentGatewayForm->buildInlineForm(Array, Object) (Line: 218)
Drupal\commerce_payment\Plugin\Commerce\CheckoutPane\PaymentProcess->buildPaneForm(Array, Object, Array) (Line: 546)
Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowWithPanesBase->buildForm(Array, Object, 'payment')
call_user_func_array(Array, Array) (Line: 532)
Drupal\Core\Form\FormBuilder->retrieveForm('commerce_checkout_flow_multistep_default', Object) (Line: 278)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 219)
Drupal\Core\Form\FormBuilder->getForm(Object, 'payment') (Line: 143)
Drupal\commerce_checkout\Controller\CheckoutController->formPage(Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 578)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 717)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)Steps to reproduce
Not much, but please do tell me if you need more information.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | commerce_monetico-bad-order-redirection.patch | 2.43 KB | yom |
| #6 | commerce_monetico-money-format-deprecated.patch | 577 bytes | yom |
Comments
Comment #2
filipetakanap commentedComment #3
filipetakanap commentedComment #4
filipetakanap commentedok, i found a fix for the bad redirections here on the forum. But it still shows that warning.
Comment #5
steveoriolInside "commerce_monetico/src/PluginForm/CmcicPaymentForm.php"
"money_format" has been DEPRECATED as of PHP 7.4.0, and REMOVED as of PHP 8.0.0 (here)
So, we need to find a way to replace this function soon ;-)
Comment #6
yom commentedHi,
Since the deprecation of number_format() the module couldn't work with PHP 8.0.0,
the payment window/form doesn't show, just this error above.
I just managed to make it work by simply change this in src\PluginForm\MoneticoPaymentForm.php :
by this :
I wouldn't call myself a developer, it may be messy…
Anyway it works like a charme and the currency is well detected…
Comment #7
steveoriolThank you yom, I commited your patch.
Comment #9
yom commentedHi,
I saw that the patch for the deprecated money format has been committed, it could be great to had the patch for "Order Completion redirects again to Payment" too.
thanks
Comment #10
steveoriolOK, this needs review as well as the issue https://www.drupal.org/project/commerce_monetico/issues/3211010
The MR https://git.drupalcode.org/project/commerce_monetico/-/merge_requests/3 as the same changes that the patch #9
I will commit as soon as I have one or two positive feedback ;-)
Comment #11
steveoriol