adyen-android
adyen-android copied to clipboard
Field 'brand' is missing in paymentComponentJson - DropInService
Describe the bug Users reported that when checking out with a stored payment method (BNP paribas VISA Debit card), their payments kept failing.
We tracked down, that it's due to the field 'brand' missing on our call to the /payments endpoint. The request body we send to this endpoint is made up of data coming from the DropInService. In our override of onPaymentsCallRequested we log the params from the paymentMethod map and notice brand is missing.
To Reproduce Steps to reproduce the behavior:
- Add a VISA debit card as stored payment method
- Try paying with this card on next checkout
Expected behavior Successful checkout using the stored payment method
Screenshots
Smartphone (please complete the following information):
- Device: OnePlus Nord AC2003 as well as iPhone 13
- OS: Android 11 / iOS 16
- Version [e.g. 22]
Additional context Also reproducable on iOS! Not sure if I need to report another bug on the adyen-ios repo?
Hi, thanks for reaching out. I don't think this is an expected behaviour, could be an issue on the API side.
Please reach out to our support team, include some PSP references and they should be able to help you troubleshoot this better.
Hi again, were you able to solve this issue or do you still need help?
Hello, I met the same issue after inputting the card info, I want to get the brand
info for the credit card, but I got these fields only, is there any way to check it? Thanks. SDK version: 4.8.0
Hi @Lotzzz! Thanks for reaching out. Can you provide information about the following questions so we can understand the issue better?
- Do you receive an error, if so can you provide details about the error? (Where do you get the error? Is it from the API, and if so which endpoint?)
- What kind of card you're using while having this issue? (Is it a dual branded card or a regular card?)
Issue is still ongoing for us as well, a collegue of mine was in contact with your support team. They claim that it will be fixed on your end.
Apparantely the payment call needs this brand field to successfully handle certain payment methods, however, the android and iOS libs don't expose this brand field so we're not able to append it to our request.
This happens with stored payment methods, I'd imagine adyen has enough information when we pass through the stored payment ID?
2. dual
Hello @ozgur00, thanks for the reply, I didn't receive an error when calling the SDK, and also I can pay successfully. I just want to know the brand info for the inputting credit card, and I can see the brand type is AMEX
in the drop in UI, but how to know the brand info in the makePaymentsCall
callback?
Hi again @Lotzzz! If you use onPaymentsCallRequested(paymentComponentState: PaymentComponentState<*>, paymentComponentJson: JSONObject)
callback instead of makePaymentsCall(paymentComponentJson: JSONObject)
you can access the brand via PaymentComponentState
object like the following:
override fun onPaymentsCallRequested(
paymentComponentState: PaymentComponentState<*>,
paymentComponentJson: JSONObject
) {
// ...
if (paymentComponentState is CardComponentState) {
val cardType = paymentComponentState.cardType
}
// ...
}
Hi again @Lotzzz! If you use
onPaymentsCallRequested(paymentComponentState: PaymentComponentState<*>, paymentComponentJson: JSONObject)
callback instead ofmakePaymentsCall(paymentComponentJson: JSONObject)
you can access the brand viaPaymentComponentState
object like the following:override fun onPaymentsCallRequested( paymentComponentState: PaymentComponentState<*>, paymentComponentJson: JSONObject ) { // ... if (paymentComponentState is CardComponentState) { val cardType = paymentComponentState.cardType } // ... }
Thanks, for now, we just remove this field 😄