Replies: 2 comments
-
Hello @cuartas15, in order to be able to give you more adequate support, I need to understand a little more about what you are trying to do. how are you setting which currency you're using? This error seems to me that our API, which returns the installments, isn't returning any values. Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi, just to report, we figured out that Mercadopago SDK doesn't allow inputting the currency manually even if the request structure may have a 'currency_id' property, it doesn't do anything with that, it'll only charge with the currency the public and private key are attached to the country of the account created in mercadopago. Thanks anyways |
Beta Was this translation helpful? Give feedback.
-
I'm using the latest version of mercadopago.js (v0.0.3)
Let's say I'm gonna charge for something that costs 500USD or EUR, when I type one of the testing Card numbers I get an error on console saying:
v2:2 MercadoPago.js - Failed to get installments. Use cardForm callbacks to intercept the error TypeError: Cannot destructure property 'payer_costs' of 'e[0]' as it is undefined.
at i (v2:2:73599)
at _e.value (v2:2:66727)
I found out it's due to the amount set to cardform, if it's a number lower than 4 digits it'll fail and since there doesn't seem to be a way to specify the currency of the amount charged either (which I think it's necessary for this and the PHP SDK isn't it?) maybe it's hardcoded to expect latin american usual values that tend to go higher than 3 digits.
This is my code
`
async GetMercadoPagoObject() {
await loadMercadoPago();
}
`
Any help is greatly appreciated
Beta Was this translation helpful? Give feedback.
All reactions