Showing results for 
Search instead for 
Did you mean: 

HELP!! No Email with partial payment

I have a situation here were when my code comes across a partial payment, we have chosen to capture that payment at that point and then ask the customer for another "new" payment with their new balance reflected as well as telling them what was available on the card to start out with.


I have this process working fine in test.  It works as I expect, but one thing that I am having a problem with is receiving an email for the transaction once it is captured or even approved initially.  


Now, this is in test, so that may be the problem, but I don't know that for a fact.  I need to know so that I can expect this to work correctly.  Please let me know.  I am putting a snippet of my code below for you to see any problems that may exist.  Thanks.


Dim authnetGateway As New AuthorizeNet.Gateway(LoginID, TransKey)
Dim authnetRequest As New AuthorizeNet.AuthorizationRequest(AccountNumber, ExpireDate, Amount, Amount, CustomerAccountNumber, True)
Dim authnetResponse As AuthorizeNet.GatewayResponse
Dim structCCTran As New PaymentTransaction
Dim strPartialPaymentMessage As String = ""

   authnetRequest.TestRequest = False
   authnetRequest.AddCustomer(CustomerAccountNumber, BillFirstName, BillLastName, "", "", ZipCode)
   authnetRequest.AllowPartialAuth = If(AllowPartialPayments, True, False)
   authnetRequest.CustId = CustomerAccountNumber
   authnetRequest.CustomerEmailAddress = EmailAddress
   authnetRequest.SendEmail = SendEmail
   authnetRequest.Version = "3.1"
   authnetResponse = authnetGateway.Send(authnetRequest)
   Select Case authnetResponse.ResponseCode
     Case "1" 'if the response and response reason codes are 1 then the transaction was successful
     Case "2" 'the transaction was declined for several possible reasons that will be returned in the ReasonCodeText
     Case "3" 'there was an error in the credit card information that caused the transaction to be rejected.  The ReasonCodeText field will contain that reason.
     Case "4" 'if the response reason code = 295 and there is a value for split tender if then process as a partial payment by finalizing (capturing) the transaction in the code below
        If ((authnetResponse.ResponseReasonCode.Equals("295") AndAlso (authnetResponse.SplitTenderID.Length > 0))) Then
           authnetRequest.Type = "PRIOR_AUTH_CAPTURE"
           authnetRequest.Amount = authnetResponse.AmountAuthorized
           authnetRequest.SplitTenderId = authnetResponse.SplitTenderID
           authnetResponse = authnetGateway.Send(authnetRequest)
   The rest is just handling the response back to the customer.  Please let me know if you see any problems.



A split tender transaction receipt is sent when a transaction containing the split tender ID is successfully authorized in full.  For example, you may attempt a transaction for $10 and have the first transaction partially approved for $4.  The next step is to submit a second transaction for $6 that includes the split tender ID.  If this second transaction is approved in full, then an email is sent.  I have just completed testing this in our sandbox environment and I was able to successfully generate customer emails.

Administrator Administrator