@finteqhub/sdk-js 0.4.0 → 0.5.0

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.
@@ -66,6 +66,11 @@ export class FinteqHubProcessing {
66
66
  if (result.type === "redirect") {
67
67
  resolve(result);
68
68
  }
69
+ else if (result.type === "wait") {
70
+ setTimeout(() => {
71
+ this.processOperation(url, resolve, reject);
72
+ }, result.waitInterval * 1000 || 10000);
73
+ }
69
74
  else if (result.type === "submitForm") {
70
75
  let iframe = document.createElement("iframe");
71
76
  iframe.src = result.formUrl;
@@ -3,7 +3,7 @@ export declare type Card = {
3
3
  holder: string;
4
4
  expiryMonth: number;
5
5
  expiryYear: number;
6
- CVV: string;
6
+ cvv: string;
7
7
  tokenize: boolean;
8
8
  };
9
9
  export declare type Payer = {
@@ -48,6 +48,22 @@ export declare type CustomerAccount = {
48
48
  paymentMethod?: string;
49
49
  status?: string;
50
50
  metadata?: any;
51
+ } | {
52
+ id?: string;
53
+ integrationAccountId?: string;
54
+ paymentMethod?: "card-acquirer";
55
+ status?: string;
56
+ metadata?: {
57
+ iin: string;
58
+ brand: string;
59
+ type: string;
60
+ issuer: string;
61
+ issuer_country: string;
62
+ expiryMonth: number;
63
+ expiryYear: number;
64
+ maskedPAN: string;
65
+ tokenized?: boolean;
66
+ };
51
67
  };
52
68
  export declare type OperationSession = {
53
69
  amount: string;
@@ -88,10 +104,20 @@ export declare type FieldDetails = {
88
104
  example?: string;
89
105
  };
90
106
  export declare type SubmitData = {
91
- type: string;
92
- card: Card;
93
- billingAddress: Address;
94
- payer: Payer;
107
+ customerAccountId: string;
108
+ credentials: {
109
+ card: {
110
+ cvv: string;
111
+ };
112
+ billingAddress: Address;
113
+ payer: Payer;
114
+ };
115
+ } | {
116
+ credentials: {
117
+ card: Card;
118
+ billingAddress: Address;
119
+ payer: Payer;
120
+ };
95
121
  };
96
122
  export declare type ProcessOperationRedirectResponse = {
97
123
  type: "redirect";
@@ -102,4 +128,7 @@ export declare type ProcessOperationResponse = {
102
128
  type: "submitForm";
103
129
  formUrl: string;
104
130
  metadata: unknown;
131
+ } | {
132
+ type: "wait";
133
+ waitInterval: number;
105
134
  } | ProcessOperationRedirectResponse;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finteqhub/sdk-js",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "SDK for interacting with FinteqHub processing API",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",