Reply
Highlighted
Member
Posts: 2
Registered: ‎09-09-2011

Not receiving AIM customer receipt emails

I am creating an AuthorizationRequest object where I am attempting to set the Email and EmailCustomer properties.  However, whenever I set one or the other, they both end up with the same value.  So depending on the order, both properties will either have an email address or both will have a value of "True".

 

So my question is how do I set up transactions so the customer can receive emails?  Is there some other property/method I need to be using?

 

EXAMPLE:

 

AuthorizationRequest request = new AuthorizationRequest(XXXXXXXXXXXXXXXX, MMYY, Y.YY, "ZZZ");
request.Email = "test@test.com";
request.EmailCustomer = "True";
Gateway gate = new Gateway("aaaaaaaa", "bbbbbbbbbbbbbbbb");
GatewayResponse gateResponse = (GatewayResponse)gate.Send(request);

 

Thanks.

 

Highlighted
Member
Posts: 1
Registered: ‎09-12-2011

Re: Not receiving AIM customer receipt emails

 

Try this:

 

AuthorizationRequest request = new AuthorizationRequest(XXXXXXXXXXXXXXXX, MMYY, Y.YY, "ZZZ");
request.Email = "sender@SendersDomain.com";
request.EmailCustomer = "recipient@RecipientsDomain.com";
Gateway gate = new Gateway("aaaaaaaa", "bbbbbbbbbbbbbbbb");
GatewayResponse gateResponse = (GatewayResponse)gate.Send(request);

Highlighted
Administrator
Posts: 591
Registered: ‎08-21-2009

Re: Not receiving AIM customer receipt emails

[ Edited ]

Actually mptipom's code is theoretically correct.  Unfortunately, there is a bug in the SDK that just came to my attention yesterday that is preventing it from working.  With the current release of the .Net SDK, your attempt to set the "emailCustomer" field is actually mapped to setting the email field again.  The workaround is to make sure that you have set the default action in your account to always send a receipt if the email address is included, then simply do not set the emailCustomer field in your code. I have submitted this bug to our SDK developer to get it resolved in a future update.

 

Imw's example code would actually avoid the issue, but not for the right reason.  The value set with request.EmailCustomer would override what was just put in with request.Email.  The Sender email address would simply be overwritten and would never reach Authorize.Net.