Skip to content
Snippets Groups Projects
Commit ef8c3791 authored by Soham Sengupta's avatar Soham Sengupta Committed by Ivan Trokhanenko
Browse files

Issue #3357101 by Soham Sengupta, urvashi_vora: Fix the issues reported by phpcs

parent cdae505c
No related branches found
No related tags found
No related merge requests found
......@@ -7,4 +7,4 @@ services:
commerce_instamojo.logger.channel.instamojo_log:
parent: logger.channel_base
arguments: ['commerce_instamojo_log']
\ No newline at end of file
arguments: ['commerce_instamojo_log']
......@@ -6,7 +6,6 @@ use Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\OffsitePaymentGateway
use Drupal\Core\Form\FormStateInterface;
use Drupal\commerce_order\Entity\OrderInterface;
use Symfony\Component\HttpFoundation\Request;
use Drupal\Core\Messenger\Messenger;
use Instamojo\Instamojo;
/**
......
......@@ -14,7 +14,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
use Instamojo\Instamojo;
/**
* Class PaymentOffsiteForm.
* Provides the off-site payment form.
*
* @package Drupal\commerce_instamojo\PluginForm\OffsiteRedirect
*/
......@@ -81,6 +81,8 @@ class PaymentOffsiteForm extends BasePaymentOffsiteForm implements ContainerInje
$address = $order->getBillingProfile()->address->first();
$parameters = ['commerce_order' => $order_id, 'step' => 'payment'];
$payload = $api->paymentRequestCreate(
[
"purpose" => $config['order_prefix'] . $payment->getOrderId(),
......@@ -89,7 +91,7 @@ class PaymentOffsiteForm extends BasePaymentOffsiteForm implements ContainerInje
"send_email" => $config['send_email'],
"allow_repeated_payments" => $config['allow_repeated_payments'],
"email" => $order->getEmail(),
"redirect_url" => Url::FromRoute('commerce_payment.checkout.return', ['commerce_order' => $order_id, 'step' => 'payment'], ['absolute' => TRUE])->toString(),
"redirect_url" => Url::FromRoute('commerce_payment.checkout.return', $parameters, ['absolute' => TRUE])->toString(),
]
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment