#B33fb0n3

1 messages · Page 1 of 1 (latest)

idle ridgeBOT
subtle wing
#
  1. name and email should be handled in your integration (frontend form)
austere grotto
#

so I need to create my own form fields and then just for the payment itself the customer can use the express checkout element?

subtle wing
#
  1. You set shippingAddressRequired: true when creating the elements ?
    What is the undefinded. Can you share more details about the error ?
austere grotto
#

oh ok 😦

austere grotto
#

What is the undefinded
event.shippingAddress this is undefined

#

Can you share more details about the error ?
there is no error. If I try to use it, it's just undefined

#

the variable does not contain anything

subtle wing
#

Can you share some of your integration please?

austere grotto
subtle wing
#

your on click and on shippingaddresschange handlers.

austere grotto
#

I know it's not right to generate the paymentintent on click, but I also validate the items in the process. Because of that you see some timeout functions because the click element need to be resolved in under one second and I dont know if the API respond in under one second

subtle wing
#

Yes this is not recommended to add timeouts... but I don't think that has a direct link to the address issue.

austere grotto
#

direct link to the address
why should it?

subtle wing
#

So the event shippingaddresschange is being called but the shippingAddress is undefined. Did you try to log the event object by chance ?

subtle wing
austere grotto
subtle wing
#

what the event object is undefined too ?

austere grotto
austere grotto
subtle wing
#

Could you please narrow the data object ?

austere grotto
#

sure:

    "type": "inner",
    "controllerId": "__privateStripeController9901",
    "frameId": "__privateStripeFrame9906",
    "message": {
        "action": "stripe-frame-event",
        "payload": {
            "event": "shippingaddresschange",
            "data": {
                "nonce": "shippingaddresschange84314",
                "paymentMethodType": "google_pay",
                "address": {
                    "city": "The real City",
                    "state": "",
                    "postal_code": "the real postal code",
                    "country": "DE"
                },
                "name": ""
            }
        }
    },
    "__stripeJsV3": true
}```
subtle wing
#

I see there is address, I think you can use that. But I'm not sure why event.shippingAddress is undefined in your use case. Is it possible to share the complete integration (or a sample project that has only the minimum shippingAddress requirements and that re produces your issue)

#

I'm afraid that in your integration you are having something particular that is causing this...

idle ridgeBOT
austere grotto
#

hm let me check this

austere grotto
#

the event variable is nowhere defined in the stripe documentation 🤔

wide wind
#

it is documented

#

but I see now you're not using the PaymentRequestButton, you're using the ExpressCheckoutElement

#

which is a new thing that is a beta and our team doesn't have training on

#

so I'd suggest reaching out to the team who helped you get access to it and they can provide beta support!

austere grotto
#

I never asked for any I think. I just logged out the whole event which is pharsed by the function and got this element:

{
    "elementType": "expressCheckout",
    "name": "",
    "address": {
        "city": "abc",
        "state": "",
        "postal_code": "12345",
        "country": "DE"
    }
}

and the reject and resolve funtion. So I won't get the full name and the full address, but the near address

#

the resolve function also have an e in it. Should I use that?

wide wind
#

I have no idea, I don't know how this ExpressCheckoutElement integration works