cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Unable to process pmts using paymentprofileid created by ARB

The ARB createSubscription method automatically creates a new Customer Profile (CIM) record and associated payment profile for each subscription.  The customerProfileid and the paymentProfileid are available for capture in the response.  However, if we try to use the any of these customerProfileid/ paymentProfileid combinations in a subsequent transaction, the transaction fails.

 

If we wish to capture the customerProfile and paymentProfile ids for later use, must we create a CIM record FIRST, and then submit a createSubscription request based on the newly-created profile?

 

Having those extra profiles that look, walk, and quack like customer profiles but cannot be used as such is confusing.

museminder
Contributor
6 REPLIES 6

@museminder

 

What is the specific error message you receive when the transaction fails?

 

Richard

RichardH
Administrator Administrator
Administrator

There is no message at all.  No error number.

Just tried again.  There is one message and the response is "ERROR".  In the code below I am passing legitimate customerProfileid and paymentProfileid as I have that sandbox window open.  The annotation on that customer profile is "Profile created by Subscription: 4937604".  The cardholder name is recorded as is the masked card number and expiry, but no address is captured.

 

Here is our wrapper method:

 

	public TransactionResponse captureUsingProfile(CustomerProfilePaymentType payment, OrderType order, Money amount) throws GatewayException, UserException {
		
		// Create the payment transaction request
        TransactionRequestType txnRequest = new TransactionRequestType();
        txnRequest.setTransactionType(TransactionTypeEnum.AUTH_CAPTURE_TRANSACTION.value());
        //txnRequest.setPayment(paymentType);
        txnRequest.setAmount(amount.getBigDecimal());        
        txnRequest.setProfile(payment);
        
        CreateTransactionRequest apiRequest = new CreateTransactionRequest();
        apiRequest.setTransactionRequest(txnRequest);
        CreateTransactionController controller = new CreateTransactionController(apiRequest);
        controller.execute();

        CreateTransactionResponse response = controller.getApiResponse();

        checkResponse(response);
        TransactionResponse result = response.getTransactionResponse();
        checkResult(result);
        return result;
	}
Hi @museminder

You are getting ERROR in the response, but to get more details why you are getting the error you need to get the error code which API is returning.

Please refer this sample code to charge a customer profile which might be useful in your case.
https://github.com/AuthorizeNet/sample-code-csharp/blob/master/PaymentTransactions/ChargeCustomerPro...

Hope this helps !
kikmak42
Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert

Hi @kikmak42,

 

I get the classic E00027 error "The transaction was unsuccessful".  There is also a transaction response error code of 3.

 

I should mention that I am using Java 8, with the latest SDK, but I will look at that C# code to see if there is anything different.

 

I ended up writing the code to create a proper CIM profile first, and then create a subscription tied to that newly-created profile, and everything works smoothly.  However, I do see that when I (or my clients) create other subscriptions, even using existing profiles, the createSubscription process litters the CIM list with new profiles that, so far as I can see, serve no purpose.

Hi @museminder

 

I tried using the sample codes written for JAVA for Charge a customer profile for customer profile created by a subscription.

 

I created a CustomerProfile : 1814057956 & CustomerPaymentProfile : 1808720212 using the CreateSubscription sample code

 

And then is used the ChargeCustomerProfile sample code to charge the above profile anf I got a successfull message with Transaction ID: 60037321957

 

Hope this helps !

kikmak42
Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert