braintree / braintree_php

Braintree PHP library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
545 stars 225 forks source link

Billing address not appearing in transactions Paypal Vault #265

Closed hamzabinamin closed 4 years ago

hamzabinamin commented 4 years ago

We're using recurring subscriptions and I have noticed that the customer address never gets saved in the transaction object. The billing and shipping address object appears null. If it helps we're currently using sandbox paypal accounts to sign up for subscriptions and have tried using bank accounts and credit cards as well.

Client Side

 payment: function () {
                                      return paypalCheckoutInstance.createPayment({
                                        flow: 'vault',
                                        billingAgreementDescription: 'jährliche Gebühr zur Nutzung der Rezeptrechner PRO Funktionalitäten',
                                        enableShippingAddress: true,
                                        shippingAddressEditable: true,
                                        shippingAddressOverride: {
                                          recipientName: firstName + " " + lastName,
                                          line1: address1,
                                          line2: address2,
                                          city: city,
                                          countryCode: 'DE',
                                          postalCode: postal,
                                       //   state: 'IL',
                                       //   phone: '123.456.7890'
                                        } 
                                      });

Server Side

    $result = $gateway->customer()->create([
        'paymentMethodNonce' => $nonce,
        'firstName' => $firstName,
        'lastName' => $lastName,
        'email' => $email,
        'company' => $company,
        'customFields' => [
            'address1' => $address1,
            'address2' => $address2,
            'city' => $city,
            'postalcode' => $postalCode,
            'country' => $country,
        ],
        'creditCard' => [
            'billingAddress' => [
                'firstName' => $firstName,
                'lastName' => $lastName,
                'company' => $company,
                'streetAddress' => $address1 . ' ' . $address2,
                'locality' => $city,
                'postalCode' => $postalCode
            ]
        ] 
    ]);

Also is it somehow possible to attach a braintree "Address" object to the subscription transaction specifically?

hollabaq86 commented 4 years ago

👋 @hamzabinamin, please contact Support referencing this issue, they can assist you with recurring billing behavior.