@morefin/cashier-bootstrapper 0.1.5 → 0.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/README.md CHANGED
@@ -38,7 +38,8 @@ new CashierBootstrapper('#cashier-root', {
38
38
  userId: 'user-789',
39
39
  sessionId: 'session-abc',
40
40
  predefinedAmounts: [100, 200, 300],
41
- layout: 'default'
41
+ layout: 'default',
42
+ transactionType: ('deosit'|'withdrawal')
42
43
  },
43
44
  properties: {
44
45
  host: CASHIER_HOST,
@@ -115,6 +116,7 @@ interface CashierRequestParams {
115
116
  predefinedAmounts?: number[];
116
117
  layout?: string;
117
118
  fingerprint?: string;
119
+ transactionType?: string;
118
120
  }
119
121
 
120
122
  interface CashierIframeOptions {
package/dist/index.js CHANGED
@@ -56,7 +56,7 @@ function buildQueryString(requestParams) {
56
56
  }
57
57
  if (Array.isArray(requestParams.predefinedAmounts)) {
58
58
  requestParams.predefinedAmounts.forEach(amount => {
59
- query.append('predefined_amounts', String(amount));
59
+ query.append('predefinedAmounts', String(amount));
60
60
  });
61
61
  }
62
62
  if (requestParams.layout != null && requestParams.layout !== '' && requestParams.layout !== 'undefined') {
@@ -65,6 +65,9 @@ function buildQueryString(requestParams) {
65
65
  if (requestParams.fingerprint) {
66
66
  query.append('fingerprint', requestParams.fingerprint);
67
67
  }
68
+ if (requestParams.transactionType) {
69
+ query.append('transactionType', requestParams.transactionType);
70
+ }
68
71
  const qs = query.toString();
69
72
  return qs ? `?${qs}` : '';
70
73
  }
package/dist/types.d.ts CHANGED
@@ -9,6 +9,7 @@ export interface CashierRequestParams {
9
9
  predefinedAmounts?: number[];
10
10
  layout?: string;
11
11
  fingerprint?: string;
12
+ transactionType?: string;
12
13
  }
13
14
  /**
14
15
  * Bootstrap properties configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morefin/cashier-bootstrapper",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Bootstrap service for initializing cashier payment page data from API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",