@validapay/tokenize 1.1.0 → 1.2.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.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -30,7 +30,7 @@ export async function tokenize({ clientId, clientSecret, dev = false, card, cust
30
30
  if (!clientId) throw new Error("clientId é obrigatório");
31
31
  if (!clientSecret) throw new Error("clientSecret é obrigatório");
32
32
  if (!card?.number) throw new Error("card.number é obrigatório");
33
- if (!card?.name) throw new Error("card.name é obrigatório");
33
+ if (!card?.cardHolderName) throw new Error("card.cardHolderName é obrigatório");
34
34
  if (!card?.cvv) throw new Error("card.cvv é obrigatório");
35
35
  if (!card?.expiration) throw new Error("card.expiration é obrigatório");
36
36
  if (!customer?.document) throw new Error("customer.document é obrigatório");
@@ -47,7 +47,7 @@ export async function tokenize({ clientId, clientSecret, dev = false, card, cust
47
47
  "Authorization": `Bearer ${token}`,
48
48
  },
49
49
  body: JSON.stringify({
50
- name: card.name,
50
+ cardHolderName: card.cardHolderName,
51
51
  number: card.number,
52
52
  cvv: card.cvv,
53
53
  expiration: card.expiration,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@validapay/tokenize",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "SDK de tokenização de cartão ValidaPay",
5
5
  "type": "module",
6
6
  "main": "index.js",