Klarna clean up

This commit is contained in:
Sebastian Rindom committed 2020-07-11 16:32:05 +02:00
commit 419d5db340
27 files changed
+331 -139

No files matched your search

@@ -105,7 +105,7 @@ class StripeProviderService extends PaymentService {
amount: amount * 100, // Stripe amount is in cents
currency: currency_code,
capture_method: "manual",
metadata: { cart_id: cart._id },
metadata: { cart_id: `${cart._id}` },
})
return paymentIntent
@@ -113,12 +113,11 @@ class StripeProviderService extends PaymentService {
/**
* Retrieves Stripe PaymentIntent.
* @param {string} cart - the cart to retrieve payment intent for
* @param {object} data - the data of the payment to retrieve
* @returns {Object} Stripe PaymentIntent
*/
async retrievePayment(cart) {
async retrievePayment(data) {
try {
const { data } = cart.payment_method
return this.stripe_.paymentIntents.retrieve(data.id)
} catch (error) {
throw error