Reply
Member
Posts: 6
Registered: ‎01-08-2016

Email is required

Hi,

 

I'm using the PHP SDK to integrate with my site and I keep getting an emai is required error in production. Don't get this error with SandBox. My issue is, I am actually sending the value. What am I missing? Here's the code I have

 

$billingAddress->setCountry($data['x_country']);
$billingAddress->setZip($data['x_zip']);
$billingAddress->setEmail($data['x_email']);


$transactionRequestType->setOrder($order);
$transactionRequestType->setPayment($paymentOne);
$transactionRequestType->setBillTo($billingAddress);

 

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Email is required

email is not in billto is in customer.

and it might be set as a required fields on your production merchant account

Login to the Merchant Interface ( https://secure.authorize.net ), click on Settings and Profile -> Payment Form -> Form Fields and uncheck the Required box for the particular FIELD.

Member
Posts: 6
Registered: ‎01-08-2016

Re: Email is required

[ Edited ]

Yes I knew that on the back end email was required..I was passing it in the wrong object like you said. Thank you much.

Member
Posts: 1
Registered: ‎03-13-2017

Re: Email is required

Hi Guys,

 

I am facing the same Issue, Can you please let me know how can I set customer email?

 

Thanks 

Highlighted
Administrator
Posts: 209
Registered: ‎11-03-2016

Re: Email is required

Hi @usman429,

 

Assuming you're also using PHP, I've updated the code samples to include an example of setting an email for a transaction. My changes haven't been pulled into the main repository yet, but you can see the updated sample in my repository here.

-Aaron

Aaron Wright
Developer Evangelist - Authorize.Net

Follow Authorize.Net developer news on Twitter!