Aways check if has coupon code in the request.
This commit is contained in:
parent
a471cb4021
commit
04940f040b
|
@ -180,7 +180,10 @@ class PaymentController extends Controller
|
||||||
|
|
||||||
$paymentGatewayExtension = ExtensionHelper::getExtensionClass($paymentGateway);
|
$paymentGatewayExtension = ExtensionHelper::getExtensionClass($paymentGateway);
|
||||||
$redirectUrl = $paymentGatewayExtension::getRedirectUrl($payment, $shopProduct, $totalPriceString);
|
$redirectUrl = $paymentGatewayExtension::getRedirectUrl($payment, $shopProduct, $totalPriceString);
|
||||||
event(new CouponUsedEvent($couponCode));
|
|
||||||
|
if ($couponCode) {
|
||||||
|
event(new CouponUsedEvent($couponCode));
|
||||||
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Log::error($e->getMessage());
|
Log::error($e->getMessage());
|
||||||
return redirect()->route('store.index')->with('error', __('Oops, something went wrong! Please try again later.'));
|
return redirect()->route('store.index')->with('error', __('Oops, something went wrong! Please try again later.'));
|
||||||
|
|
Loading…
Reference in a new issue