@infrab4a/connect 5.1.0-beta.4 → 5.1.0-beta.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/index.cjs.js CHANGED
@@ -8615,6 +8615,11 @@ class PagarMeV5RequestHelper {
8615
8615
  type: 'individual',
8616
8616
  document: checkout.user.cpf,
8617
8617
  phones: {
8618
+ home_phone: {
8619
+ country_code: '55',
8620
+ number: checkout.user.phone.slice(2),
8621
+ area_code: checkout.user.phone.slice(0, 2),
8622
+ },
8618
8623
  mobile_phone: {
8619
8624
  country_code: '55',
8620
8625
  number: checkout.user.phone.slice(2),
@@ -8753,11 +8758,11 @@ class PagarMeV5ResponseHelper {
8753
8758
  acquirer_message: transaction.acquirer_message?.toString(),
8754
8759
  acquirer_return_code: transaction.acquirer_return_code?.toString(),
8755
8760
  installments: transaction.installments ?? null,
8756
- card_holder_name: transaction.card.holder_name?.toString(),
8757
- card_last_digits: transaction.card.last_four_digits?.toString(),
8758
- card_first_digits: transaction.card.first_six_digits?.toString(),
8759
- card_brand: transaction.card.brand?.toString(),
8760
- card_id: transaction.card.id?.toString(),
8761
+ card_holder_name: transaction.card?.holder_name?.toString(),
8762
+ card_last_digits: transaction.card?.last_four_digits?.toString(),
8763
+ card_first_digits: transaction.card?.first_six_digits?.toString(),
8764
+ card_brand: transaction.card?.brand?.toString(),
8765
+ card_id: transaction.card?.id?.toString(),
8761
8766
  };
8762
8767
  }
8763
8768
  }
@@ -9051,7 +9056,7 @@ class PagarmeV5BankSlipAxiosAdapter {
9051
9056
  return payment;
9052
9057
  }
9053
9058
  catch (error) {
9054
- console.error('Full error: ', error);
9059
+ console.error('Full error: ', JSON.stringify(error));
9055
9060
  if (error instanceof axios.AxiosError) {
9056
9061
  console.error('Error: ', error.message);
9057
9062
  console.error('Error response: ', error.response, 'error data: ', error.response?.data);
@@ -9124,7 +9129,7 @@ class PagarmeV5CardAxiosAdapter {
9124
9129
  if (error instanceof PaymentError) {
9125
9130
  throw error;
9126
9131
  }
9127
- console.error('Full error: ', error);
9132
+ console.error('Full error: ', JSON.stringify(error));
9128
9133
  if (error instanceof axios.AxiosError) {
9129
9134
  console.error('Error: ', error.message);
9130
9135
  console.error('Error response: ', error.response, 'error data: ', error.response?.data);
@@ -9289,7 +9294,7 @@ class PagarmeV5PixAxiosAdapter {
9289
9294
  return payment;
9290
9295
  }
9291
9296
  catch (error) {
9292
- console.error('Full error: ', error);
9297
+ console.error('Full error: ', JSON.stringify(error));
9293
9298
  if (error instanceof axios.AxiosError) {
9294
9299
  console.error('Error: ', error.message);
9295
9300
  console.error('Error response: ', error.response, 'error data: ', error.response?.data);
package/index.esm.js CHANGED
@@ -8590,6 +8590,11 @@ class PagarMeV5RequestHelper {
8590
8590
  type: 'individual',
8591
8591
  document: checkout.user.cpf,
8592
8592
  phones: {
8593
+ home_phone: {
8594
+ country_code: '55',
8595
+ number: checkout.user.phone.slice(2),
8596
+ area_code: checkout.user.phone.slice(0, 2),
8597
+ },
8593
8598
  mobile_phone: {
8594
8599
  country_code: '55',
8595
8600
  number: checkout.user.phone.slice(2),
@@ -8728,11 +8733,11 @@ class PagarMeV5ResponseHelper {
8728
8733
  acquirer_message: transaction.acquirer_message?.toString(),
8729
8734
  acquirer_return_code: transaction.acquirer_return_code?.toString(),
8730
8735
  installments: transaction.installments ?? null,
8731
- card_holder_name: transaction.card.holder_name?.toString(),
8732
- card_last_digits: transaction.card.last_four_digits?.toString(),
8733
- card_first_digits: transaction.card.first_six_digits?.toString(),
8734
- card_brand: transaction.card.brand?.toString(),
8735
- card_id: transaction.card.id?.toString(),
8736
+ card_holder_name: transaction.card?.holder_name?.toString(),
8737
+ card_last_digits: transaction.card?.last_four_digits?.toString(),
8738
+ card_first_digits: transaction.card?.first_six_digits?.toString(),
8739
+ card_brand: transaction.card?.brand?.toString(),
8740
+ card_id: transaction.card?.id?.toString(),
8736
8741
  };
8737
8742
  }
8738
8743
  }
@@ -9026,7 +9031,7 @@ class PagarmeV5BankSlipAxiosAdapter {
9026
9031
  return payment;
9027
9032
  }
9028
9033
  catch (error) {
9029
- console.error('Full error: ', error);
9034
+ console.error('Full error: ', JSON.stringify(error));
9030
9035
  if (error instanceof AxiosError) {
9031
9036
  console.error('Error: ', error.message);
9032
9037
  console.error('Error response: ', error.response, 'error data: ', error.response?.data);
@@ -9099,7 +9104,7 @@ class PagarmeV5CardAxiosAdapter {
9099
9104
  if (error instanceof PaymentError) {
9100
9105
  throw error;
9101
9106
  }
9102
- console.error('Full error: ', error);
9107
+ console.error('Full error: ', JSON.stringify(error));
9103
9108
  if (error instanceof AxiosError) {
9104
9109
  console.error('Error: ', error.message);
9105
9110
  console.error('Error response: ', error.response, 'error data: ', error.response?.data);
@@ -9264,7 +9269,7 @@ class PagarmeV5PixAxiosAdapter {
9264
9269
  return payment;
9265
9270
  }
9266
9271
  catch (error) {
9267
- console.error('Full error: ', error);
9272
+ console.error('Full error: ', JSON.stringify(error));
9268
9273
  if (error instanceof AxiosError) {
9269
9274
  console.error('Error: ', error.message);
9270
9275
  console.error('Error response: ', error.response, 'error data: ', error.response?.data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "5.1.0-beta.4",
3
+ "version": "5.1.0-beta.5",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },