Re: Re: Re: Future Versions. I've played

Posts: 67
Joined: 12/28/2007
Bug FinderGetting busy with the Ubercode.

Well, it depends what billing info you're looking for. You can get some of the credit card info (last four, type, expiration) using the above method. The billing address isn't stored there though. It is stored in the $order object the first time that card was used, so you could look for it there and duplicate it. You'd have to join {uc_order} and {uc_payment_cim} on order_id, look for the cim_ppid of the card used, and find a record where the billing info is populated in the $order object. You could then save it to the $order object for the current order. The problem with this is that when the credit card is updated to a new address, you'll probably keep pulling in the old, out-of-date info....

Alternatively, you could make a call to get_customer_payment_profile_request($profile_id, $payment_profile_id). That retrieves the info from Authorize.net's servers, so it would be most accurate, but also the slowest. Since the order object can be saved a couple times, I'd be careful about this for performance reasons...

Reuse Credit Card By: VitaLife (25 replies) Sun, 04/27/2008 - 11:45