medusa-payment-stripe
Advanced tools
Comparing version 1.0.14-alpha.202 to 1.0.14-alpha.203
@@ -12,4 +12,8 @@ "use strict"; | ||
var _default = /*#__PURE__*/function () { | ||
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(req, res) { | ||
var _default = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee(req, res) { | ||
var signature, event, stripeProviderService, paymentIntent, cartService, orderService, cartId, order, cart; | ||
@@ -16,0 +20,0 @@ return regeneratorRuntime.wrap(function _callee$(_context) { |
{ | ||
"name": "medusa-payment-stripe", | ||
"version": "1.0.14-alpha.202+ab4d54f", | ||
"version": "1.0.14-alpha.203+db2b5ec", | ||
"description": "Stripe Payment provider for Meduas Commerce", | ||
@@ -46,3 +46,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "ab4d54fb3ebfa6590680088b420d96d329100318" | ||
"gitHead": "db2b5ec4d30ac942b5b93bdcff557bfa54ad7a32" | ||
} |
@@ -18,3 +18,3 @@ "use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
@@ -39,4 +39,32 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _createSuper(Derived) { | ||
function isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
if (Reflect.construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
try { | ||
Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
return function () { | ||
var Super = _getPrototypeOf(Derived), | ||
result; | ||
if (isNativeReflectConstruct()) { | ||
var NewTarget = _getPrototypeOf(this).constructor; | ||
result = Reflect.construct(Super, arguments, NewTarget); | ||
} else { | ||
result = Super.apply(this, arguments); | ||
} | ||
return _possibleConstructorReturn(this, result); | ||
}; | ||
} | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
@@ -46,4 +74,2 @@ | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
@@ -53,3 +79,5 @@ | ||
var StripeProviderService = /*#__PURE__*/function (_PaymentService) { | ||
var StripeProviderService = | ||
/*#__PURE__*/ | ||
function (_PaymentService) { | ||
_inherits(StripeProviderService, _PaymentService); | ||
@@ -105,3 +133,5 @@ | ||
value: function () { | ||
var _getStatus = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(paymentData) { | ||
var _getStatus = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee(paymentData) { | ||
var id, paymentIntent, status; | ||
@@ -185,3 +215,5 @@ return regeneratorRuntime.wrap(function _callee$(_context) { | ||
value: function () { | ||
var _retrieveSavedMethods = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(customer) { | ||
var _retrieveSavedMethods = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee2(customer) { | ||
var methods; | ||
@@ -233,3 +265,5 @@ return regeneratorRuntime.wrap(function _callee2$(_context2) { | ||
value: function () { | ||
var _retrieveCustomer = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(customerId) { | ||
var _retrieveCustomer = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee3(customerId) { | ||
return regeneratorRuntime.wrap(function _callee3$(_context3) { | ||
@@ -272,3 +306,5 @@ while (1) { | ||
value: function () { | ||
var _createCustomer = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(customer) { | ||
var _createCustomer = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee4(customer) { | ||
var stripeCustomer; | ||
@@ -332,4 +368,6 @@ return regeneratorRuntime.wrap(function _callee4$(_context4) { | ||
value: function () { | ||
var _createPayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(cart) { | ||
var customer_id, region_id, email, _yield$this$regionSer, currency_code, amount, intentRequest, _customer$metadata, customer, stripeCustomer, _stripeCustomer, paymentIntent; | ||
var _createPayment = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee5(cart) { | ||
var customer_id, region_id, email, _ref2, currency_code, amount, intentRequest, _customer$metadata, customer, stripeCustomer, _stripeCustomer, paymentIntent; | ||
@@ -345,4 +383,4 @@ return regeneratorRuntime.wrap(function _callee5$(_context5) { | ||
case 3: | ||
_yield$this$regionSer = _context5.sent; | ||
currency_code = _yield$this$regionSer.currency_code; | ||
_ref2 = _context5.sent; | ||
currency_code = _ref2.currency_code; | ||
_context5.next = 7; | ||
@@ -374,3 +412,3 @@ return this.totalsService_.getTotal(cart); | ||
if (!((_customer$metadata = customer.metadata) === null || _customer$metadata === void 0 ? void 0 : _customer$metadata.stripe_id)) { | ||
if (!((_customer$metadata = customer.metadata) !== null && _customer$metadata !== void 0 && _customer$metadata.stripe_id)) { | ||
_context5.next = 17; | ||
@@ -440,3 +478,5 @@ break; | ||
value: function () { | ||
var _retrievePayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(data) { | ||
var _retrievePayment = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee6(data) { | ||
return regeneratorRuntime.wrap(function _callee6$(_context6) { | ||
@@ -477,3 +517,5 @@ while (1) { | ||
value: function () { | ||
var _getPaymentData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(sessionData) { | ||
var _getPaymentData = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee7(sessionData) { | ||
return regeneratorRuntime.wrap(function _callee7$(_context7) { | ||
@@ -516,3 +558,5 @@ while (1) { | ||
value: function () { | ||
var _authorizePayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(sessionData) { | ||
var _authorizePayment = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee8(sessionData) { | ||
var context, | ||
@@ -559,3 +603,5 @@ stat, | ||
value: function () { | ||
var _updatePaymentData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(sessionData, update) { | ||
var _updatePaymentData = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee9(sessionData, update) { | ||
return regeneratorRuntime.wrap(function _callee9$(_context9) { | ||
@@ -597,3 +643,5 @@ while (1) { | ||
value: function () { | ||
var _updatePayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(sessionData, cart) { | ||
var _updatePayment = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee10(sessionData, cart) { | ||
var _cart$customer, _cart$customer$metada, stripeId; | ||
@@ -654,3 +702,5 @@ | ||
value: function () { | ||
var _deletePayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(payment) { | ||
var _deletePayment = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee11(payment) { | ||
var id; | ||
@@ -700,3 +750,5 @@ return regeneratorRuntime.wrap(function _callee11$(_context11) { | ||
value: function () { | ||
var _updatePaymentIntentCustomer = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(paymentIntentId, customerId) { | ||
var _updatePaymentIntentCustomer = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee12(paymentIntentId, customerId) { | ||
return regeneratorRuntime.wrap(function _callee12$(_context12) { | ||
@@ -739,3 +791,5 @@ while (1) { | ||
value: function () { | ||
var _capturePayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(payment) { | ||
var _capturePayment = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee13(payment) { | ||
var id; | ||
@@ -779,3 +833,5 @@ return regeneratorRuntime.wrap(function _callee13$(_context13) { | ||
value: function () { | ||
var _refundPayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(payment, amountToRefund) { | ||
var _refundPayment = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee14(payment, amountToRefund) { | ||
var id; | ||
@@ -825,3 +881,5 @@ return regeneratorRuntime.wrap(function _callee14$(_context14) { | ||
value: function () { | ||
var _cancelPayment = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(payment) { | ||
var _cancelPayment = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee15(payment) { | ||
var id; | ||
@@ -828,0 +886,0 @@ return regeneratorRuntime.wrap(function _callee15$(_context15) { |
@@ -20,3 +20,5 @@ "use strict"; | ||
var CartSubscriber = /*#__PURE__*/function () { | ||
var CartSubscriber = | ||
/*#__PURE__*/ | ||
function () { | ||
function CartSubscriber(_ref) { | ||
@@ -36,4 +38,8 @@ var _this = this; | ||
this.eventBus_ = eventBusService; | ||
this.eventBus_.subscribe("cart.customer_updated", /*#__PURE__*/function () { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(cart) { | ||
this.eventBus_.subscribe("cart.customer_updated", | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref2 = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee(cart) { | ||
return regeneratorRuntime.wrap(function _callee$(_context) { | ||
@@ -63,3 +69,5 @@ while (1) { | ||
value: function () { | ||
var _onCustomerUpdated = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(cartId) { | ||
var _onCustomerUpdated = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee2(cartId) { | ||
var _cart$payment_session; | ||
@@ -81,3 +89,3 @@ | ||
if ((_cart$payment_session = cart.payment_sessions) === null || _cart$payment_session === void 0 ? void 0 : _cart$payment_session.length) { | ||
if ((_cart$payment_session = cart.payment_sessions) !== null && _cart$payment_session !== void 0 && _cart$payment_session.length) { | ||
_context2.next = 5; | ||
@@ -84,0 +92,0 @@ break; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
57693
1405