@longvansoftware/storefront-js-client 2.3.3 → 2.3.4

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.
@@ -8,8 +8,16 @@ exports.CANCEL_PAYMENT = (0, graphql_tag_1.gql) `
8
8
  }
9
9
  `;
10
10
  exports.CONFIRM_TO_GATEWAY = (0, graphql_tag_1.gql) `
11
- mutation ConfirmToGateWay($paymentId: String!, $methodCode: String) {
12
- confirmToGateway(paymentId: $paymentId, methodCode: $methodCode) {
11
+ mutation ConfirmToGateWay(
12
+ $paymentId: String!
13
+ $methodCode: String
14
+ $returnUrl: String
15
+ ) {
16
+ confirmToGateway(
17
+ paymentId: $paymentId
18
+ methodCode: $methodCode
19
+ returnUrl: $returnUrl
20
+ ) {
13
21
  code
14
22
  message
15
23
  data
@@ -6,6 +6,6 @@ export declare class PaymentServiceV2 extends Service {
6
6
  paymentMethods(): Promise<any>;
7
7
  getPaymentMethodTypes(): Promise<any>;
8
8
  paymentInfo(paymentId: string): Promise<any>;
9
- confirmToGateway(paymentId: string, methodCode: string): Promise<any>;
9
+ confirmToGateway(paymentId: string, methodCode: string, returnUrl: string): Promise<any>;
10
10
  paymentStatus(paymentId: string): Promise<any>;
11
11
  }
@@ -94,12 +94,13 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
94
94
  }
95
95
  });
96
96
  }
97
- confirmToGateway(paymentId, methodCode) {
97
+ confirmToGateway(paymentId, methodCode, returnUrl) {
98
98
  return __awaiter(this, void 0, void 0, function* () {
99
99
  const mutation = mutations_1.CONFIRM_TO_GATEWAY;
100
100
  const variables = {
101
101
  paymentId,
102
102
  methodCode,
103
+ returnUrl,
103
104
  };
104
105
  try {
105
106
  const response = yield this.graphqlMutationV3(mutation, variables);
@@ -114,7 +115,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
114
115
  return __awaiter(this, void 0, void 0, function* () {
115
116
  const query = queries_1.PAYMENT_STATUS;
116
117
  const variables = {
117
- paymentId
118
+ paymentId,
118
119
  };
119
120
  try {
120
121
  const response = yield this.graphqlQueryV3(query, variables);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [