#nyxi_mobilepay-charge

1 messages ยท Page 1 of 1 (latest)

twilit valeBOT
astral flareBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

twilit valeBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1245875792387506216

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

shrewd parrot
#

Hello again ๐Ÿ™‚

#

I was informed by my beta contact that this would change to my expected implementation (and what the docs say) after March 27.

#

This is again from upgrading to the automatic payment methods; I am storing the payment type, and before this, everything was just card as that was all we supported

real sierra
#

I don't really get the question and the wording

shrewd parrot
#

See pi_3PMHhdLj11Ytqxjb06JF6do8 and go to payment_method_details.type

#

Even though it's a mobilepay payment, it has type: card

#

The docs - and the email I received from my beta support - suggests it should now be type: mobilepay and the card should now be under payment_method_details.mobilepay.card

real sierra
#

yeah but I assume you are still in the beta or similar? Sorry I don't know what email you got and that's usually more a question for your beta contact I'd say

shrewd parrot
#

It's no longer in beta and the docs are public

#

I can ask him of course

real sierra
#

sure but that doesn't mean you as a business aren't still in the beta.

#

What do you get on a brand new Stripe account (not your current one)

shrewd parrot
#

No idea, I only have one account

#

I mean this is a connect account

#

But it was also in the beta

real sierra
#

Ah yes sorry what I meant is that you can create a brand new Stripe account and try it in Test mode and confirm

#

nyxi_mobilepay-charge

shrewd parrot
#

That's a lot of work for me if I want to do a payment with mobilepay

real sierra
shrewd parrot
#

Yes, that was mine too

#

But evidently: pi_3PMHhdLj11Ytqxjb06JF6do8

real sierra
#

I hope it's okay to push back a bit. It will take you 5 minutes to try this in Test mode on a brand new account I would say

shrewd parrot
#

I've never created a new account to test anything ๐Ÿ˜„

#

I've never actually created a stripe account since mine

#

Either way, it's unexpected, so no matter the outcome, I will have to have it looked at

#

so I'll email my beta contact and ask if I'm not on the GA version for whatever reason and what the plan is

real sierra
#

That's fair, but I would recommend doing what I said. That will make your life easier

shrewd parrot
#

But isn't the outcome the same?

  1. I find out I'm on a different version and the change notification I got was not applied to my account(s) after March 27 -> I must email
  2. It's a bug and needs to be fixed -> I must email

What's the easiest way to complete a mobilepay payment with no UI/backend?

real sierra
#

I mean it's not really the same. In your world you just send the same question to someone else and wait for them to figure it out. In my world you know the definitive answer, know how to test and can ask for exactly what you need.
Definitely less work for you your way, but a lot more details and wasted support work

While we talked I

  1. Created a new account in Denmark in the Dashboard
  2. Got the API keys
  3. Created a Checkout Session with payment_method_types: ['mobilepay'] and completed a payment
  4. Looked at the Charge and confirmed it has type: 'mobilepay' as expected
shrewd parrot
#

Yeah I would still be on 3 because I have never used checkout ๐Ÿ˜„

#

But thanks. I will include this information. Maybe my account is still in the beta.

real sierra
#

You can do PaymentElement or whatever else you are familiar with. I've worked with you for many years now, I know you know our API really well

#

My understanding of the rollout to GA was that we told everyone "hey careful by date X the type will change" and it seems to match what you assumed too. But I guess we missed something and you still get the old type

shrewd parrot
#

Yes, I have decent amount of experience with the API, but I have very little experience with setting up test environments, because we never do it. I just have our platform + connect test accounts hooked up to it all locally and on our staging environment. I don't think it's entirely fair to expect me to be just as good/fast with all kinds of scenarios as you. This was why I asked you what the easiest way to test it was; because I don't know. I was going to do it.

shrewd parrot
#

I just never looked at it since

#

so we've just handled everything as card "silently"

#

which is fine, just not entirely what I wanted here when we start saving the payment type

real sierra
#

