hotfix(paypal): create new payment session if update fails (#186)
This commit is contained in:
@@ -30,6 +30,11 @@ export default async (req, res) => {
|
||||
const purchaseUnit = order.purchase_units[0]
|
||||
const cartId = purchaseUnit.custom_id
|
||||
|
||||
if (!cartId) {
|
||||
res.sendStatus(200)
|
||||
return
|
||||
}
|
||||
|
||||
const manager = req.scope.resolve("manager")
|
||||
const cartService = req.scope.resolve("cartService")
|
||||
const orderService = req.scope.resolve("orderService")
|
||||
|
||||
@@ -206,7 +206,7 @@ class PayPalProviderService extends PaymentService {
|
||||
|
||||
return sessionData
|
||||
} catch (error) {
|
||||
throw error
|
||||
return this.createPayment(cart)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user