@infrab4a/connect 5.1.0-beta.0 → 5.1.0-beta.1
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 +10 -7
- package/index.esm.js +10 -7
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -8979,7 +8979,6 @@ class PagarmePixAxiosAdapter {
|
|
|
8979
8979
|
}
|
|
8980
8980
|
}
|
|
8981
8981
|
|
|
8982
|
-
/* eslint-disable no-console */
|
|
8983
8982
|
class PagarmeV5BankSlipAxiosAdapter {
|
|
8984
8983
|
constructor(credentials, paymentRepository) {
|
|
8985
8984
|
this.credentials = credentials;
|
|
@@ -9012,8 +9011,9 @@ class PagarmeV5BankSlipAxiosAdapter {
|
|
|
9012
9011
|
return payment;
|
|
9013
9012
|
}
|
|
9014
9013
|
catch (error) {
|
|
9015
|
-
console.
|
|
9016
|
-
console.
|
|
9014
|
+
console.warn(error.response?.data);
|
|
9015
|
+
console.warn(error.response?.data?.errors);
|
|
9016
|
+
console.warn(error.response?.data?.request);
|
|
9017
9017
|
throw new PaymentError('Houve uma falha ao gerar o boleto. Tente novamente', {
|
|
9018
9018
|
checkoutId: checkout.id,
|
|
9019
9019
|
userEmail: checkout.user.email,
|
|
@@ -9082,6 +9082,9 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
9082
9082
|
if (error instanceof PaymentError) {
|
|
9083
9083
|
throw error;
|
|
9084
9084
|
}
|
|
9085
|
+
console.warn(error.response?.data);
|
|
9086
|
+
console.warn(error.response?.data?.errors);
|
|
9087
|
+
console.warn(error.response?.data?.request);
|
|
9085
9088
|
throw PagarmeBlockedOrderHelper.createGenericPaymentError(checkout, error.response?.data);
|
|
9086
9089
|
}
|
|
9087
9090
|
}
|
|
@@ -9188,7 +9191,6 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
9188
9191
|
}
|
|
9189
9192
|
}
|
|
9190
9193
|
|
|
9191
|
-
/* eslint-disable no-console */
|
|
9192
9194
|
class PagarmeV5PixAxiosAdapter {
|
|
9193
9195
|
constructor(credentials, paymentRepository) {
|
|
9194
9196
|
this.credentials = credentials;
|
|
@@ -9197,7 +9199,7 @@ class PagarmeV5PixAxiosAdapter {
|
|
|
9197
9199
|
async pay(checkout) {
|
|
9198
9200
|
try {
|
|
9199
9201
|
const payload = PagarMeV5RequestHelper.build(checkout, 'pix');
|
|
9200
|
-
console.warn('[PAGARME PIX DATA TO SEND]', payload);
|
|
9202
|
+
console.warn('[PAGARME PIX DATA TO SEND]', JSON.stringify(payload));
|
|
9201
9203
|
const { data } = await axios__default["default"]({
|
|
9202
9204
|
method: 'POST',
|
|
9203
9205
|
url: `${this.credentials.URL}/orders`,
|
|
@@ -9213,8 +9215,9 @@ class PagarmeV5PixAxiosAdapter {
|
|
|
9213
9215
|
return payment;
|
|
9214
9216
|
}
|
|
9215
9217
|
catch (error) {
|
|
9216
|
-
console.
|
|
9217
|
-
console.
|
|
9218
|
+
console.warn(error.response?.data);
|
|
9219
|
+
console.warn(error.response?.data?.errors);
|
|
9220
|
+
console.warn(error.response?.data?.request);
|
|
9218
9221
|
throw new PaymentError('Houve uma falha ao processar pagamento com pix', {
|
|
9219
9222
|
checkoutId: checkout.id,
|
|
9220
9223
|
userEmail: checkout.user.email,
|
package/index.esm.js
CHANGED
|
@@ -8954,7 +8954,6 @@ class PagarmePixAxiosAdapter {
|
|
|
8954
8954
|
}
|
|
8955
8955
|
}
|
|
8956
8956
|
|
|
8957
|
-
/* eslint-disable no-console */
|
|
8958
8957
|
class PagarmeV5BankSlipAxiosAdapter {
|
|
8959
8958
|
constructor(credentials, paymentRepository) {
|
|
8960
8959
|
this.credentials = credentials;
|
|
@@ -8987,8 +8986,9 @@ class PagarmeV5BankSlipAxiosAdapter {
|
|
|
8987
8986
|
return payment;
|
|
8988
8987
|
}
|
|
8989
8988
|
catch (error) {
|
|
8990
|
-
console.
|
|
8991
|
-
console.
|
|
8989
|
+
console.warn(error.response?.data);
|
|
8990
|
+
console.warn(error.response?.data?.errors);
|
|
8991
|
+
console.warn(error.response?.data?.request);
|
|
8992
8992
|
throw new PaymentError('Houve uma falha ao gerar o boleto. Tente novamente', {
|
|
8993
8993
|
checkoutId: checkout.id,
|
|
8994
8994
|
userEmail: checkout.user.email,
|
|
@@ -9057,6 +9057,9 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
9057
9057
|
if (error instanceof PaymentError) {
|
|
9058
9058
|
throw error;
|
|
9059
9059
|
}
|
|
9060
|
+
console.warn(error.response?.data);
|
|
9061
|
+
console.warn(error.response?.data?.errors);
|
|
9062
|
+
console.warn(error.response?.data?.request);
|
|
9060
9063
|
throw PagarmeBlockedOrderHelper.createGenericPaymentError(checkout, error.response?.data);
|
|
9061
9064
|
}
|
|
9062
9065
|
}
|
|
@@ -9163,7 +9166,6 @@ class PagarmeV5CardAxiosAdapter {
|
|
|
9163
9166
|
}
|
|
9164
9167
|
}
|
|
9165
9168
|
|
|
9166
|
-
/* eslint-disable no-console */
|
|
9167
9169
|
class PagarmeV5PixAxiosAdapter {
|
|
9168
9170
|
constructor(credentials, paymentRepository) {
|
|
9169
9171
|
this.credentials = credentials;
|
|
@@ -9172,7 +9174,7 @@ class PagarmeV5PixAxiosAdapter {
|
|
|
9172
9174
|
async pay(checkout) {
|
|
9173
9175
|
try {
|
|
9174
9176
|
const payload = PagarMeV5RequestHelper.build(checkout, 'pix');
|
|
9175
|
-
console.warn('[PAGARME PIX DATA TO SEND]', payload);
|
|
9177
|
+
console.warn('[PAGARME PIX DATA TO SEND]', JSON.stringify(payload));
|
|
9176
9178
|
const { data } = await axios({
|
|
9177
9179
|
method: 'POST',
|
|
9178
9180
|
url: `${this.credentials.URL}/orders`,
|
|
@@ -9188,8 +9190,9 @@ class PagarmeV5PixAxiosAdapter {
|
|
|
9188
9190
|
return payment;
|
|
9189
9191
|
}
|
|
9190
9192
|
catch (error) {
|
|
9191
|
-
console.
|
|
9192
|
-
console.
|
|
9193
|
+
console.warn(error.response?.data);
|
|
9194
|
+
console.warn(error.response?.data?.errors);
|
|
9195
|
+
console.warn(error.response?.data?.request);
|
|
9193
9196
|
throw new PaymentError('Houve uma falha ao processar pagamento com pix', {
|
|
9194
9197
|
checkoutId: checkout.id,
|
|
9195
9198
|
userEmail: checkout.user.email,
|