Skip to content

gateway->authorize without return_url to allow "next_action": {"type": "use_stripe_sdk"} #152

Open
@R00118189

Description

@R00118189

I followed example on https://github.com/stripe/stripe-payments-demo and would like to use stripe.handleCardAction(response.data.payment_intent_client_secret) to get a popup not redirect as currently package is offering
at this moment i commented this section

// if ($this->getConfirm()) {
//     $this->validate('returnUrl');
//     $data['return_url'] = $this->getReturnUrl();

to get use_stripe_sdk in the response and use frontend stripe.handleCardAction

also i would add

public function isFurtherActionRequired()
    {
        if ($this->getStatus() === 'requires_action' || $this->getStatus() === 'requires_source_action') {
            return (!empty($this->data['next_action']) && $this->data['next_action']['type'] === 'use_stripe_sdk');
        }
    }

my flow is as follows:

  • Create PM on frontend with Stripe.js
  • Create PI on backend and when PI status requires further action i send to frontend PI secret and ask Stripe.js to do handleCardAction
  • Go back to backend and confirm the PI
  • Get status of the PI as succeeded & Fulfil the order on Backend

All in one page No redirects

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions