<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Customer email missing in Sandbox environment in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51965#M27268</link>
    <description>&lt;P&gt;Can you find the transaction in the merchant account? and see if the customer email is populated?&lt;/P&gt;</description>
    <pubDate>Mon, 31 Aug 2015 19:26:24 GMT</pubDate>
    <dc:creator>RaynorC1emen7</dc:creator>
    <dc:date>2015-08-31T19:26:24Z</dc:date>
    <item>
      <title>Customer email missing in Sandbox environment</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51960#M27263</link>
      <description>&lt;P&gt;I am prototyping a payment solution for a site, which requires an email receipt to be sent to the customer after a successful transaction. I installed the Authorize.net package via NuGet to my MVC project, and initial transaction testing has been successful in the sandbox environment. I am getting a response back for both successful and unsuccessful transactions. I am also receiving a merchant email after the successful transaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the customer receipt is not being sent. I have gone through the &lt;A href="https://sandbox.authorize.net/help/Merchant_Interface_RoboHelp_Project.htm#Account/Settings/Transaction_Format_Settings/Transaction_Response_Settings/Email_Receipts.htm%3E%3Epan=2" target="_blank"&gt;documentation from this&lt;/A&gt;, but can't seem to get the customer receipt to send. With further digging, I realized that setting Gateway "TestMode" to true may be the culprit for this. But, as I explored this object, I realized that the constants being used for the gateway URL are not what I want to use for Sandbox development. I can't seem to find a way to modify the URL to point to the Sandbox environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Metadata code for from AuthorizeNet reference&lt;/P&gt;&lt;PRE&gt;namespace AuthorizeNet
{
    public class Gateway : IGateway
    {
        public const string LIVE_URL = "https://secure2.authorize.net/gateway/transact.dll";
        public const string TEST_URL = "https://test.authorize.net/gateway/transact.dll";

        public Gateway(string apiLogin, string transactionKey);
        public Gateway(string apiLogin, string transactionKey, bool testMode);

        public string ApiLogin { get; set; }
        public bool TestMode { get; set; }
        public string TransactionKey { get; set; }

        public IGatewayResponse DecideResponse(string[] rawResponse);
        protected void LoadAuthorization(IGatewayRequest request);
        public IGatewayResponse Send(IGatewayRequest request);
        public virtual IGatewayResponse Send(IGatewayRequest request, string description);
        protected string SendRequest(string serviceUrl, IGatewayRequest request);
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Current code that I am using to process successful transactions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var login = ConfigurationManager.AppSettings["AuthorizeApiLogin"];
var transactionKey = ConfigurationManager.AppSettings["AuthorizeTransactionKey"];

NameValueCollection nvc = new NameValueCollection();

nvc.Add(ApiFields.CreditCardNumber, pvm.CardNumber);
nvc.Add(ApiFields.CreditCardCode, pvm.CardVerificationCode);
nvc.Add(ApiFields.CreditCardExpiration, pvm.ExpMonth + "/" + pvm.ExpYear);
nvc.Add(ApiFields.Zip, pvm.BillingZipCode);
nvc.Add(ApiFields.Amount, pvm.PaymentAmount.ToString());
nvc.Add(ApiFields.Email, email);
nvc.Add(ApiFields.EmailCustomer, "TRUE");
nvc.Add(ApiFields.HeaderEmailReceipt, "DA Header");
nvc.Add(ApiFields.FooterEmailReceipt, "DA Footer");
nvc.Add("x_Custom_Message", "Custom message");

//this is set to test mode - Need to modify URL for Sandblx.
var gate = new Gateway(login, transactionKey, true);

pvm.GatewayRequest = new AuthorizationRequest(nvc);

//send to Auth.NET
pvm.GatewayResponse = gate.Send(pvm.GatewayRequest);

if (pvm.GatewayResponse.Approved)
{
	pvm.ResponseSuccess = true;
	pvm.ResponseError = false;
	pvm.ResponseMessage = pvm.GatewayResponse.Message;
	pvm.ResponseTransactionID = pvm.GatewayResponse.TransactionID;
}
else
{
	pvm.ResponseSuccess = false;
	pvm.ResponseError = true;
	pvm.ResponseErrorMessage = pvm.GatewayResponse.Message;
}&lt;/PRE&gt;</description>
      <pubDate>Mon, 31 Aug 2015 17:10:36 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51960#M27263</guid>
      <dc:creator>SpotOps</dc:creator>
      <dc:date>2015-08-31T17:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Customer email missing in Sandbox environment</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51961#M27264</link>
      <description>&lt;P&gt;That only for point to sandbox or production server. You will need to turn of testmode on your merchant account.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the last param is true, it send to the sandbox url&lt;/P&gt;&lt;PRE&gt;//this is set to test mode - Need to modify URL for Sandblx.
var gate = new Gateway(login, transactionKey, true);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://sandbox.authorize.net/" target="_blank"&gt;https://sandbox.authorize.net/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;under account settings&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2015 17:53:21 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51961#M27264</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2015-08-31T17:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Customer email missing in Sandbox environment</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51962#M27265</link>
      <description>&lt;P&gt;Thank you for the quick response. I double checked the test mode transaction processing under account settings on my merchant account, and it is set to "Live". Is there something else from the merchant account that I am needing to have set to enable the customer email?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Under the Account -&amp;gt; Email Receipts, I have the "Email transaction receipt to customer (if email address is provided)" checked, and some dummy text in the Email Header and Email Footer section.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2015 18:03:22 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51962#M27265</guid>
      <dc:creator>SpotOps</dc:creator>
      <dc:date>2015-08-31T18:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Customer email missing in Sandbox environment</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51963#M27266</link>
      <description>&lt;P&gt;Maybe is the email address itself? could it be blocking authorize.net email?&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2015 18:15:28 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51963#M27266</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2015-08-31T18:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Customer email missing in Sandbox environment</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51964#M27267</link>
      <description>&lt;P&gt;That occured to me as well. The email address I am providing is in the same domain as the email address that receives the merchant email confirmation. I have checked spam settings/folder for this account, and it doesn't seem to be rejecting anything.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2015 18:34:10 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51964#M27267</guid>
      <dc:creator>SpotOps</dc:creator>
      <dc:date>2015-08-31T18:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Customer email missing in Sandbox environment</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51965#M27268</link>
      <description>&lt;P&gt;Can you find the transaction in the merchant account? and see if the customer email is populated?&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2015 19:26:24 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51965#M27268</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2015-08-31T19:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Customer email missing in Sandbox environment</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51967#M27270</link>
      <description>&lt;P&gt;Hmm... Looking at the transaction, I don't see an email address that posted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, that got me looking at supplying the transaction values directly to the Gateway AuthorizationRequest. When I did this, I got the customer email receipt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for pointing me in the right direction, &lt;SPAN class="UserName lia-user-name lia-user-rank-Expert"&gt;&lt;A href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/1353" target="_self"&gt;&lt;SPAN class="login-bold"&gt;RaynorC1emen7&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;. Much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code that was working for me. //Commented out old code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var login = ConfigurationManager.AppSettings["AuthorizeApiLogin"];
var transactionKey = ConfigurationManager.AppSettings["AuthorizeTransactionKey"];

NameValueCollection nvc = new NameValueCollection();

//nvc.Add(ApiFields.CreditCardNumber, pvm.CardNumber);
//nvc.Add(ApiFields.CreditCardCode, pvm.CardVerificationCode);
//nvc.Add(ApiFields.CreditCardExpiration, pvm.ExpMonth + "/" + pvm.ExpYear);
//nvc.Add(ApiFields.Zip, pvm.BillingZipCode);
//nvc.Add(ApiFields.Amount, pvm.PaymentAmount.ToString());
//nvc.Add(ApiFields.Email, email);
//nvc.Add(ApiFields.EmailCustomer, "TRUE");
//nvc.Add(ApiFields.HeaderEmailReceipt, "DA Header");
//nvc.Add(ApiFields.FooterEmailReceipt, "DA Footer");

pvm.GatewayRequest = new AuthorizationRequest(nvc);
pvm.GatewayRequest.CardNum = pvm.CardNumber;
pvm.GatewayRequest.CardCode = pvm.CardVerificationCode;
pvm.GatewayRequest.ExpDate = pvm.ExpMonth + "/" + pvm.ExpYear;
pvm.GatewayRequest.Zip = pvm.BillingZipCode;
pvm.GatewayRequest.Amount = pvm.PaymentAmount.ToString();
pvm.GatewayRequest.Email = email;
pvm.GatewayRequest.EmailCustomer = "TRUE";
pvm.GatewayRequest.HeaderEmailReceipt = "Custom Header";
pvm.GatewayRequest.FooterEmailReceipt = "Custom Footer";
pvm.GatewayRequest.Description = "Custom Description";
					   
//this is set to test mode - change as needed.
var gate = new Gateway(login, transactionKey, true);
//send to Auth.NET
pvm.GatewayResponse = gate.Send(pvm.GatewayRequest);

if (pvm.GatewayResponse.Approved)
{
	pvm.ResponseSuccess = true;
	pvm.ResponseError = false;
	pvm.ResponseMessage = pvm.GatewayResponse.Message;
	pvm.ResponseTransactionID = pvm.GatewayResponse.TransactionID;
}
else
{
	pvm.ResponseSuccess = false;
	pvm.ResponseError = true;
	pvm.ResponseErrorMessage = pvm.GatewayResponse.Message; 
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2015 20:50:30 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Customer-email-missing-in-Sandbox-environment/m-p/51967#M27270</guid>
      <dc:creator>SpotOps</dc:creator>
      <dc:date>2015-08-31T20:50:30Z</dc:date>
    </item>
  </channel>
</rss>

