#nyxi_mobilepay-charge
1 messages ยท Page 1 of 1 (latest)
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.
- nyxi_connect-paymentmethoddomain, 4 hours ago, 130 messages
- nyxi_paymentmethod-multibanco, 23 hours ago, 32 messages
- nyxi_docs, 2 days ago, 24 messages
- nyxi_paymentelement-updates, 2 days ago, 37 messages
- nyxi_automatic-payment-methods, 2 days ago, 91 messages
- nyxi_docs, 6 days ago, 11 messages
๐ 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.
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
I don't really get the question and the wording
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
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
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)
No idea, I only have one account
I mean this is a connect account
But it was also in the beta
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
That's a lot of work for me if I want to do a payment with mobilepay
My understanding is that you should get type: 'mobilepay' in the API. That's what's publicly documented here: https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-mobilepay
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
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
That's fair, but I would recommend doing what I said. That will make your life easier
But isn't the outcome the same?
- 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
- 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?
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
- Created a new account in Denmark in the Dashboard
- Got the API keys
- Created a Checkout Session with
payment_method_types: ['mobilepay']and completed a payment - Looked at the Charge and confirmed it has
type: 'mobilepay'as expected
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.
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
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.
Yes, I received this info, and it was scheduled for March 27, so I made my API handle both scenarios
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
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);
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)
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?
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
ah gotcha, I was afraid you meant you were still using the old access tokens integration path ๐
Not really sure what that is. We just do the OAuth flow
As long as you use your own platform key and not the API key you get back during the OAuth flow you're good
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)
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?
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
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
req_s48FFAViTxE1ZF is Stripe/v1 PhpBindings/14.7.0 and has payment_method_details.type == card
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
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
agreed
Do I need to do something here? My plan is just to upgrade to the newest PHP lib, which now pins the API version, and that should be fine, yes? And of course I should not access that property.
I'm on 2022-11-15
I read all the changelogs, yes
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
Yes, but that's my test env
production is 2022-11-15
before version pinning in the SDK
gotcha, overall it's fine, none of what you are asking is related to that. It looks like a real bug in my eyes.
I must have some kind of highscore
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 ๐ฆ
Okay, makes sense
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)
It almost sounds like you'd be the person to handle this then. I can still email Kaust if you think that's best?
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
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)
Agreed! This is not going to be easy to fix ๐ but for you it might be easy enough since you were already handling both.
Yeah I made this change back when I received the email:
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
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
if we had emailed you, wouldn't you have removed the code potentially like you were trying to do now?
No, because this is a common flow for both card and mobilepay payments
ah gotcha
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"
No because we only ever had card + mobilepay
so accepting other types is a new thing
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!
Hence my work on the automatic_payment_methods as evident from the last weeks conversation
Hehe ๐
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
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
yeah that all makes sense now
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.
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!
Emailing now, fingers crossed. They've been very satisfied with having me "on the team" so far :)))
haha, I've tried to have you on my team for years ๐
I promise I will when this goes belly-up
But unfortunately 2023 was our best year ever
haha I feel conflicted hoping for your project to go belly up. So I'll settle for our conversations here ๐
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.
yep totally get it! Maybe when you sell the project then!
Came very close at the end of last year, but it fell through
damn
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.
yeah that seems common enough with projects like yours ๐ฆ
It's difficult to negotiate price with someone who has the power to take away half your revenue
Yes, it's a bit too niche
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 ๐