Reply
Member
Posts: 9
Registered: ‎09-03-2013
Accepted Solution

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?

 

 


Accepted Solutions
Solution
Accepted by topic author paalare
‎08-21-2015 01:58 AM
Member
Posts: 9
Registered: ‎09-03-2013

Re: CIM: Register expired CC for testing

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


All Replies
Member
Posts: 9
Registered: ‎09-03-2013

Re: CIM: Register expired CC for testing

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()

 

Solution
Accepted by topic author paalare
‎08-21-2015 01:58 AM
Member
Posts: 9
Registered: ‎09-03-2013

Re: CIM: Register expired CC for testing

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.

Member
Posts: 6
Registered: ‎06-07-2021

Re: CIM: Register expired CC for testing subscriptions

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?

Administrator
Posts: 170
Registered: ‎11-29-2017

Re: CIM: Register expired CC for testing subscriptions

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