Reply
Highlighted
Contributor
Posts: 13
Registered: ‎12-17-2017

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.

Highlighted
Posts: 2,765
Topics: 57
Kudos: 247
Blog Posts: 67
Registered: ‎12-05-2011

Re: Unable to process pmts using paymentprofileid created by ARB

@museminder

 

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

 

Richard

Highlighted
Contributor
Posts: 13
Registered: ‎12-17-2017

Re: Unable to process pmts using paymentprofileid created by ARB

There is no message at all.  No error number.

Highlighted
Contributor
Posts: 13
Registered: ‎12-17-2017

Re: Unable to process pmts using paymentprofileid created by ARB

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;
	}
Highlighted
Authorize.Net Expert
Posts: 75
Registered: ‎07-27-2016

Re: Unable to process pmts using paymentprofileid created by ARB

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 !
Highlighted
Contributor
Posts: 13
Registered: ‎12-17-2017

Re: Unable to process pmts using paymentprofileid created by ARB

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.

Highlighted
Authorize.Net Expert
Posts: 75
Registered: ‎07-27-2016

Re: Unable to process pmts using paymentprofileid created by ARB

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 !