File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -171,17 +171,17 @@ public function getPaymentFormHtml(array $params): ?string
171
171
172
172
$ view ->registerScript ('' , View::POS_END , ['src ' => 'https://js.stripe.com/v3/ ' ]); // we need this to load at end of body
173
173
174
- $ templatePath = ($ params ['paymentFormType ' ] == self ::PAYMENT_FORM_TYPE_CHECKOUT )
175
- ? 'commerce-stripe/paymentForms/checkoutForm '
176
- : 'commerce-stripe/paymentForms/elementsForm ' ;
177
-
178
174
if ($ params ['paymentFormType ' ] == self ::PAYMENT_FORM_TYPE_ELEMENTS ) {
179
175
$ view ->registerAssetBundle (ElementsFormAsset::class);
180
176
}
181
177
182
178
// Template mode needs to be CP for the payment form to work
183
179
$ view ->setTemplateMode (View::TEMPLATE_MODE_CP );
184
180
181
+ $ templatePath = ($ params ['paymentFormType ' ] == self ::PAYMENT_FORM_TYPE_CHECKOUT )
182
+ ? 'commerce-stripe/paymentForms/checkoutForm '
183
+ : 'commerce-stripe/paymentForms/elementsForm ' ;
184
+
185
185
$ html = $ view ->renderTemplate ($ templatePath , $ params );
186
186
187
187
$ view ->setTemplateMode ($ previousMode );
@@ -227,7 +227,7 @@ public function completePurchase(Transaction $transaction): RequestResponseInter
227
227
$ paymentIntentOptions = [
228
228
'expand ' => ['payment_method ' ],
229
229
];
230
-
230
+
231
231
if ($ data ['object ' ] == 'payment_intent ' ) {
232
232
$ paymentIntent = $ this ->getStripeClient ()->paymentIntents ->retrieve ($ data ['id ' ], $ paymentIntentOptions );
233
233
} else {
You can’t perform that action at this time.
0 commit comments