This is an old revision of the document!
When contacting CyberSource to activate the Recurring Billing functionality, please specify that they use the 16-character token length option.
Expired cards will migrate to the gateway. Due to some of the gateway limitations discussed in the gateway specific sections, it is advised that prior to the card migration that the data be cleaned up. This can be identifying the cards that are already expired and providing the data to the customer to determine which cards need to be updated followed by removal of all cards that aren’t update and remain expired. Other customers may simply choose to remove all cards that have already expired.
Selection Query to determine how many cards have expired prior to the current month (SQL)
SELECT * FROM [@TWBS_CC_BPCC] WHERE CONVERT(INT,RIGHT(U_ExpirationDate,2)) < CONVERT(INT,RIGHT(YEAR(GETDATE()),2)) OR (CONVERT(INT,RIGHT(U_ExpirationDate,2)) = CONVERT(INT,RIGHT(YEAR(GETDATE()),2)) AND CONVERT(INT,LEFT(U_ExpirationDate,2)) < CONVERT(INT,LEFT(MONTH(GETDATE()),2)))
Query to remove cards that have expired prior to the current month (SQL)
DELETE FROM [@TWBS_CC_BPCC] WHERE CONVERT(INT,RIGHT(U_ExpirationDate,2)) < CONVERT(INT,RIGHT(YEAR(GETDATE()),2)) OR (CONVERT(INT,RIGHT(U_ExpirationDate,2)) = CONVERT(INT,RIGHT(YEAR(GETDATE()),2)) AND CONVERT(INT,LEFT(U_ExpirationDate,2)) < CONVERT(INT,LEFT(MONTH(GETDATE()),2)))
Selection Query to determine how many cards have expired prior to the current month (HANA)
SELECT * FROM “@TWBS_CC_BPCC” WHERE CAST(RIGHT(“U_ExpirationDate”,2) as INT) < CAST(RIGHT(YEAR(NOW()),2) as INT) OR (CAST(RIGHT(“U_ExpirationDate”,2) as INT) = CAST(RIGHT(YEAR(NOW()),2) as INT) AND CAST(LEFT(“U_ExpirationDate”,2) as INT) < CAST(LEFT(MONTH(NOW()),2) as INT))
Query to remove cards that have expired prior to the current month (HANA)
DELETE FROM “@TWBS_CC_BPCC” WHERE CAST(RIGHT(“U_ExpirationDate”,2) as INT) < CAST(RIGHT(YEAR(NOW()),2) as INT) OR (CAST(RIGHT(“U_ExpirationDate”,2) as INT) = CAST(RIGHT(YEAR(NOW()),2) as INT) AND CAST(LEFT(“U_ExpirationDate”,2) as INT) < CAST(LEFT(MONTH(NOW()),2) as INT))