@paystack/checkout-js 1.15.0-dev.6 → 1.16.0-dev.1

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/es/checkout.js CHANGED
@@ -1224,7 +1224,7 @@ var fails$q = fails$t;
1224
1224
  var classof$a = classofRaw$1;
1225
1225
 
1226
1226
  var Object$5 = global$Q.Object;
1227
- var split$3 = uncurryThis$t(''.split);
1227
+ var split$4 = uncurryThis$t(''.split);
1228
1228
 
1229
1229
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
1230
1230
  var indexedObject = fails$q(function () {
@@ -1232,7 +1232,7 @@ var indexedObject = fails$q(function () {
1232
1232
  // eslint-disable-next-line no-prototype-builtins -- safe
1233
1233
  return !Object$5('z').propertyIsEnumerable(0);
1234
1234
  }) ? function (it) {
1235
- return classof$a(it) == 'String' ? split$3(it, '') : Object$5(it);
1235
+ return classof$a(it) == 'String' ? split$4(it, '') : Object$5(it);
1236
1236
  } : Object$5;
1237
1237
 
1238
1238
  var global$P = global$R;
@@ -2274,7 +2274,7 @@ var classof$7 = classofRaw$1;
2274
2274
  // `IsArray` abstract operation
2275
2275
  // https://tc39.es/ecma262/#sec-isarray
2276
2276
  // eslint-disable-next-line es/no-array-isarray -- safe
2277
- var isArray$8 = Array.isArray || function isArray(argument) {
2277
+ var isArray$9 = Array.isArray || function isArray(argument) {
2278
2278
  return classof$7(argument) == 'Array';
2279
2279
  };
2280
2280
 
@@ -2372,7 +2372,7 @@ var isConstructor$3 = !construct || fails$h(function () {
2372
2372
  }) ? isConstructorLegacy : isConstructorModern;
2373
2373
 
2374
2374
  var global$u = global$R;
2375
- var isArray$7 = isArray$8;
2375
+ var isArray$8 = isArray$9;
2376
2376
  var isConstructor$2 = isConstructor$3;
2377
2377
  var isObject$8 = isObject$h;
2378
2378
  var wellKnownSymbol$f = wellKnownSymbol$j;
@@ -2384,10 +2384,10 @@ var Array$3 = global$u.Array;
2384
2384
  // https://tc39.es/ecma262/#sec-arrayspeciescreate
2385
2385
  var arraySpeciesConstructor$1 = function (originalArray) {
2386
2386
  var C;
2387
- if (isArray$7(originalArray)) {
2387
+ if (isArray$8(originalArray)) {
2388
2388
  C = originalArray.constructor;
2389
2389
  // cross-realm fallback
2390
- if (isConstructor$2(C) && (C === Array$3 || isArray$7(C.prototype))) C = undefined;
2390
+ if (isConstructor$2(C) && (C === Array$3 || isArray$8(C.prototype))) C = undefined;
2391
2391
  else if (isObject$8(C)) {
2392
2392
  C = C[SPECIES$4];
2393
2393
  if (C === null) C = undefined;
@@ -2426,7 +2426,7 @@ var arrayMethodHasSpeciesSupport$3 = function (METHOD_NAME) {
2426
2426
  var $$h = _export;
2427
2427
  var global$t = global$R;
2428
2428
  var fails$f = fails$t;
2429
- var isArray$6 = isArray$8;
2429
+ var isArray$7 = isArray$9;
2430
2430
  var isObject$7 = isObject$h;
2431
2431
  var toObject$6 = toObject$8;
2432
2432
  var lengthOfArrayLike$4 = lengthOfArrayLike$7;
@@ -2455,7 +2455,7 @@ var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$2('concat');
2455
2455
  var isConcatSpreadable = function (O) {
2456
2456
  if (!isObject$7(O)) return false;
2457
2457
  var spreadable = O[IS_CONCAT_SPREADABLE];
2458
- return spreadable !== undefined ? !!spreadable : isArray$6(O);
2458
+ return spreadable !== undefined ? !!spreadable : isArray$7(O);
2459
2459
  };
2460
2460
 
2461
2461
  var FORCED$4 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
@@ -3454,7 +3454,7 @@ function isPublicKey(value) {
3454
3454
  function isValidEmail(value) {
3455
3455
  return /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(value);
3456
3456
  }
3457
- function isArray$5(value) {
3457
+ function isArray$6(value) {
3458
3458
  return value instanceof Array;
3459
3459
  }
3460
3460
  function isInteger(value) {
@@ -3502,7 +3502,7 @@ var fields = {
3502
3502
  },
3503
3503
  channels: {
3504
3504
  required: false,
3505
- isValid: isArray$5
3505
+ isValid: isArray$6
3506
3506
  },
3507
3507
  currency: {
3508
3508
  required: false,
@@ -7137,7 +7137,7 @@ var charCodeAt$1 = uncurryThis$4(''.charCodeAt);
7137
7137
  var join$2 = uncurryThis$4([].join);
7138
7138
  var push$4 = uncurryThis$4([].push);
7139
7139
  var replace$4 = uncurryThis$4(''.replace);
7140
- var split$2 = uncurryThis$4(''.split);
7140
+ var split$3 = uncurryThis$4(''.split);
7141
7141
  var toLowerCase$1 = uncurryThis$4(''.toLowerCase);
7142
7142
 
7143
7143
  /**
@@ -7284,7 +7284,7 @@ var encode$2 = function (input) {
7284
7284
 
7285
7285
  var stringPunycodeToAscii = function (input) {
7286
7286
  var encoded = [];
7287
- var labels = split$2(replace$4(toLowerCase$1(input), regexSeparators, '\u002E'), '.');
7287
+ var labels = split$3(replace$4(toLowerCase$1(input), regexSeparators, '\u002E'), '.');
7288
7288
  var i, label;
7289
7289
  for (i = 0; i < labels.length; i++) {
7290
7290
  label = labels[i];
@@ -7344,7 +7344,7 @@ var push$3 = uncurryThis$3([].push);
7344
7344
  var replace$3 = uncurryThis$3(''.replace);
7345
7345
  var shift$1 = uncurryThis$3([].shift);
7346
7346
  var splice = uncurryThis$3([].splice);
7347
- var split$1 = uncurryThis$3(''.split);
7347
+ var split$2 = uncurryThis$3(''.split);
7348
7348
  var stringSlice$1 = uncurryThis$3(''.slice);
7349
7349
 
7350
7350
  var plus = /\+/g;
@@ -7449,13 +7449,13 @@ URLSearchParamsState.prototype = {
7449
7449
  },
7450
7450
  parseQuery: function (query) {
7451
7451
  if (query) {
7452
- var attributes = split$1(query, '&');
7452
+ var attributes = split$2(query, '&');
7453
7453
  var index = 0;
7454
7454
  var attribute, entry;
7455
7455
  while (index < attributes.length) {
7456
7456
  attribute = attributes[index++];
7457
7457
  if (attribute.length) {
7458
- entry = split$1(attribute, '=');
7458
+ entry = split$2(attribute, '=');
7459
7459
  push$3(this.entries, {
7460
7460
  key: deserialize(shift$1(entry)),
7461
7461
  value: deserialize(join$1(entry, '='))
@@ -7717,7 +7717,7 @@ var pop = uncurryThis$2([].pop);
7717
7717
  var push$2 = uncurryThis$2([].push);
7718
7718
  var replace$2 = uncurryThis$2(''.replace);
7719
7719
  var shift = uncurryThis$2([].shift);
7720
- var split = uncurryThis$2(''.split);
7720
+ var split$1 = uncurryThis$2(''.split);
7721
7721
  var stringSlice = uncurryThis$2(''.slice);
7722
7722
  var toLowerCase = uncurryThis$2(''.toLowerCase);
7723
7723
  var unshift = uncurryThis$2([].unshift);
@@ -7745,7 +7745,7 @@ var EOF;
7745
7745
 
7746
7746
  // https://url.spec.whatwg.org/#ipv4-number-parser
7747
7747
  var parseIPv4 = function (input) {
7748
- var parts = split(input, '.');
7748
+ var parts = split$1(input, '.');
7749
7749
  var partsLength, numbers, index, part, radix, number, ipv4;
7750
7750
  if (parts.length && parts[parts.length - 1] == '') {
7751
7751
  parts.length--;
@@ -8744,7 +8744,7 @@ var toString = Object.prototype.toString;
8744
8744
  * @param {Object} val The value to test
8745
8745
  * @returns {boolean} True if value is an Array, otherwise false
8746
8746
  */
8747
- function isArray$4(val) {
8747
+ function isArray$5(val) {
8748
8748
  return toString.call(val) === '[object Array]';
8749
8749
  }
8750
8750
 
@@ -8971,7 +8971,7 @@ function forEach(obj, fn) {
8971
8971
  obj = [obj];
8972
8972
  }
8973
8973
 
8974
- if (isArray$4(obj)) {
8974
+ if (isArray$5(obj)) {
8975
8975
  // Iterate over array values
8976
8976
  for (var i = 0, l = obj.length; i < l; i++) {
8977
8977
  fn.call(null, obj[i], i, obj);
@@ -9010,7 +9010,7 @@ function merge$1(/* obj1, obj2, obj3, ... */) {
9010
9010
  result[key] = merge$1(result[key], val);
9011
9011
  } else if (isPlainObject(val)) {
9012
9012
  result[key] = merge$1({}, val);
9013
- } else if (isArray$4(val)) {
9013
+ } else if (isArray$5(val)) {
9014
9014
  result[key] = val.slice();
9015
9015
  } else {
9016
9016
  result[key] = val;
@@ -9056,7 +9056,7 @@ function stripBOM(content) {
9056
9056
  }
9057
9057
 
9058
9058
  var utils$g = {
9059
- isArray: isArray$4,
9059
+ isArray: isArray$5,
9060
9060
  isArrayBuffer: isArrayBuffer,
9061
9061
  isBuffer: isBuffer$1,
9062
9062
  isFormData: isFormData,
@@ -10537,7 +10537,7 @@ axios$2.exports.default = axios$1;
10537
10537
  var axios = axios$2.exports;
10538
10538
 
10539
10539
  var has$2 = Object.prototype.hasOwnProperty;
10540
- var isArray$3 = Array.isArray;
10540
+ var isArray$4 = Array.isArray;
10541
10541
 
10542
10542
  var hexTable = (function () {
10543
10543
  var array = [];
@@ -10553,7 +10553,7 @@ var compactQueue = function compactQueue(queue) {
10553
10553
  var item = queue.pop();
10554
10554
  var obj = item.obj[item.prop];
10555
10555
 
10556
- if (isArray$3(obj)) {
10556
+ if (isArray$4(obj)) {
10557
10557
  var compacted = [];
10558
10558
 
10559
10559
  for (var j = 0; j < obj.length; ++j) {
@@ -10584,11 +10584,11 @@ var merge = function merge(target, source, options) {
10584
10584
  }
10585
10585
 
10586
10586
  if (typeof source !== 'object') {
10587
- if (isArray$3(target)) {
10587
+ if (isArray$4(target)) {
10588
10588
  target.push(source);
10589
10589
  } else if (target && typeof target === 'object') {
10590
10590
  if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
10591
- target[source] = true;
10591
+ target[source] = true; // eslint-disable-line no-param-reassign
10592
10592
  }
10593
10593
  } else {
10594
10594
  return [target, source];
@@ -10602,21 +10602,21 @@ var merge = function merge(target, source, options) {
10602
10602
  }
10603
10603
 
10604
10604
  var mergeTarget = target;
10605
- if (isArray$3(target) && !isArray$3(source)) {
10605
+ if (isArray$4(target) && !isArray$4(source)) {
10606
10606
  mergeTarget = arrayToObject(target, options);
10607
10607
  }
10608
10608
 
10609
- if (isArray$3(target) && isArray$3(source)) {
10609
+ if (isArray$4(target) && isArray$4(source)) {
10610
10610
  source.forEach(function (item, i) {
10611
10611
  if (has$2.call(target, i)) {
10612
10612
  var targetItem = target[i];
10613
10613
  if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
10614
- target[i] = merge(targetItem, item, options);
10614
+ target[i] = merge(targetItem, item, options); // eslint-disable-line no-param-reassign
10615
10615
  } else {
10616
10616
  target.push(item);
10617
10617
  }
10618
10618
  } else {
10619
- target[i] = item;
10619
+ target[i] = item; // eslint-disable-line no-param-reassign
10620
10620
  }
10621
10621
  });
10622
10622
  return target;
@@ -10626,9 +10626,9 @@ var merge = function merge(target, source, options) {
10626
10626
  var value = source[key];
10627
10627
 
10628
10628
  if (has$2.call(acc, key)) {
10629
- acc[key] = merge(acc[key], value, options);
10629
+ acc[key] = merge(acc[key], value, options); // eslint-disable-line no-param-reassign
10630
10630
  } else {
10631
- acc[key] = value;
10631
+ acc[key] = value; // eslint-disable-line no-param-reassign
10632
10632
  }
10633
10633
  return acc;
10634
10634
  }, mergeTarget);
@@ -10636,7 +10636,7 @@ var merge = function merge(target, source, options) {
10636
10636
 
10637
10637
  var assign = function assignSingleSource(target, source) {
10638
10638
  return Object.keys(source).reduce(function (acc, key) {
10639
- acc[key] = source[key];
10639
+ acc[key] = source[key]; // eslint-disable-line no-param-reassign
10640
10640
  return acc;
10641
10641
  }, target);
10642
10642
  };
@@ -10704,6 +10704,7 @@ var encode = function encode(str, defaultEncoder, charset) {
10704
10704
 
10705
10705
  i += 1;
10706
10706
  c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
10707
+ /* eslint operator-linebreak: [2, "before"] */
10707
10708
  out += hexTable[0xF0 | (c >> 18)]
10708
10709
  + hexTable[0x80 | ((c >> 12) & 0x3F)]
10709
10710
  + hexTable[0x80 | ((c >> 6) & 0x3F)]
@@ -10768,45 +10769,55 @@ var utils$2 = {
10768
10769
  var replace$1 = String.prototype.replace;
10769
10770
  var percentTwenties = /%20/g;
10770
10771
 
10771
- var formats$2 = {
10772
- 'default': 'RFC3986',
10773
- formatters: {
10774
- RFC1738: function (value) {
10775
- return replace$1.call(value, percentTwenties, '+');
10776
- },
10777
- RFC3986: function (value) {
10778
- return value;
10779
- }
10780
- },
10772
+ var util = utils$2;
10773
+
10774
+ var Format = {
10781
10775
  RFC1738: 'RFC1738',
10782
10776
  RFC3986: 'RFC3986'
10783
10777
  };
10784
10778
 
10779
+ var formats$2 = util.assign(
10780
+ {
10781
+ 'default': Format.RFC3986,
10782
+ formatters: {
10783
+ RFC1738: function (value) {
10784
+ return replace$1.call(value, percentTwenties, '+');
10785
+ },
10786
+ RFC3986: function (value) {
10787
+ return String(value);
10788
+ }
10789
+ }
10790
+ },
10791
+ Format
10792
+ );
10793
+
10785
10794
  var utils$1 = utils$2;
10786
10795
  var formats$1 = formats$2;
10787
10796
  var has$1 = Object.prototype.hasOwnProperty;
10788
10797
 
10789
10798
  var arrayPrefixGenerators = {
10790
- brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
10799
+ brackets: function brackets(prefix) {
10791
10800
  return prefix + '[]';
10792
10801
  },
10793
10802
  comma: 'comma',
10794
- indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
10803
+ indices: function indices(prefix, key) {
10795
10804
  return prefix + '[' + key + ']';
10796
10805
  },
10797
- repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
10806
+ repeat: function repeat(prefix) {
10798
10807
  return prefix;
10799
10808
  }
10800
10809
  };
10801
10810
 
10802
- var isArray$2 = Array.isArray;
10811
+ var isArray$3 = Array.isArray;
10812
+ var split = String.prototype.split;
10803
10813
  var push$1 = Array.prototype.push;
10804
10814
  var pushToArray = function (arr, valueOrArray) {
10805
- push$1.apply(arr, isArray$2(valueOrArray) ? valueOrArray : [valueOrArray]);
10815
+ push$1.apply(arr, isArray$3(valueOrArray) ? valueOrArray : [valueOrArray]);
10806
10816
  };
10807
10817
 
10808
10818
  var toISO = Date.prototype.toISOString;
10809
10819
 
10820
+ var defaultFormat = formats$1['default'];
10810
10821
  var defaults$1 = {
10811
10822
  addQueryPrefix: false,
10812
10823
  allowDots: false,
@@ -10816,17 +10827,18 @@ var defaults$1 = {
10816
10827
  encode: true,
10817
10828
  encoder: utils$1.encode,
10818
10829
  encodeValuesOnly: false,
10819
- formatter: formats$1.formatters[formats$1['default']],
10830
+ format: defaultFormat,
10831
+ formatter: formats$1.formatters[defaultFormat],
10820
10832
  // deprecated
10821
10833
  indices: false,
10822
- serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
10834
+ serializeDate: function serializeDate(date) {
10823
10835
  return toISO.call(date);
10824
10836
  },
10825
10837
  skipNulls: false,
10826
10838
  strictNullHandling: false
10827
10839
  };
10828
10840
 
10829
- var stringify$1 = function stringify( // eslint-disable-line func-name-matching
10841
+ var stringify$1 = function stringify(
10830
10842
  object,
10831
10843
  prefix,
10832
10844
  generateArrayPrefix,
@@ -10846,7 +10858,7 @@ var stringify$1 = function stringify( // eslint-disable-line func-name-matching
10846
10858
  obj = filter(prefix, obj);
10847
10859
  } else if (obj instanceof Date) {
10848
10860
  obj = serializeDate(obj);
10849
- } else if (generateArrayPrefix === 'comma' && isArray$2(obj)) {
10861
+ } else if (generateArrayPrefix === 'comma' && isArray$3(obj)) {
10850
10862
  obj = obj.join(',');
10851
10863
  }
10852
10864
 
@@ -10861,6 +10873,14 @@ var stringify$1 = function stringify( // eslint-disable-line func-name-matching
10861
10873
  if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils$1.isBuffer(obj)) {
10862
10874
  if (encoder) {
10863
10875
  var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset);
10876
+ if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
10877
+ var valuesArray = split.call(String(obj), ',');
10878
+ var valuesJoined = '';
10879
+ for (var i = 0; i < valuesArray.length; ++i) {
10880
+ valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults$1.encoder, charset));
10881
+ }
10882
+ return [formatter(keyValue) + '=' + valuesJoined];
10883
+ }
10864
10884
  return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset))];
10865
10885
  }
10866
10886
  return [formatter(prefix) + '=' + formatter(String(obj))];
@@ -10873,23 +10893,24 @@ var stringify$1 = function stringify( // eslint-disable-line func-name-matching
10873
10893
  }
10874
10894
 
10875
10895
  var objKeys;
10876
- if (isArray$2(filter)) {
10896
+ if (isArray$3(filter)) {
10877
10897
  objKeys = filter;
10878
10898
  } else {
10879
10899
  var keys = Object.keys(obj);
10880
10900
  objKeys = sort ? keys.sort(sort) : keys;
10881
10901
  }
10882
10902
 
10883
- for (var i = 0; i < objKeys.length; ++i) {
10884
- var key = objKeys[i];
10903
+ for (var j = 0; j < objKeys.length; ++j) {
10904
+ var key = objKeys[j];
10905
+ var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
10885
10906
 
10886
10907
  if (skipNulls && obj[key] === null) {
10887
10908
  continue;
10888
10909
  }
10889
10910
 
10890
- if (isArray$2(obj)) {
10911
+ if (isArray$3(obj)) {
10891
10912
  pushToArray(values, stringify(
10892
- obj[key],
10913
+ value,
10893
10914
  typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix,
10894
10915
  generateArrayPrefix,
10895
10916
  strictNullHandling,
@@ -10905,7 +10926,7 @@ var stringify$1 = function stringify( // eslint-disable-line func-name-matching
10905
10926
  ));
10906
10927
  } else {
10907
10928
  pushToArray(values, stringify(
10908
- obj[key],
10929
+ value,
10909
10930
  prefix + (allowDots ? '.' + key : '[' + key + ']'),
10910
10931
  generateArrayPrefix,
10911
10932
  strictNullHandling,
@@ -10930,7 +10951,7 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
10930
10951
  return defaults$1;
10931
10952
  }
10932
10953
 
10933
- if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
10954
+ if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
10934
10955
  throw new TypeError('Encoder has to be a function.');
10935
10956
  }
10936
10957
 
@@ -10949,7 +10970,7 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
10949
10970
  var formatter = formats$1.formatters[format];
10950
10971
 
10951
10972
  var filter = defaults$1.filter;
10952
- if (typeof opts.filter === 'function' || isArray$2(opts.filter)) {
10973
+ if (typeof opts.filter === 'function' || isArray$3(opts.filter)) {
10953
10974
  filter = opts.filter;
10954
10975
  }
10955
10976
 
@@ -10981,7 +11002,7 @@ var stringify_1 = function (object, opts) {
10981
11002
  if (typeof options.filter === 'function') {
10982
11003
  filter = options.filter;
10983
11004
  obj = filter('', obj);
10984
- } else if (isArray$2(options.filter)) {
11005
+ } else if (isArray$3(options.filter)) {
10985
11006
  filter = options.filter;
10986
11007
  objKeys = filter;
10987
11008
  }
@@ -11053,6 +11074,7 @@ var stringify_1 = function (object, opts) {
11053
11074
  var utils = utils$2;
11054
11075
 
11055
11076
  var has = Object.prototype.hasOwnProperty;
11077
+ var isArray$2 = Array.isArray;
11056
11078
 
11057
11079
  var defaults = {
11058
11080
  allowDots: false,
@@ -11078,6 +11100,25 @@ var interpretNumericEntities = function (str) {
11078
11100
  });
11079
11101
  };
11080
11102
 
11103
+ var parseArrayValue = function (val, options) {
11104
+ if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
11105
+ return val.split(',');
11106
+ }
11107
+
11108
+ return val;
11109
+ };
11110
+
11111
+ var maybeMap = function maybeMap(val, fn) {
11112
+ if (isArray$2(val)) {
11113
+ var mapped = [];
11114
+ for (var i = 0; i < val.length; i += 1) {
11115
+ mapped.push(fn(val[i]));
11116
+ }
11117
+ return mapped;
11118
+ }
11119
+ return fn(val);
11120
+ };
11121
+
11081
11122
  // This is what browsers will submit when the ✓ character occurs in an
11082
11123
  // application/x-www-form-urlencoded body and the encoding of the page containing
11083
11124
  // the form is iso-8859-1, or when the submitted form has an accept-charset
@@ -11126,15 +11167,20 @@ var parseValues = function parseQueryStringValues(str, options) {
11126
11167
  val = options.strictNullHandling ? null : '';
11127
11168
  } else {
11128
11169
  key = options.decoder(part.slice(0, pos), defaults.decoder, charset);
11129
- val = options.decoder(part.slice(pos + 1), defaults.decoder, charset);
11170
+ val = maybeMap(
11171
+ parseArrayValue(part.slice(pos + 1), options),
11172
+ function (encodedVal) {
11173
+ return options.decoder(encodedVal, defaults.decoder, charset);
11174
+ }
11175
+ );
11130
11176
  }
11131
11177
 
11132
11178
  if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
11133
11179
  val = interpretNumericEntities(val);
11134
11180
  }
11135
11181
 
11136
- if (val && options.comma && val.indexOf(',') > -1) {
11137
- val = val.split(',');
11182
+ if (part.indexOf('[]=') > -1) {
11183
+ val = isArray$2(val) ? [val] : val;
11138
11184
  }
11139
11185
 
11140
11186
  if (has.call(obj, key)) {
@@ -11147,8 +11193,8 @@ var parseValues = function parseQueryStringValues(str, options) {
11147
11193
  return obj;
11148
11194
  };
11149
11195
 
11150
- var parseObject = function (chain, val, options) {
11151
- var leaf = val;
11196
+ var parseObject = function (chain, val, options, valuesParsed) {
11197
+ var leaf = valuesParsed ? val : parseArrayValue(val, options);
11152
11198
 
11153
11199
  for (var i = chain.length - 1; i >= 0; --i) {
11154
11200
  var obj;
@@ -11171,18 +11217,18 @@ var parseObject = function (chain, val, options) {
11171
11217
  ) {
11172
11218
  obj = [];
11173
11219
  obj[index] = leaf;
11174
- } else {
11220
+ } else if (cleanRoot !== '__proto__') {
11175
11221
  obj[cleanRoot] = leaf;
11176
11222
  }
11177
11223
  }
11178
11224
 
11179
- leaf = obj;
11225
+ leaf = obj; // eslint-disable-line no-param-reassign
11180
11226
  }
11181
11227
 
11182
11228
  return leaf;
11183
11229
  };
11184
11230
 
11185
- var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
11231
+ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
11186
11232
  if (!givenKey) {
11187
11233
  return;
11188
11234
  }
@@ -11233,7 +11279,7 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
11233
11279
  keys.push('[' + key.slice(segment.index) + ']');
11234
11280
  }
11235
11281
 
11236
- return parseObject(keys, val, options);
11282
+ return parseObject(keys, val, options, valuesParsed);
11237
11283
  };
11238
11284
 
11239
11285
  var normalizeParseOptions = function normalizeParseOptions(opts) {
@@ -11246,7 +11292,7 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
11246
11292
  }
11247
11293
 
11248
11294
  if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
11249
- throw new Error('The charset option must be either utf-8, iso-8859-1, or undefined');
11295
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
11250
11296
  }
11251
11297
  var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
11252
11298
 
@@ -11284,7 +11330,7 @@ var parse$1 = function (str, opts) {
11284
11330
  var keys = Object.keys(tempObj);
11285
11331
  for (var i = 0; i < keys.length; ++i) {
11286
11332
  var key = keys[i];
11287
- var newObj = parseKeys(key, tempObj[key], options);
11333
+ var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
11288
11334
  obj = utils.merge(obj, newObj, options);
11289
11335
  }
11290
11336
 
@@ -19243,6 +19289,33 @@ var MobileMoneyAPI = {
19243
19289
  var response = _ref2.response;
19244
19290
  return ChargeResponses.parse(response.data);
19245
19291
  });
19292
+ },
19293
+ submitCode: function submitCode(_ref3) {
19294
+ var transaction = _ref3.transaction,
19295
+ phone = _ref3.phone,
19296
+ device = _ref3.device,
19297
+ channelName = _ref3.channel_name,
19298
+ provider = _ref3.provider,
19299
+ code = _ref3.code;
19300
+ var params = {
19301
+ transaction: transaction,
19302
+ phone: phone,
19303
+ device: device,
19304
+ channel_name: channelName,
19305
+ provider: provider,
19306
+ code: code
19307
+ };
19308
+ var language = getLanguage();
19309
+
19310
+ var headers = _objectSpread2({}, language && {
19311
+ 'Accept-Language': language
19312
+ });
19313
+
19314
+ return axiosInstance.post("".concat(configToUse.paystackApiUrl, "charge/submit_otp"), params, {
19315
+ headers: headers
19316
+ }).then(function (response) {
19317
+ return ChargeResponses.parse(response.data);
19318
+ });
19246
19319
  }
19247
19320
  };
19248
19321
 
@@ -19326,6 +19399,17 @@ var MobileMoneyCharge = {
19326
19399
  });
19327
19400
  });
19328
19401
  },
19402
+ submitCode: function submitCode(payload) {
19403
+ var _this3 = this;
19404
+
19405
+ return validate$1(payload.phoneNumber).then(function () {
19406
+ MobileMoneyAPI.submitCode(payload).then(function (response) {
19407
+ _this3.logAPIResponse(response, 'mobile_money');
19408
+
19409
+ return response;
19410
+ });
19411
+ });
19412
+ },
19329
19413
  listenForMobileMoneyCharge: function listenForMobileMoneyCharge(callback) {
19330
19414
  if (this.mobileMoney.status !== 'success') {
19331
19415
  return Promise.reject(Error('Please start a mobile money charge with Transaction.chargeMobileMoney()'));