logix-payment-shift4 1.1.4 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +3 -2
- package/dist/index.esm.js +3 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -215,7 +215,7 @@ function PaymentForm(_ref) {
|
|
|
215
215
|
initializedRef.current = true;
|
|
216
216
|
var initPayment = /*#__PURE__*/function () {
|
|
217
217
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
218
|
-
var response, _yield$response$json, publicKeys, script, _t;
|
|
218
|
+
var response, _yield$response$json, publicKeys, isProd, script, _t;
|
|
219
219
|
return _regenerator().w(function (_context) {
|
|
220
220
|
while (1) switch (_context.p = _context.n) {
|
|
221
221
|
case 0:
|
|
@@ -230,9 +230,10 @@ function PaymentForm(_ref) {
|
|
|
230
230
|
case 2:
|
|
231
231
|
_yield$response$json = _context.v;
|
|
232
232
|
publicKeys = _yield$response$json.publicKeys;
|
|
233
|
+
isProd = _yield$response$json.isProd;
|
|
233
234
|
if (!publicKeys) errorPage("Public key is empty");
|
|
234
235
|
script = document.createElement("script");
|
|
235
|
-
script.src = "https://js.dev.shift4.com/shift4.js";
|
|
236
|
+
script.src = isProd ? "https://js.shift4.com/shift4.js" : "https://js.dev.shift4.com/shift4.js";
|
|
236
237
|
script.async = true;
|
|
237
238
|
script.onload = function () {
|
|
238
239
|
if (!window.Shift4) return;
|
package/dist/index.esm.js
CHANGED
|
@@ -213,7 +213,7 @@ function PaymentForm(_ref) {
|
|
|
213
213
|
initializedRef.current = true;
|
|
214
214
|
var initPayment = /*#__PURE__*/function () {
|
|
215
215
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
216
|
-
var response, _yield$response$json, publicKeys, script, _t;
|
|
216
|
+
var response, _yield$response$json, publicKeys, isProd, script, _t;
|
|
217
217
|
return _regenerator().w(function (_context) {
|
|
218
218
|
while (1) switch (_context.p = _context.n) {
|
|
219
219
|
case 0:
|
|
@@ -228,9 +228,10 @@ function PaymentForm(_ref) {
|
|
|
228
228
|
case 2:
|
|
229
229
|
_yield$response$json = _context.v;
|
|
230
230
|
publicKeys = _yield$response$json.publicKeys;
|
|
231
|
+
isProd = _yield$response$json.isProd;
|
|
231
232
|
if (!publicKeys) errorPage("Public key is empty");
|
|
232
233
|
script = document.createElement("script");
|
|
233
|
-
script.src = "https://js.dev.shift4.com/shift4.js";
|
|
234
|
+
script.src = isProd ? "https://js.shift4.com/shift4.js" : "https://js.dev.shift4.com/shift4.js";
|
|
234
235
|
script.async = true;
|
|
235
236
|
script.onload = function () {
|
|
236
237
|
if (!window.Shift4) return;
|