Skip to content

Saving Card to a customer after the Payment Intent is confirmed #173

@hchandra2019

Description

@hchandra2019

Hello
I was trying to save the payment method for the customer so that it can be used in future. After reading the stripe documentation I got to know that this can be done automatically if the authorize request (creating a new Payment Intent) is sent with the passing following parameters -

$data['setup_future_usage'] = 'off_session';
$data['save_payment_method'] = "true";

I modified the code of src/Message/PaymentIntents/AuthorizeRequest.php under the function getData() with above and it started working.

Can this be added in the code as an extra getter/setter of parameter? Or, let me know if there is another way to achieve this in Payment Intent gateway

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