#aeo_googlepay-connect-pmc

1 messages ยท Page 1 of 1 (latest)

weak fableBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1488645319481888909

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

unkempt estuary
#

my use case is: I am a platform account with hundreds of connected accounts, I have a toggle in my system to "enable mobile wallets", when that is clicked, I want to enable both apple pay / google pay to be used in the PaymentElement at checkout, and then also register the domains with stripe / apple ( which I've already accomplished), I'm just unsure on how to enable / disable the high level availability at the account level.. similar to how you can enable / disable in the Dashboard UI when editting viewing the "Payment Methods" from a connected account

warped stone
#

so if you set that to "on" and the account has the proper capabilities, available will switch to "true" when you retrieve the PMC

unkempt estuary
#

so DisplayPrefence = ON/off is a toggle for "eabled / disabled" in the Payment Methods view in the dashboard?

warped stone
#

yep!

unkempt estuary
#

i might suggest normalizing the keywords ๐Ÿ™‚

#

display preference is not really giving the "feeling" or enabled / disabled

#

of*

warped stone
#

hahaha fair ๐Ÿ˜…

#

but yes that should be what you're looking for

unkempt estuary
#

perfect, i'll give it a shot, thank you.

warped stone
#

yep of course!

unkempt estuary
#

one more question ๐Ÿ™‚

#

how do I retrieve the current PMC for an account?

warped stone
unkempt estuary
#

thank you...

#

wait, that wants a PMC_xxx ... how do I find the current one with just an acct_id?

warped stone
#

oh you just want to retrieve all of them for a specific account? calling the list endpoint should work

#

a given account can have multiple, so if you want the default you want to look for the one flagged as is_default: true

unkempt estuary
#

well, yes, but like how do I know the "active" one

#

ok

warped stone
unkempt estuary
#

fair enough, call list and look for is_default. just for knowledge, what is the case where multiple are "active"?

warped stone
#

"active" just decides whether or not it can actually be used - you can have multiple PMCs and pass them when creating an invoice, payment intent, subscription etc. is_default will determine which one among the active ones will be used if no PMC is specified and no payment_method_types are passed (because when these are passed we ignore the PMC entirely)

unkempt estuary
#

got it.. makes sense

#

thanks again.

warped stone
#

yep of course!

#

lemme know if you need anything else, i'll keep the thread open for a bit

unkempt estuary
#

so something like this to enable both:

#

var pmcService = new PaymentMethodConfigurationService();
var defaultPmcId = pmcService.List(null, GetAccountLevelRequestOptions).Where(p => p.IsDefault).FirstOrDefault()?.Id;

            if (string.IsNullOrEmpty(defaultPmcId)) {
                log.Error("No default payment method configuration found for account " + MerchantId);
                return false;
            }

            var pmcuOptions = new PaymentMethodConfigurationUpdateOptions {
                ApplePay = new PaymentMethodConfigurationApplePayOptions {
                    DisplayPreference = new PaymentMethodConfigurationApplePayDisplayPreferenceOptions() {
                        Preference = "on"
                    },
                },
                GooglePay = new PaymentMethodConfigurationGooglePayOptions {
                    DisplayPreference = new PaymentMethodConfigurationGooglePayDisplayPreferenceOptions() {
                        Preference = "on"
                    },
                },
            };
            
            pmcService.Update(defaultPmcId, pmcuOptions, GetAccountLevelRequestOptions);
warped stone
#

yep! that looks right

unkempt estuary
#

thanks!

#

and for disabling.. if I just leave the domains registered, thats fine... in case the want to enable in the future, i dont have to worry about that part?

warped stone
#

yep! no reason to disable the domain, if you set the preference to off it will disable it

unkempt estuary
#

great. i think that's it... for now.. ๐Ÿ™‚

warped stone
#

turns out there are many levels on which wallets can be disabled, so most of the time people struggle more with getting it to show than the reverse ๐Ÿ˜›

unkempt estuary
#

i've already exprerienced that part

warped stone
#

we all have at one point

unkempt estuary
#

still have to figure out why google pay is not showing up on my chrome iphone. but shows in desktop chrome

#

maybe thats just apple being naughty.. .idk

#

idk... still just digging into these wallets... and they are a little annoying ๐Ÿ™‚

warped stone
unkempt estuary
#

well... this is "interesting"

#

i was testing that bit of code... and Apple Pay is turning off / on, but google pay is not toggling

#

in the dashboard it shows that is is still "enabled" and not inheritting from my platform settings, even after I call that update

#

but apple pay does actually toggle..

#

is the update api endpoint restricted to only updating 1 thing at a time?

#

nope, I tried just updating google pay by itself, and the dashboard is not reflecting the change.

warped stone
#

can you share the PMC ID with me?

unkempt estuary
#

pmc_1Sg8jCAjxmkU1mQBZfBSXWcW

#

sandbox

warped stone
#

can you share the request ID where you tried updating it? i see it's still set to this in the PMC:

    available: false,
    display_preference: {
      overridable: true,
      preference: "off",
      value: "off"
    }
  },```
unkempt estuary
#

that would be what I expected... but

warped stone
#

ahhh i see, i assumed you were trying to enable them ๐Ÿ™ƒ 1 sec

unkempt estuary
#

yeah, sorry, was testing back and forth...

#

apple pay worked.. and the disabled/enabled reflects on that page..

warped stone
#

do you know if google pay is actually displaying? or have you not gotten that far in testing

#

wondering if it's just the dashboard being weird

unkempt estuary
#

i didn't test that... was just trying to verify the api request was doing its thing

warped stone
#

yeah theoretically if the PMC has it disabled it shouldn't show. obviously it's not great if the dashboard is misleading though

#

lemme see if i can test it out myself real quick

unkempt estuary
#

i gotta go get a kid from school, but I'll be back in like 15 minutes

#

let me know what you find

warped stone
#

k

#

hmmm when i'm testing it the dashboard is updating

#

can you share the request ID req_ where you're updating the preferences so i can sanity check something?

weak fableBOT
unkempt estuary
#

ok.. i'm back... sure, one sec

#

i just did this one

#

req_YRIHmV8GlQxnB9

shy merlin
#

Hi ๐Ÿ‘‹

I'm stepping in as my colleague had to go

unkempt estuary
#

howdy!

shy merlin
#

I can see you are updating the PMC identified as pmc_1Sg8jCAjxmkU1mQBZfBSXWcW and it does show Google Pay as inactive in the API response.

google_pay: {
    available: false,
    display_preference: {
      overridable: true,
      preference: "off",
      value: "off",
    },
  },
unkempt estuary
#

yep, that's not the issue... it is still showing as "enabled" in the dashboard

shy merlin
#

Unfortunately, we cannot provide much insight into the logic of what is being displayed in the Dashboard (thats not our team's speciality). But are you seeing Google Pay show up in any surfaces where it shouldn't?

unkempt estuary
#

ok, that's kind of a non-answer... but I don't feel confident in it "working" if the dashboard is not showing it correctly.. reference your colleagues message above, "obviously it's not great if the dashboard is misleading though".... additionally, why was he not able to repro that?

shy merlin
#

It isn't great if the Dashboard is being misleading but, as my colleague pointed out they (and I) have not been able to reproduce the behavior you are seeing. I don't think it's a good thing either but, unfortunately, we cannot provide support for it here on this server because the staff who maintain it are not experts in the logic that controls the dashboard.

unkempt estuary
#

ok... how do you suggest I ease the concern?

#

I'm a platform account using UA2 accounts... i don't know if that helps in any way?

#

maybe there is something funky with my sandbox account?

shy merlin
#

Both the Platform PMC and the PMC for the Connected account show Google Pay as disabled

unkempt estuary
#

ok.. i'm not sure how to feel better about moving this to prod

shy merlin
#

I would recommend testing it in a situation where you would normally see Google Pay and validate that Google Pay is no longer present

#

It's easily testable

unkempt estuary
#

ok.. well, interesting.. maybe... i manually disabled google pay from the dashboard, and now it responds accurately to both enablement and disablement through the api

shy merlin
#

You can create a Checkout Session or Payment Link (or render a Payment Element) that consumes this PMC and it should exclude Google Pay. There will also be logs on our end where we can see this

unkempt estuary
#

so.. ยฏ_(ใƒ„)_/ยฏ

shy merlin
#

The API is our source of truth but it's definitely odd that the Dashboard appears to differ

unkempt estuary
#

i'm going to not worry about it anymore ๐Ÿ™‚ likely a sandbox / setup / caching issue of some sort...

#

thank you

shy merlin
#

Happy to shed what little ๐Ÿ’ก I can ๐Ÿ™‚