#storm-checkout-features
1 messages ยท Page 1 of 1 (latest)
Sure. can't remember how to do code snippets in discord so apologies:
'shipping_options' => [
'shipping_rate_data' => [[
'display_name' => 'First Class',
'type' => 'fixed_amount',
'fixed_amount' => [
'amount' => 1234,
'currency' => 'GBP',
],
],],
],
Thank you
would you prefer the whole block?
This is the error it's giving:
invalid_request_error - shipping_options
Invalid array
I'm using the PHP library if that's relevant too ๐
you need an extra set of [ ] at the top level and one less at the item level
[ // one shipping option
'shipping_rate_data' => [ 'display_name' => ...]
],
[ // another shipping option
'shipping_rate_data' => [ 'display_name' => ...]
]
]`
okay, so shipping options is an array of shipping rate data objects. I'm with you.
let me give that a whirl
perfect. you're a star.
Once I get past the silly errors this system is really nice
Not sure if I sound put a second question here or open a new one.
I've set phone number collection to true and the input box is there on the checkout page but when I complete a payment the returned object has phone as null.
Is that a testing issue or do I have something wrong?
I have it set like the guide page code example:
'enabled' => true,
],```
Asking here is totally fine. Do you have the ID of the payment (pi_123) or Checkout Session (cs_test_123) that this happened with?
storm-checkout-features
@quaint hatch can you clarify what is "null"? When I look at the Event for that Session the Customer has a phone number set as expected: https://dashboard.stripe.com/test/events/evt_1MRec7KxtlPOg2vt1c2WITfz
I'm looking in the logs on the dashboard and the /v1/payment_methods post, it shows billing information as follows:
"address": {
"city": "Lincoln",
"country": "GB",
"line1": "6 Norton Disney Road",
"line2": "carlton-le-moorland",
"postal_code": "LN5 9JB",
"state": null
},
"email": "test@stormriderstudios.com",
"name": "Stewart Leonard",
"phone": null
},```
Am I looking in the wrong place?
okay, so it shows up in the events. I haven't got to the part where I get the payment confirmation yet (very new to stripe, sorry)
Totally fine, lots of separate objects to look at. Right now we set the collected phone number on the Customer object, not the PaymentMethod
okay, so I just searched up the post payment process and there I'll be setting up the webhook to listen for the payment confirmation which will contain all of the information from the event log, not the paymentmethod log, that sound right?
yes
thank you so much, you guys are awesome
happy to help ๐
I'm sure I'll be back later in the week, this is all working towards using MultiParty, but from what I can tell that just means adding a few extra lines to the checkout session request. Loving it ๐