cancel
Showing results for 
Search instead for 
Did you mean: 

javascript email address from credit card

Contributor

javascript email address from credit card

Hello,

 

I've been integrating javsacript smart buttons and I have a question: How can I find out the user's email address he specified prior to purchase?

 

onApprove: function (data, actions) {

       // code here
       return actions.order.capture().then(function (data) {

               var email = data.payer.email_address // I'm able to get the address when user is paying by PayPal but not when it's via credit card
       }
}

 

How to get the email when user is paying by credit card?