I don't think it's entirely fair to expect me to be just as good/fast with all kinds of scenarios as you.
that's fair feedback! But I do think it's that simple. I'd recommend trying for that specific use-case. For example here's my code ```$stripe = new \Stripe\StripeClient([
'api_key' => STRIPE_KEY_SECRET_DK,
]);

$checkoutSession = $stripe->checkout->sessions->create([
'success_url' => 'https://example.com',
'line_items' => [
[
'price_data' => [
'unit_amount' => 10000,
'currency' => 'dkk',
'product_data' => [
'name' => 'DKK MobilePay',
],
],
'quantity' => 1,
],
],
'mode' => 'payment',
'payment_method_types' => ['mobilepay'],
]);

header('Location: ' . $checkoutSession->url);

shrewd parrot
#

Yes, and I would have done this if I knew it was that easy.

#

In my world I was going through "okay new connect account, new oauth flow, change all the local keys/envs" etc etc

#

(Again, why I asked for easiest way)

real sierra
#

yeah if you do a new connect account then it still uses the platform's "settings" like betas and such

#

also.... can you clarify what local keys would change with OAuth? You should only ever use your own platform's API keys right?

shrewd parrot
#

Yes, well like you just said, I would need new platform + new connect, which means new client IDs, oauth callback urls and keys

#

because I was going to replicate my own flow, that I observed the error on

real sierra
#

ah gotcha, I was afraid you meant you were still using the old access tokens integration path ๐Ÿ˜…

shrewd parrot
real sierra
#

As long as you use your own platform key and not the API key you get back during the OAuth flow you're good

shrewd parrot
#

yeah we never use those

#

I just store them because they're part of the response

real sierra
#

So yeah my advice is to have a separate Stripe account that you can test one-off things on quickly. I do that a lot. Like you I have my main account that has 99% of my data/test but when I need to figure out something weird like what happened to you, I switch to one of my other accounts that basically has no custom feature (or I create a new one to start fresh)

shrewd parrot
#

That's a fine idea. I may do that next time.

#

So, test-efforts aside, the concluson is that something is wrong with my account(s), based on what we see on pi_3PMHhdLj11Ytqxjb06JF6do8, yes ?

#

Uh... what. Where did I look before

#

Now it has mobilepay

#

what the hell

#

Ah it it's on the capture response

#

req_s48FFAViTxE1ZF

#

Here's it's type: mobilepay, but on the webhook evt_3PMHhdLj11Ytqxjb0qONtWXb it's card

#

maybe it's webhook API version then?

real sierra
#

I'm confused, in that API Request you shared it is card not mobilepay

#

ah you got them backwards. API is card, Event is mobilepay

shrewd parrot
#

I too am slightly confused

#

Yes

#

But API here is the newest version

real sierra
#

not really

#

Your call has charges in the response on PaymentIntent which we deprecated almost 2 years ago already so you're definitely on an old API version

shrewd parrot
#

req_s48FFAViTxE1ZF is Stripe/v1 PhpBindings/14.7.0 and has payment_method_details.type == card

real sierra
#

But my take is that the issue is still related to the beta feature on your account. We'd need to remove that beta feature so that you see mobilepay everywhere and never card

#

ah yes my bad I got mixed up too

shrewd parrot
#

I guess that that is the conclusion yes

#

So you too are mortal

#

I will ask my beta contact about this and whether something needs to be done, because this is really confusing

real sierra
#

agreed

shrewd parrot
#

I'm on 2022-11-15

#

I read all the changelogs, yes

real sierra
#

You're on the latest version of stripe-php. It forces the latest API version automatically so that request you made is already using the latest API version

shrewd parrot
#

Yes, but that's my test env

#

production is 2022-11-15

#

before version pinning in the SDK

real sierra
#

gotcha, overall it's fine, none of what you are asking is related to that. It looks like a real bug in my eyes.

shrewd parrot
#

I must have some kind of highscore

real sierra
#

I was involved in this rollout, I "forced" the rename of the type myself and the design of the rollout. What they did on the Event with the email you got they should have done in the API response too. I think it was missed ๐Ÿ˜ฆ

shrewd parrot
#

Okay, makes sense

real sierra
#

Until I saw your Event example I assumed they just never rolled out the change to beta users. Once you shared that Event and the capture request I realized the issue was different (and then it explained the confusion we both had)

shrewd parrot
#

It almost sounds like you'd be the person to handle this then. I can still email Kaust if you think that's best?

real sierra
#

I'd recommend you do email them. Like I'm flagging the bug internally but someone still needs to figure out if removing you from the beta is "safe" and the right fix or if something else needs to happen and they would know

shrewd parrot
#

Roger that

#

With no announcements/bumping version, if it affects everyone, it's almost a breaking change, even though it was unintended behavior to begin with

#

(fixing it, that is)

real sierra
#

Agreed! This is not going to be easy to fix ๐Ÿ˜… but for you it might be easy enough since you were already handling both.

shrewd parrot
#

Yeah I made this change back when I received the email:

real sierra
#

yeah exactly what we were hoping for. Though in my eyes we should have followed up after the change to say "all good you won't see card anymore" and then you'd have immediately said "well I sure do" and someone would have fixed it immediately. That's the ideal world though

shrewd parrot
#

Hehe yea not me as I only stored the card up until now; as you can see I'm just extracting it correctly, so this code in particular doesn't reveal the bug

#

If anything it masks it

real sierra
#

if we had emailed you, wouldn't you have removed the code potentially like you were trying to do now?

shrewd parrot
#

No, because this is a common flow for both card and mobilepay payments

real sierra
#

ah gotcha

shrewd parrot
#

so it would just never hit the top if

#

I'd get the right card anyway

real sierra
#

so you basically just log whatever is in there and don't play the game of "oh a type I've never seen, let me alert to myself to dig into this"

shrewd parrot
#

No because we only ever had card + mobilepay

#

so accepting other types is a new thing

real sierra
#

like in theory we'd email someone, they change their code, they go down ๐Ÿ˜… , they yell at us here, we yell at the product team, problem fixed!

shrewd parrot
#

Hence my work on the automatic_payment_methods as evident from the last weeks conversation

real sierra
#

yeah I think I've been too focused on you doing that migration and forgot about card+MobilePay only even though you did tell me earlier when we looked at BankTransfers

shrewd parrot
#

can't expect you to keep tabs on every developer out there, can they?
We only see the issue now because I've started actually storing the type on our end, and I'm now seeing card in the database for payments I know for sure were mobilepay

real sierra
#

yeah that all makes sense now

shrewd parrot
#

It can be difficult to provide all the necessary context while not giving way too much irrelevant info for you guys to sift through. I try.

twilit valeBOT
real sierra
#

Yeah here I don't think there was a way for you to frame it properly upfront. You gave all the info, but I needed to see both the request and the Event for it to click for me and you couldn't have known that.

#

Hopefully your contact helps fix it quickly though!

shrewd parrot
#

Emailing now, fingers crossed. They've been very satisfied with having me "on the team" so far :)))

real sierra
#

haha, I've tried to have you on my team for years ๐Ÿ˜‰

shrewd parrot
#

I promise I will when this goes belly-up

#

But unfortunately 2023 was our best year ever

real sierra
#

haha I feel conflicted hoping for your project to go belly up. So I'll settle for our conversations here ๐Ÿ™‚

shrewd parrot
#

Hehe. I am sometimes a little annoyed myself that my first ever hobby project ended up taking a decade. I have literally zero corporate experience, I've been self-employed in this since I dropped out of college to do it. It sounds cool and all, but sometimes I'd like to have at least tried being "just an employee" in a tech company.

real sierra
#

yep totally get it! Maybe when you sell the project then!

shrewd parrot
#

Came very close at the end of last year, but it fell through

real sierra
#

damn

shrewd parrot
#

It was an odd situation. Our biggest client (corporation) that uses our platform wants/tries to build a competing platform just for their own use, and they wanted me to do it (or at least lead/help). I think to them it was just a very expensive headhunt, and we couldn't get all shareholders on board with pricing.

real sierra
#

yeah that seems common enough with projects like yours ๐Ÿ˜ฆ

shrewd parrot
#

It's difficult to negotiate price with someone who has the power to take away half your revenue

shrewd parrot
real sierra
#

Okay I got to run so I'll close this thread but others on my team are around if you have new questions! See you next time ๐Ÿ™‚