cancel
Showing results for 
Search instead for 
Did you mean: 

CIM: Register expired CC for testing

Hi,

I'm using CIM validateCustomerPaymentProfileRequest() to identify expired credit cards. Problem is that I can not test my routines, as I am not allowed to register a expiration date in past (in my Sandbox). I could register exp.date 0714, but then I would have to wait for 3 weeks to test this...

 

Any ideas how to register expired CC for testing?

 

 

paalare
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Here is what I found:

 

1. If I update a payment profile using updateCustomerPaymentProfile() (PHP SDK) with $validationMode = "none", I can set expiration date in past.

 

2. To use validateCustomerPaymentProfile() without cardCode or Address: The validateCustomerPaymentProfile API call does not require the card code, so you could implement it directly outside of the SDK if you choose.

View solution in original post

4 REPLIES 4

And,

CIM XML Guide tells me that cardCode element is optional for validateCustomerPaymentProfileRequest. However, the function in the PHP API requires a value for this element. I don't have the card code for the registered profiles. How can I set value empty/null/'not given' as parameter? I could easily update the API at our server to not set this element, but I would probably forget that customization until next API update...

 

customerPaymentProfileId is required by this PHP function as well, but I can pass value 0 here to not validate on address.

 

Function used: AuthorizeNetCIM->validateCustomerPaymentProfile()

 

paalare
Member

Here is what I found:

 

1. If I update a payment profile using updateCustomerPaymentProfile() (PHP SDK) with $validationMode = "none", I can set expiration date in past.

 

2. To use validateCustomerPaymentProfile() without cardCode or Address: The validateCustomerPaymentProfile API call does not require the card code, so you could implement it directly outside of the SDK if you choose.

How can I test subscription with expired card without creating customer profile? I want to test one case for expiring cards, I cannot wait till the expiration time gets over.. Is there a way to test this case?

Subscriptions always have customer profiles behind them, so to test for expiration use the solution above.