@infrab4a/connect 5.2.0-beta.1 → 5.2.0-beta.3
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 +5 -11
- package/index.esm.js +5 -11
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -8718,7 +8718,7 @@ class PagarMeV5RequestHelper {
|
|
|
8718
8718
|
static getCardOrder(checkout, card) {
|
|
8719
8719
|
return {
|
|
8720
8720
|
installments: card.installments,
|
|
8721
|
-
statement_descriptor: checkout.shop === exports.Shops.GLAMSHOP ? 'Glam' :
|
|
8721
|
+
statement_descriptor: checkout.shop === exports.Shops.GLAMSHOP ? 'Glam' : 'Mens Market',
|
|
8722
8722
|
card_id: card.cardId,
|
|
8723
8723
|
card: {
|
|
8724
8724
|
cvv: card.cardCvv,
|
|
@@ -9069,9 +9069,8 @@ class PagarmeV5BankSlipAxiosAdapter {
|
|
|
9069
9069
|
return payment;
|
|
9070
9070
|
}
|
|
9071
9071
|
catch (error) {
|
|
9072
|
-
console.error('Full error: ', JSON.stringify(error));
|
|
9073
9072
|
if (error instanceof axios.AxiosError) {
|
|
9074
|
-
console.error('
|
|
9073
|
+
console.error('error data: ', JSON.stringify(error.response?.data));
|
|
9075
9074
|
}
|
|
9076
9075
|
throw new PaymentError('Houve uma falha ao gerar o boleto. Tente novamente', {
|
|
9077
9076
|
checkoutId: checkout.id,
|
|
@@ -9141,9 +9140,8 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
9141
9140
|
if (error instanceof PaymentError) {
|
|
9142
9141
|
throw error;
|
|
9143
9142
|
}
|
|
9144
|
-
console.error('Full error: ', JSON.stringify(error));
|
|
9145
9143
|
if (error instanceof axios.AxiosError) {
|
|
9146
|
-
console.error('
|
|
9144
|
+
console.error('error data: ', JSON.stringify(error.response?.data));
|
|
9147
9145
|
}
|
|
9148
9146
|
throw PagarmeBlockedOrderHelper.createGenericPaymentError(checkout, error.response?.data);
|
|
9149
9147
|
}
|
|
@@ -9165,8 +9163,6 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
9165
9163
|
exp_month: card.expirationDate.split('/').at(0),
|
|
9166
9164
|
exp_year: card.expirationDate.split('/').at(1),
|
|
9167
9165
|
cvv: card.cvv,
|
|
9168
|
-
brand: card.flag,
|
|
9169
|
-
label: card.flag,
|
|
9170
9166
|
billing_address: {
|
|
9171
9167
|
line_1: `${customer.billingAddress.number}, ${customer.billingAddress.street}, ${customer.billingAddress.district}`,
|
|
9172
9168
|
line_2: `${customer.billingAddress.extension}`,
|
|
@@ -9180,7 +9176,7 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
9180
9176
|
return data;
|
|
9181
9177
|
}
|
|
9182
9178
|
catch (error) {
|
|
9183
|
-
console.warn(error);
|
|
9179
|
+
console.warn(JSON.stringify(error));
|
|
9184
9180
|
throw error;
|
|
9185
9181
|
}
|
|
9186
9182
|
}
|
|
@@ -9303,10 +9299,8 @@ class PagarmeV5PixAxiosAdapter {
|
|
|
9303
9299
|
return payment;
|
|
9304
9300
|
}
|
|
9305
9301
|
catch (error) {
|
|
9306
|
-
console.error('Full error: ', JSON.stringify(error));
|
|
9307
9302
|
if (error instanceof axios.AxiosError) {
|
|
9308
|
-
console.error('
|
|
9309
|
-
console.error('Error response: ', error.response, 'error data: ', error.response?.data);
|
|
9303
|
+
console.error('error data: ', JSON.stringify(error.response?.data));
|
|
9310
9304
|
}
|
|
9311
9305
|
throw new PaymentError('Houve uma falha ao processar pagamento com pix', {
|
|
9312
9306
|
checkoutId: checkout.id,
|
package/index.esm.js
CHANGED
|
@@ -8693,7 +8693,7 @@ class PagarMeV5RequestHelper {
|
|
|
8693
8693
|
static getCardOrder(checkout, card) {
|
|
8694
8694
|
return {
|
|
8695
8695
|
installments: card.installments,
|
|
8696
|
-
statement_descriptor: checkout.shop === Shops.GLAMSHOP ? 'Glam' :
|
|
8696
|
+
statement_descriptor: checkout.shop === Shops.GLAMSHOP ? 'Glam' : 'Mens Market',
|
|
8697
8697
|
card_id: card.cardId,
|
|
8698
8698
|
card: {
|
|
8699
8699
|
cvv: card.cardCvv,
|
|
@@ -9044,9 +9044,8 @@ class PagarmeV5BankSlipAxiosAdapter {
|
|
|
9044
9044
|
return payment;
|
|
9045
9045
|
}
|
|
9046
9046
|
catch (error) {
|
|
9047
|
-
console.error('Full error: ', JSON.stringify(error));
|
|
9048
9047
|
if (error instanceof AxiosError) {
|
|
9049
|
-
console.error('
|
|
9048
|
+
console.error('error data: ', JSON.stringify(error.response?.data));
|
|
9050
9049
|
}
|
|
9051
9050
|
throw new PaymentError('Houve uma falha ao gerar o boleto. Tente novamente', {
|
|
9052
9051
|
checkoutId: checkout.id,
|
|
@@ -9116,9 +9115,8 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
9116
9115
|
if (error instanceof PaymentError) {
|
|
9117
9116
|
throw error;
|
|
9118
9117
|
}
|
|
9119
|
-
console.error('Full error: ', JSON.stringify(error));
|
|
9120
9118
|
if (error instanceof AxiosError) {
|
|
9121
|
-
console.error('
|
|
9119
|
+
console.error('error data: ', JSON.stringify(error.response?.data));
|
|
9122
9120
|
}
|
|
9123
9121
|
throw PagarmeBlockedOrderHelper.createGenericPaymentError(checkout, error.response?.data);
|
|
9124
9122
|
}
|
|
@@ -9140,8 +9138,6 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
9140
9138
|
exp_month: card.expirationDate.split('/').at(0),
|
|
9141
9139
|
exp_year: card.expirationDate.split('/').at(1),
|
|
9142
9140
|
cvv: card.cvv,
|
|
9143
|
-
brand: card.flag,
|
|
9144
|
-
label: card.flag,
|
|
9145
9141
|
billing_address: {
|
|
9146
9142
|
line_1: `${customer.billingAddress.number}, ${customer.billingAddress.street}, ${customer.billingAddress.district}`,
|
|
9147
9143
|
line_2: `${customer.billingAddress.extension}`,
|
|
@@ -9155,7 +9151,7 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
9155
9151
|
return data;
|
|
9156
9152
|
}
|
|
9157
9153
|
catch (error) {
|
|
9158
|
-
console.warn(error);
|
|
9154
|
+
console.warn(JSON.stringify(error));
|
|
9159
9155
|
throw error;
|
|
9160
9156
|
}
|
|
9161
9157
|
}
|
|
@@ -9278,10 +9274,8 @@ class PagarmeV5PixAxiosAdapter {
|
|
|
9278
9274
|
return payment;
|
|
9279
9275
|
}
|
|
9280
9276
|
catch (error) {
|
|
9281
|
-
console.error('Full error: ', JSON.stringify(error));
|
|
9282
9277
|
if (error instanceof AxiosError) {
|
|
9283
|
-
console.error('
|
|
9284
|
-
console.error('Error response: ', error.response, 'error data: ', error.response?.data);
|
|
9278
|
+
console.error('error data: ', JSON.stringify(error.response?.data));
|
|
9285
9279
|
}
|
|
9286
9280
|
throw new PaymentError('Houve uma falha ao processar pagamento com pix', {
|
|
9287
9281
|
checkoutId: checkout.id,
|