@sikka/aps 0.0.4 → 0.0.5

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.js CHANGED
@@ -809,8 +809,9 @@ var TokenizationModule = class {
809
809
  }
810
810
  return {
811
811
  token: response.card_token,
812
- last4: options.cardNumber.slice(-4),
813
- brand: this.detectCardBrand(options.cardNumber),
812
+ // Use APS response values first, fallback to computing from card number
813
+ last4: response.card_last_digits || response.last4_digits || response.card_number?.slice(-4) || options.cardNumber.slice(-4),
814
+ brand: response.card_brand || response.card_type || this.detectCardBrand(options.cardNumber),
814
815
  expiryMonth: options.expiryMonth,
815
816
  expiryYear: options.expiryYear
816
817
  };
package/dist/index.mjs CHANGED
@@ -728,8 +728,9 @@ var TokenizationModule = class {
728
728
  }
729
729
  return {
730
730
  token: response.card_token,
731
- last4: options.cardNumber.slice(-4),
732
- brand: this.detectCardBrand(options.cardNumber),
731
+ // Use APS response values first, fallback to computing from card number
732
+ last4: response.card_last_digits || response.last4_digits || response.card_number?.slice(-4) || options.cardNumber.slice(-4),
733
+ brand: response.card_brand || response.card_type || this.detectCardBrand(options.cardNumber),
733
734
  expiryMonth: options.expiryMonth,
734
735
  expiryYear: options.expiryYear
735
736
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/aps",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "A Stripe-like developer-friendly SDK for Amazon Payment Services integration. Supports payment links, hosted checkout, tokenization, webhooks, and payment management.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -53,7 +53,7 @@
53
53
  "license": "MIT",
54
54
  "repository": {
55
55
  "type": "git",
56
- "url": "https://github.com/sikka-software/amazon-payment-services.git"
56
+ "url": "https://github.com/sikka-software/amazon-payment-services/issues"
57
57
  },
58
58
  "bugs": {
59
59
  "url": "https://github.com/sikka-software/amazon-payment-services/issues"