#notdrwho_paymentelement-pmtypes

1 messages ยท Page 1 of 1 (latest)

ember groveBOT
#

๐Ÿ‘‹ 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/1219691502943600760

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

quasi geode
#

this should not show cashapp

#
"payment_method_types": [
            "card"
        ],
#

that is set in the intent

cold dawnBOT
tiny thicket
quasi geode
#

thank you for your response, its already there -

$setupIntent = $this->client->setupIntents->create( array_filter( [
                'customer'    => $customer->id,
                'description' => trim( $actionTaken->action->action_meta->stripe_receipt_description_one_time ?? '' ) ?: null,
                'metadata'    => [
                    'action_taken_id' => $actionTaken->action_taken_id,
                    'interval'        => (string) $interval->desc,
                    'amount'          => $amount / $split_interval,
                    'type'            => (string) DonationType::SPLIT(),
                    'spark_id'        => $user->ID,
                ],
                'payment_method_types' => ['card']
            ] ) );
#

the dumped json -

{
    "amount": 10000,
    "customer": --REDACTED--,,
    "paymentIntent": {
        "id": --REDACTED--,,
        "object": "setup_intent",
        "application": null,
        "automatic_payment_methods": null,
        "cancellation_reason": null,
        "client_secret": --REDACTED--,
        "created": 1710866973,
        "customer": --REDACTED--,,
        "description": null,
        "flow_directions": null,
        "last_setup_error": null,
        "latest_attempt": null,
        "livemode": false,
        "mandate": null,
        "metadata": {
            "action_taken_id": "1887",
            "amount": "2500",
            "interval": "quarterly",
            "spark_id": "13220",
            "type": "split"
        },
        "next_action": null,
        "on_behalf_of": null,
        "payment_method": null,
        "payment_method_configuration_details": null,
        "payment_method_options": {
            "card": {
                "mandate_options": null,
                "network": null,
                "request_three_d_secure": "automatic"
            }
        },
        "payment_method_types": [
            "card"
        ],
        "single_use_mandate": null,
        "status": "requires_payment_method",
        "usage": "off_session"
    }
}
cold dawnBOT
timid pendant
#

@quasi geode do you have a specific setup intent ID we can take a look at? Also, how are you integrating with the Payment Element? Are you providing it with the setup intent ID when you initialize elements?

ember groveBOT
#

notdrwho_paymentelement-pmtypes

quasi geode
#

"seti_1Ow5qzGArEtkvWCXpEL73Dxs"

#

Sure let me get that for you

timid pendant
#

yeah the reason you're seeing cashapp is because you're using the deferred intent flow, which looks at the mode/currency/amount you set client-side when you initialized element to dyamically decide which PM types to display

quasi geode
#

lovely! thank you karbi!

#

that worked like a charm