thephpleague / omnipay-stripe

Stripe driver for the Omnipay PHP payment processing library
MIT License
185 stars 168 forks source link

Stripe not Receiving Customer Info #203

Open DevynCJohnson opened 3 years ago

DevynCJohnson commented 3 years ago

Stripe via OmniPay does not appear to be sending customer information. On Stripe's website, when viewing information regarding a payment, the customer appears as "None". I am passing the customer information as seen in the below code snippet. If this is not a bug, but rather an case where I over-looked some important piece of documentation, please feel free to enlighten me.

$response = self::$gateway->purchase(
    [
        'amount' => $order_total,
        'card' => [
            'billingAddress1' => $billing['address1'],
            'billingAddress2' => $billing['address2'],
            'billingCity' => $billing['city'],
            'billingCountry' => Countries::getTwoCodeById($billing['country']),
            'billingPostcode' => $billing['zip'],
            'billingState' => isset($billing['state']) ? States::getStateTwoCode($billing['state']) : '',
            'email' => $billing['email'],
            'firstName' => $billing['first_name'],
            'lastName' => $billing['last_name'],
            'shippingAddress1' => $shipping['address1'],
            'shippingAddress2' => $shipping['address2'],
            'shippingCity' => $shipping['city'],
            'shippingCountry' => Countries::getTwoCodeById($shipping['country']),
            'shippingPostcode' => $shipping['zip'],
            'shippingState' => isset($shipping['state']) ? States::getStateTwoCode($shipping['state']) : '',
        ],
        'currency' => VENDOR_CURRENCY === 'CDN' ? 'CAD' : VENDOR_CURRENCY,
        'description' => mb_substr($vendor->vendor_name, 0, 127),
        'metadata' => ['order_id' => $order->order_id],
        'token' => json_decode($nonce)->id
    ]
)->send();
DevynCJohnson commented 3 years ago

Below is a screenshot of the Stripe payment from our sandbox/test environment. Notice that the customer name is "None".

Stripe

darylp041 commented 1 year ago

I'm having issues with this too. So would be good to know if there is a workaround for this?

I've got the same setup as above (albeit minor changes)

domis86 commented 1 year ago

@dazza041 probably you will have better chances if you go study official API docs. Maybe some request rules changes in that API endpoint and are not updated in this package?

When you look at commits https://github.com/thephpleague/omnipay-stripe/commits/master there were 3 commits since this issue was created.