@infrab4a/connect 4.2.4-beta.6 → 4.2.4-beta.8
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/index.cjs.js +4 -3
- package/index.esm.js +4 -3
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -2684,7 +2684,7 @@ class PagarmeBankSlipService {
|
|
|
2684
2684
|
amount: Math.floor(checkout.totalPrice * 100),
|
|
2685
2685
|
boleto_rules: ['strict_expiration_date'],
|
|
2686
2686
|
boleto_instructions: 'Sr. Caixa, NÃO aceitar o pagamento após o vencimento.',
|
|
2687
|
-
boleto_expiration_date: dateFns.format(dateFns.addDays(new Date(), 3), 'yyyy-MM-
|
|
2687
|
+
boleto_expiration_date: dateFns.format(dateFns.addDays(new Date(), 3), 'yyyy-MM-dd'),
|
|
2688
2688
|
payment_method: 'boleto',
|
|
2689
2689
|
postback_url: this.credentials.URL_POSTBACK,
|
|
2690
2690
|
customer: {
|
|
@@ -2708,6 +2708,7 @@ class PagarmeCardService {
|
|
|
2708
2708
|
this.credentials = credentials;
|
|
2709
2709
|
}
|
|
2710
2710
|
async pay(checkout, card) {
|
|
2711
|
+
var _a;
|
|
2711
2712
|
try {
|
|
2712
2713
|
const result = await axios__default["default"]({
|
|
2713
2714
|
method: 'POST',
|
|
@@ -2729,7 +2730,7 @@ class PagarmeCardService {
|
|
|
2729
2730
|
return payment;
|
|
2730
2731
|
}
|
|
2731
2732
|
catch (error) {
|
|
2732
|
-
console.log(error);
|
|
2733
|
+
console.log('Error Pagarme card request', JSON.stringify((_a = error.response) === null || _a === void 0 ? void 0 : _a.data));
|
|
2733
2734
|
}
|
|
2734
2735
|
}
|
|
2735
2736
|
addCard() {
|
|
@@ -2816,7 +2817,7 @@ class PagarmePixService {
|
|
|
2816
2817
|
amount: Math.floor(checkout.totalPrice * 100),
|
|
2817
2818
|
api_key: this.credentials.API_KEY,
|
|
2818
2819
|
postback_url: this.credentials.URL_POSTBACK,
|
|
2819
|
-
pix_expiration_date: dateFns.format(dateFns.addDays(new Date(), 1), 'yyyy-MM-
|
|
2820
|
+
pix_expiration_date: dateFns.format(dateFns.addDays(new Date(), 1), 'yyyy-MM-dd'),
|
|
2820
2821
|
customer: {
|
|
2821
2822
|
external_id: checkout.user.id,
|
|
2822
2823
|
type: 'individual',
|
package/index.esm.js
CHANGED
|
@@ -2660,7 +2660,7 @@ class PagarmeBankSlipService {
|
|
|
2660
2660
|
amount: Math.floor(checkout.totalPrice * 100),
|
|
2661
2661
|
boleto_rules: ['strict_expiration_date'],
|
|
2662
2662
|
boleto_instructions: 'Sr. Caixa, NÃO aceitar o pagamento após o vencimento.',
|
|
2663
|
-
boleto_expiration_date: format(addDays(new Date(), 3), 'yyyy-MM-
|
|
2663
|
+
boleto_expiration_date: format(addDays(new Date(), 3), 'yyyy-MM-dd'),
|
|
2664
2664
|
payment_method: 'boleto',
|
|
2665
2665
|
postback_url: this.credentials.URL_POSTBACK,
|
|
2666
2666
|
customer: {
|
|
@@ -2684,6 +2684,7 @@ class PagarmeCardService {
|
|
|
2684
2684
|
this.credentials = credentials;
|
|
2685
2685
|
}
|
|
2686
2686
|
async pay(checkout, card) {
|
|
2687
|
+
var _a;
|
|
2687
2688
|
try {
|
|
2688
2689
|
const result = await axios({
|
|
2689
2690
|
method: 'POST',
|
|
@@ -2705,7 +2706,7 @@ class PagarmeCardService {
|
|
|
2705
2706
|
return payment;
|
|
2706
2707
|
}
|
|
2707
2708
|
catch (error) {
|
|
2708
|
-
console.log(error);
|
|
2709
|
+
console.log('Error Pagarme card request', JSON.stringify((_a = error.response) === null || _a === void 0 ? void 0 : _a.data));
|
|
2709
2710
|
}
|
|
2710
2711
|
}
|
|
2711
2712
|
addCard() {
|
|
@@ -2792,7 +2793,7 @@ class PagarmePixService {
|
|
|
2792
2793
|
amount: Math.floor(checkout.totalPrice * 100),
|
|
2793
2794
|
api_key: this.credentials.API_KEY,
|
|
2794
2795
|
postback_url: this.credentials.URL_POSTBACK,
|
|
2795
|
-
pix_expiration_date: format(addDays(new Date(), 1), 'yyyy-MM-
|
|
2796
|
+
pix_expiration_date: format(addDays(new Date(), 1), 'yyyy-MM-dd'),
|
|
2796
2797
|
customer: {
|
|
2797
2798
|
external_id: checkout.user.id,
|
|
2798
2799
|
type: 'individual',
|