Skip to content

Commit 15c4154

Browse files
Stripe: Minor fix for terminal checkout mode
1 parent 8067387 commit 15c4154

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Smartstore.Modules/Smartstore.Stripe/Controllers/StripeController.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,10 @@ public async Task<IActionResult> ConfirmOrder(string formData)
245245
var paymentIntentService = new PaymentIntentService();
246246
PaymentIntent paymentIntent = null;
247247

248-
var shippingOption = customer.GenericAttributes.Get<ShippingOption>(SystemCustomerAttributeNames.SelectedShippingOption, store.Id);
249-
var shipping = await GetShippingAddressAsync(customer, shippingOption.Name);
248+
var shippingOption = customer.GenericAttributes.Get<ShippingOption>(SystemCustomerAttributeNames.SelectedShippingOption, store.Id);
249+
var shipping = shippingOption != null
250+
? await GetShippingAddressAsync(customer, shippingOption.Name)
251+
: null;
250252

251253
if (state.PaymentIntent == null)
252254
{

0 commit comments

Comments
 (0)