@infrab4a/connect 5.1.0-beta.10 → 5.1.0-beta.11
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
CHANGED
|
@@ -8696,6 +8696,13 @@ class PagarMeV5RequestHelper {
|
|
|
8696
8696
|
card_id: card.cardId,
|
|
8697
8697
|
card: {
|
|
8698
8698
|
cvv: card.cardCvv,
|
|
8699
|
+
billing_address: {
|
|
8700
|
+
line_1: `${checkout.billingAddress.number}, ${checkout.billingAddress.street}, ${checkout.billingAddress.district}`,
|
|
8701
|
+
zip_code: checkout.billingAddress.zip,
|
|
8702
|
+
city: checkout.billingAddress.city,
|
|
8703
|
+
state: checkout.billingAddress.state,
|
|
8704
|
+
country: 'BR',
|
|
8705
|
+
},
|
|
8699
8706
|
},
|
|
8700
8707
|
};
|
|
8701
8708
|
}
|
|
@@ -9022,10 +9029,10 @@ class PagarmeV5BankSlipAxiosAdapter {
|
|
|
9022
9029
|
data: payload,
|
|
9023
9030
|
});
|
|
9024
9031
|
console.warn('[PAGARME RESPONSE BOLETO DATA]', JSON.stringify(data));
|
|
9025
|
-
if (data.status
|
|
9032
|
+
if (data.status === exports.PagarMeV5OrderStatus.Falha ||
|
|
9026
9033
|
data.charges.at(0).status === exports.PagarMeV5OrderStatus.Falha ||
|
|
9027
|
-
data.charges.at(0).last_transaction.status !== exports.PagarMeV5PaymentStatus.Gerado
|
|
9028
|
-
|
|
9034
|
+
(data.charges.at(0).last_transaction.status !== exports.PagarMeV5PaymentStatus.Gerado &&
|
|
9035
|
+
data.charges.at(0).last_transaction.status !== exports.PagarMeV5PaymentStatus['Em processamento'])) {
|
|
9029
9036
|
return Promise.reject(new PaymentError('Houve uma falha ao gerar o boleto. Tente novamente', {
|
|
9030
9037
|
checkoutId: checkout.id,
|
|
9031
9038
|
userEmail: checkout.user.email,
|
package/index.esm.js
CHANGED
|
@@ -8671,6 +8671,13 @@ class PagarMeV5RequestHelper {
|
|
|
8671
8671
|
card_id: card.cardId,
|
|
8672
8672
|
card: {
|
|
8673
8673
|
cvv: card.cardCvv,
|
|
8674
|
+
billing_address: {
|
|
8675
|
+
line_1: `${checkout.billingAddress.number}, ${checkout.billingAddress.street}, ${checkout.billingAddress.district}`,
|
|
8676
|
+
zip_code: checkout.billingAddress.zip,
|
|
8677
|
+
city: checkout.billingAddress.city,
|
|
8678
|
+
state: checkout.billingAddress.state,
|
|
8679
|
+
country: 'BR',
|
|
8680
|
+
},
|
|
8674
8681
|
},
|
|
8675
8682
|
};
|
|
8676
8683
|
}
|
|
@@ -8997,10 +9004,10 @@ class PagarmeV5BankSlipAxiosAdapter {
|
|
|
8997
9004
|
data: payload,
|
|
8998
9005
|
});
|
|
8999
9006
|
console.warn('[PAGARME RESPONSE BOLETO DATA]', JSON.stringify(data));
|
|
9000
|
-
if (data.status
|
|
9007
|
+
if (data.status === PagarMeV5OrderStatus.Falha ||
|
|
9001
9008
|
data.charges.at(0).status === PagarMeV5OrderStatus.Falha ||
|
|
9002
|
-
data.charges.at(0).last_transaction.status !== PagarMeV5PaymentStatus.Gerado
|
|
9003
|
-
|
|
9009
|
+
(data.charges.at(0).last_transaction.status !== PagarMeV5PaymentStatus.Gerado &&
|
|
9010
|
+
data.charges.at(0).last_transaction.status !== PagarMeV5PaymentStatus['Em processamento'])) {
|
|
9004
9011
|
return Promise.reject(new PaymentError('Houve uma falha ao gerar o boleto. Tente novamente', {
|
|
9005
9012
|
checkoutId: checkout.id,
|
|
9006
9013
|
userEmail: checkout.user.email,
|
package/package.json
CHANGED
|
@@ -39,34 +39,37 @@ export type PagarMeV5Orderitems = {
|
|
|
39
39
|
export type PagarMeV5OrderPaymentInfo = {
|
|
40
40
|
payment_method: 'boleto' | 'pix' | 'credit_card';
|
|
41
41
|
amount: number;
|
|
42
|
-
pix?:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
42
|
+
pix?: PagarMeV5OrderPaymentPixInfo;
|
|
43
|
+
boleto?: PagarMeV5OrderPaymentBoletoInfo;
|
|
44
|
+
credit_card?: PagarMeV5OrderPaymentCardInfo;
|
|
45
|
+
};
|
|
46
|
+
export type PagarMeV5OrderPaymentPixInfo = {
|
|
47
|
+
expires_at: string;
|
|
48
|
+
additional_information?: [
|
|
49
|
+
{
|
|
50
|
+
name: string;
|
|
51
|
+
value: string;
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
};
|
|
55
|
+
export type PagarMeV5OrderPaymentBoletoInfo = {
|
|
56
|
+
instructions: string;
|
|
57
|
+
due_at: string;
|
|
58
|
+
type: 'DM' | 'BDP';
|
|
59
|
+
document_number?: string;
|
|
60
|
+
};
|
|
61
|
+
export type PagarMeV5OrderPaymentCardInfo = {
|
|
62
|
+
installments: number;
|
|
63
|
+
statement_descriptor: string;
|
|
64
|
+
card_id: string;
|
|
65
|
+
card: {
|
|
66
|
+
cvv: string;
|
|
67
|
+
billing_address?: {
|
|
68
|
+
line_1: string;
|
|
69
|
+
zip_code: string;
|
|
70
|
+
city: string;
|
|
71
|
+
state: string;
|
|
72
|
+
country: string;
|
|
70
73
|
};
|
|
71
74
|
};
|
|
72
75
|
};
|