#alanx4654

1 messages ยท Page 1 of 1 (latest)

hazy pikeBOT
hollow tiger
royal spoke
#

and wallet in it?

#

like

card: {
wallet: "google_pay"
}

#

am i right?

hollow tiger
#

The API reference has all the available fields

royal spoke
#

OK

#

what about here

#

what will got if I use applepay

#

any ideas?

#

or googlepay

hollow tiger
#

Did I not explain this already?

#

type: 'card'

#

And there'd be a card[wallet] hash

royal spoke
#

what I will got if I use applepay

#

I want got the card brand

hollow tiger
#

Did I not just answer this?

#

We're just repeating the same question

royal spoke
#

card.brand

hollow tiger
#

Why not test an Apple Pay transaction and find out?

royal spoke
#

if type is card, why there no apple_pay or google_pay ?

hollow tiger
#

Because that's not a brand

#

As I explained, there'll be a card[wallet] hash if it's a Google/Apple Pay payment

royal spoke
#

OK, fine

hazy pikeBOT
royal spoke
#

String cardType = subscription.getDefaultPaymentMethodObject().getCard().getBrand();
cardType = (cardType == "unknown") ? subscription.getDefaultPaymentMethodObject().getCard().getWallet().getType();
cardInfo.setCardType(cardType);

#

am i right?

#

I want to show payment logo on my own page

#

so I need to know what's the payment method...

#

brand is the key field I need

cloud lion
#

Hi! I'm taking over this thread.

royal spoke
#

you are so nice

#

I want to show payment logo on my own page
so I need to know what's the payment method...
brand is the key field I need

String cardType = subscription.getDefaultPaymentMethodObject().getCard().getBrand();
cardType = (cardType == "unknown" && subscription.getDefaultPaymentMethodObject().getCard().getWallet() != null) ? subscription.getDefaultPaymentMethodObject().getCard().getWallet().getType() : cardType;
cardInfo.setCardType(cardType);

#

am i right in this way?

cloud lion
#

That looks okay to me, but the best way to know it to actually test the code ๐Ÿ™‚

royal spoke
#

I dont have google pay ๐Ÿ˜ข

cloud lion
#

You can't set it up for a quick test?

royal spoke
#

I just want to confirm ....If I use google pay , the card.brand will give me unknown ?

and google_pay will be in the card.wallet.type field?

cloud lion
#

Give me a few minutes to test this on my end.

#

In my case I do see the brand of the card, and I get wallet.type: "google_pay"

royal spoke
#

what's your brand value?

cloud lion
#

It depends on the card used I guess. In my case it was visa.

#

Note that I tested this in test mode, in live mode it might be different.

royal spoke
#

Is there any suggestion about show payment logo on my own front-end page?

cloud lion
#

So I recommend just looking at wallet.type to know if the card is Google/Apple Pay.

royal spoke
#

ok, big thanks