View Single Post
  #21  
Old 08-01-2006, 07:47 AM
  moneysaver67's Avatar 
moneysaver67 moneysaver67 is offline
 

Advanced Member
  
Join Date: Nov 2005
Posts: 74
 

Default

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.
__________________
X-Cart 4.0.16-.19 Gold [unix] / DSEFU
Reply With Quote