Archive

Posts Tagged ‘PayPal’

Paypal Pro Credit Card Payment bug

Recently i faced an issue with creloaded 6.2 pro. When cusotmer use to checkout there CC number was not being stored correcty in database. On random the number was set to 2147483647 in databse.

This number is the max value a signed int variable can have. I found this on http://answers.yahoo.com/question/index?qid=20070625175121AAOguTQ .

After finding this i noted that only customers who choose “PayPal Pro Credit Car Payment” method were effected.

Cause:

When debugged further it was found that payment module was converting cc number to int value using type casting.

Fix:

Fix is an easy one. In file includes/modules/payment/paypal_dp.php find line

$order->info['cc_number'] = (int) $HTTP_POST_VARS['paypal_cc_number'];

and remove (int) which will stop converting the cc number to integer value.

Please don’t try to convert it to double as it will make thing look worse.

Categories: CRE Loaded Tags: , , ,
Follow

Get every new post delivered to your Inbox.