View Single Post
  #1  
Old 03-02-2006, 07:18 AM
  Raptor's Avatar 
Raptor Raptor is offline
 

Senior Member
  
Join Date: Jan 2006
Posts: 131
 

Default Auto add 5% to PayPal orders...

This will add 5% to PayPal orders so you don't lose out when the customer orders via PayPal. Not sure if this is actually worthy of being in here, but I thought I would share anyway.

In payments/ps_paypal.php

Find:
Code:
$u_phone = preg_replace('![^\d]+!', '', $userinfo["phone"]);

Add below:
Code:
$paypaltotal = $cart["total_cost"] * 1.05;


Find:
Code:
<input type=hidden name=amount value="<?php printf("%0.2f", $cart["total_cost"]); ?>">

Replace with:
Code:
<input type=hidden name=amount value="<?php printf("%0.2f", $paypaltotal); ?>">

Seems to work OK for me using version 4.0.17.
__________________
X-Cart Gold Plus v4.7.12
ReBOOT ReDUX Theme
Reply With Quote