X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Credit Card Type +Last 4 digits on HTML Invoice (https://forum.x-cart.com/showthread.php?t=23350)

moneysaver67 08-01-2006 07:47 AM

Quote:

Originally Posted by ecommerce
carpe, does the payment options determine if this works or not?


I will like to have paypal API, but it should just read credit card.
(paypal should be invisible)

fax order

phone order

money order

gift certificate

will it work with those options?


ecommerce,

Consider the following (first 3 lines of the code):

Code:

{assign var="paren" value=$order.payment_method|strpos:' ('}
{assign var="paymentMethod" value=$order.payment_method|substr:0:$paren}

{$paymentMethod}


What this is doing is finding the first occurence of {space}{open paranthese}, " (", and displays everything BEFORE it. For a gateway transaction normally displayed as "Payment Name Here (Authorize.net Payment Gateway)", it would become "Payment Name Here".

Now, look at the 4th line of code:

Code:

{if $paymentMethod eq 'Credit Card'}

This does state that the name of the payment method needs to be "Credit Card" in order to continue. This is because the remaining code is all based on the idea a customer has paid using a credit card and we only want to display the type of card as well as the last 4-digits.

How does the invoice normally look for PayPal purchases? I doubt that this mod would work as you'd expect, primarily since the credit card details need to be encoded and stored locally in the xcart_orders table, which I am almost certain is NOT the case when paying via PayPal. :(

ecommerce 08-01-2006 08:33 AM

money,

thansk for the detailed explanation.

if i understand correctly, with paypal API, the customer info and credit card "invisibly" goes to paypal for processing and if OK, then paypal sends the OK back to xcart.

similiarly as to authorize net.

moneysaver67 08-01-2006 10:17 AM

Quote:

Originally Posted by ecommerce
money,

thansk for the detailed explanation.

if i understand correctly, with paypal API, the customer info and credit card "invisibly" goes to paypal for processing and if OK, then paypal sends the OK back to xcart.

similiarly as to authorize net.


Basically, PayPal keeps the authenticated/validated credit card information on file on their server. Any funds exchanged are done so via PayPal's payment processing. Your merchant account and/or normal payment gateway (e.g. Authorize.net) never enter the picture... Funds are moved from Their account into Your PayPal account.

ranger82nd 08-01-2006 10:47 AM

Quote:

I will like to have paypal API, but it should just read credit card.
(paypal should be invisible)

Go to: /mail/html/order_invoice.tpl

Find:
Code:

{$order.payment_method}

Replace with:
Code:


{$order.payment_method|replace:'(PayPal Pro)':''}


Raptor 08-09-2006 05:09 AM

is this working for v4.0.18 ?

carpeperdiem 08-09-2006 05:12 AM

I have not been able to make it work in 4.0.18

I was going to hire xcart to do this by the end of the week if the Brain Trust doesn't have a fix...

hues 08-15-2006 09:06 PM

I tried using this mod with my cart using Paypal Pro as payment gateway. When I place an order in test mode the invoice which is shown at the site shows:
Payment method:
Credit Card : VISA
xxxxxxxxxxxx1527

But the invoice which is sent by e-mail contains full credit card number in the Payments detail section.

Where I may be doing wrong ?

Please help.

hues 08-16-2006 01:34 AM

This mod works great, generates an invoice with type of CC and the last 4 digits of the credit card, with all other digits masked by X.

But it works if the credit card information is stored on the database. If I disable storing of CC info in the database then this wont work.
Can we mask the credit card information, which is stored in the database too as it appears on the invoice ?

ecommerce 08-16-2006 06:58 AM

Where in the database is the credit card numbers stored?

I see them under the notes.

moneysaver67 08-16-2006 07:37 AM

Quote:

Originally Posted by hues
This mod works great, generates an invoice with type of CC and the last 4 digits of the credit card, with all other digits masked by X.

But it works if the credit card information is stored on the database. If I disable storing of CC info in the database then this wont work.
Can we mask the credit card information, which is stored in the database too as it appears on the invoice ?

Quote:

If I disable storing of CC info in the database then this wont work.

Correct. I specifically placed a check for this to prevent the DB work for something that most likely isn't there :)

@hues,

Not sure I understand your question? Are you asking if you can mask the CC # within the database?? (e.g. Not store the entire CC # ? )

@ecommerce,

The credit card info is stored in `xcart_orders` table, within the encoded details column. To hues' point, only the CC info is stored if:
Code:

$store_cc = true;
in the x-cart config file. (X-Cart default)


All times are GMT -8. The time now is 06:00 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.