logix-payment-shift4 1.1.1 → 1.1.2

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 CHANGED
@@ -196,7 +196,8 @@ function PaymentForm(_ref) {
196
196
  baseUrl = _ref.baseUrl,
197
197
  userId = _ref.userId,
198
198
  successPage = _ref.successPage,
199
- errorPage = _ref.errorPage;
199
+ errorPage = _ref.errorPage,
200
+ description = _ref.description;
200
201
  var formRef = React.useRef();
201
202
  var initializedRef = React.useRef(false); // yalnız bir dəfə mount üçün
202
203
  var shift4Ref = React.useRef(null);
@@ -327,7 +328,8 @@ function PaymentForm(_ref) {
327
328
  request = {
328
329
  amount: amount,
329
330
  currency: currency,
330
- card: token.id
331
+ card: token.id,
332
+ description: description
331
333
  };
332
334
  _context2.n = 7;
333
335
  return shift4Ref.current.verifyThreeDSecure(request);
@@ -349,7 +351,8 @@ function PaymentForm(_ref) {
349
351
  body: JSON.stringify({
350
352
  tokenId: threeDSecureToken.id,
351
353
  amount: request.amount,
352
- currency: request.currency
354
+ currency: request.currency,
355
+ description: description
353
356
  })
354
357
  });
355
358
  case 9:
package/dist/index.esm.js CHANGED
@@ -194,7 +194,8 @@ function PaymentForm(_ref) {
194
194
  baseUrl = _ref.baseUrl,
195
195
  userId = _ref.userId,
196
196
  successPage = _ref.successPage,
197
- errorPage = _ref.errorPage;
197
+ errorPage = _ref.errorPage,
198
+ description = _ref.description;
198
199
  var formRef = useRef();
199
200
  var initializedRef = useRef(false); // yalnız bir dəfə mount üçün
200
201
  var shift4Ref = useRef(null);
@@ -325,7 +326,8 @@ function PaymentForm(_ref) {
325
326
  request = {
326
327
  amount: amount,
327
328
  currency: currency,
328
- card: token.id
329
+ card: token.id,
330
+ description: description
329
331
  };
330
332
  _context2.n = 7;
331
333
  return shift4Ref.current.verifyThreeDSecure(request);
@@ -347,7 +349,8 @@ function PaymentForm(_ref) {
347
349
  body: JSON.stringify({
348
350
  tokenId: threeDSecureToken.id,
349
351
  amount: request.amount,
350
- currency: request.currency
352
+ currency: request.currency,
353
+ description: description
351
354
  })
352
355
  });
353
356
  case 9:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "logix-payment-shift4",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "description": "A React component library for integrating Shift4 payments with Logix applications.",
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useRef, useState } from "react";
2
2
 
3
- export default function PaymentForm({ amount, currency, color, formwidth = 400, formborderRadius = 20, formbackgroundColor = "#fff", inputpadding = 12, baseUrl, userId, successPage, errorPage }) {
3
+ export default function PaymentForm({ amount, currency, color, formwidth = 400, formborderRadius = 20, formbackgroundColor = "#fff", inputpadding = 12, baseUrl, userId, successPage, errorPage,description }) {
4
4
  const formRef = useRef();
5
5
  const initializedRef = useRef(false); // yalnız bir dəfə mount üçün
6
6
  const shift4Ref = useRef(null);
@@ -84,6 +84,7 @@ export default function PaymentForm({ amount, currency, color, formwidth = 400,
84
84
  amount: amount,
85
85
  currency: currency,
86
86
  card: token.id,
87
+ description
87
88
  };
88
89
 
89
90
  const threeDSecureToken = await shift4Ref.current.verifyThreeDSecure(request);
@@ -101,6 +102,7 @@ export default function PaymentForm({ amount, currency, color, formwidth = 400,
101
102
  tokenId: threeDSecureToken.id,
102
103
  amount: request.amount,
103
104
  currency: request.currency,
105
+ description
104
106
  }),
105
107
  });
106
108
  const result = await response.json();