Stripe Doesn't Send User's Name Detail To Stripe

When using the Stripe Gateway in Protected Content, the only thing sent over to Stripe is the user's email address. In the Stripe account, the only thing that shows for the payment is the email address. I need the Stripe API in Protected Content to send over the First and Last name of the user, as well as the email address. Stripe Support says this would be something that needs to be done on the code side.

  • Patrick

    Hi there @christina_hooper

    I hope you're well today!

    Indeed, the only data that is sent automatically to Stripe is the user email. There is also no built-in option or addon to enable you to send additional data.

    This would need to be addressed in the plugin gateway code. However, as I am not quite sure how to accomplish that, I've asked one of our 2nd-level wiz-kids to join in here to help out. :slight_smile:

  • Hoang Ngo

    Hi @christina_hooper,

    I've checked the docs, we can send the customer name, but in metadata variable. I don't see any other parameters support for First Name & Last Name. Also, we will need to modify the plugin core code, that's mean when you update the plugin, you will need to re-add the code.

    If you fine with that, here is the steps
    1. Open the file /protected-content/app/gateway/stripe/class-ms-gateway-stripe.php, line 175-180, you will see this code block

    $customer = Stripe_Customer::create(
    					array(
    						'card' => $token,
    						'email' => $member->email,
    					)
    				);

    Please update it to

    $customer = Stripe_Customer::create(
    					array(
    						'card' => $token,
    						'email' => $member->email,
                            'metadata'=>array(
                                'First Name'=>$member->first_name,
                                'Last Name'=>$member->last_name
                            )
    					)
    				);

    Lets see if it works for you. If you have any issues please don't hesitate to let us know so we can assist.

    Best regards,
    Hoang

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.