#matih_code

1 messages · Page 1 of 1 (latest)

jade sinewBOT
#

👋 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/1422275560247132283

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

woeful wharf
#
# python

        is_parent = customer.buyer.is_parent
        is_swish = False

        if (
            self.company.country.code == settings.SWEDEN_COUNTRY_KEY
            and self.company.currency_code == Company.Currencies.SEK
        ):
            is_swish = True
            payment_method_types.append("swish")

        checkout_kwargs = {
            "customer": customer.stripe_id,  # 'cus_T932HelOJ4y0Zu'
            "line_items": line_items,
            "mode": "payment",
            "payment_method_types": payment_method_types,  # ['card', 'swish']
            "cancel_url": f"{self.location.get_full_url()}?cancelled=1",
            "success_url": f"{settings.ROOT_URL}{success_url}",
            "automatic_tax": {
                "enabled": True,
                "liability": {
                    "type": "self",
                },
            },
            "client_reference_id": str(self.receipt_id),
            "allow_promotion_codes": True,
            "payment_intent_data": {
                "application_fee_amount": self.get_application_fee(),  # 4000
            },
            "stripe_account": self.company.stripe_id,
        }

        if is_swish and is_parent:
            checkout_kwargs |= {
                "payment_method_data": {
                    "billing_details": {
                        "phone": customer.buyer.full_telephone,  # '+46737859110'
                    }
                }
            }

        stripe.api_key = settings.STRIPE_SECRET_KEY
        session = stripe.checkout.Session.create(**checkout_kwargs)
#

When I run this, I get error:
'Received unknown parameter: payment_method_data[billing_details]'

fallen sorrel
#

Hi there, I'll be with you shortly. I'm working on other threads.

woeful wharf
#

This is the message (translated from Swedish to English so that you can understand) your customer experience shared with us:

Thank you for contacting us regarding the issue with Swish payment requests for children under 16. We understand your concern and would like to help resolve this issue.

To fix the problem of sending a Swish payment request to a parent's phone number, please try the following configuration:

  1. When configuring the payment, set payment_method_options[swish][authorization_method] to swish_app.
  2. Enter the parent's phone number in the payment_method_data[billing_details][phone] field. This setting should ensure that the payment request is sent to the parent's Swish app for authorization, instead of displaying a payment window in the current view.

Can you help us investigate this issue further with our internal team?

  1. Send us screenshots of the current behavior you are experiencing (the payment window appears in the view).
  2. Send a screenshot of your current Swish payment configuration settings.
  3. If possible, share a cleaned code snippet of how you currently initiate Swish payment requests.

You can find more information about Swish Payments here (https://docs.stripe.com/payments/swish/accept-a-payment). With this additional information, we will be able to conduct a more thorough investigation and provide you with a more tailored solution if needed.

#

@fallen sorrel if this isn't your purview, please invite one of your colleagues to this channel

fallen sorrel
#

Taking a look, Swish appears to be in beta. I'm assuming you're in the beta?

woeful wharf
#

yes. the platform has been accepted into the beta, and the connected accounts are accepted.
i'm currently trying to make this work in our sandbox

#

however, considering that the AI-generated text is of zero help, are you able to give me some insight?

#

what we're attempting to do is that when we create the checkout, we want to attach which phone number the swish-payment request should be sent to

fallen sorrel
#

We're not familiar with Swish, can you check the email thread from when you were accepted into the beta? Is there a contact email address in there?

woeful wharf
fallen sorrel
#

Typically there should be a contact email that you can reach out directly to.

woeful wharf
#

yes, we did but we got the ai-generated reply back

#

so, you have no other help to share?

fallen sorrel
woeful wharf
#

we started the conversation there, yes

#

the CEO has held the conversation and share the responses with me

#

Luis from Stripe Support

fallen sorrel
#

Gotcha, let me see if there's a dedicated e-mail for this beta.

woeful wharf
#

Any luck?

fallen sorrel
#

Still looking.

#

I just asked internally. I'll let you know when I hear back.

jade sinewBOT
waxen fox
jade sinewBOT
waxen fox
#

Given that is a private feature, you sould want to talk to support.

jade sinewBOT
fallen sorrel
#

@woeful wharf I'm speaking directly with team. Can you provide me with the account IDs?

jade sinewBOT
fallen sorrel
#

@woeful wharf better yet, I'm going to trigger a flow that will have our bot send you a DM to create a support ticket that will come right to our team if you have not reached out to support yet.

jade sinewBOT
#

Hello @woeful wharf, we have sent you a direct message, please check it at https://discord.com/channels/@me/1422607492508024932

  • 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.