Ok :-)
I've spent a lil bit of time on this, and the following may help some people:
My setup is that I have a single PalPal account, which I need to accept payments for an existing store, and my new CubeCart store - both use IPN.
I suggest following the pinned tutorial, and if you're still having problems, try and decypher the following:
I've made some changes to the transfer.inc.php to select the payment screen style (my logo and colour scheme for each store). I also set the no_shipping variable to 1, so PayPal doesn't ask for the shipping address (CC has this already)
The problem mentioned on my prev post, was the CC was not returning correctly to the cart.
From what I could see, the "return" variable was unset unless the Standard payment method was set. As most people use IPN, this was not set for some reason (I think this should be set in your PalPal config, but in my case I needed to override it for each store).
Anyway, I now have a working PayPal IPN. I've included my transfer.inc.php file below, perhaps some people will find it usefull.
Jason
function fixedVars(){
global $module, $basket, $ccUserData, $cart_order_id, $config, $GLOBALS;
$amount = sprintf("%.2f",$basket['subTotal']+$basket['tax']);
$hiddenVars = "<input type='hidden' name='cmd' value='_xclick' />
<input type='hidden' name='business' value='".$module['email']."' />
<input type='hidden' name='page_style' value='inspect'>
<input type='hidden' name='no_shipping' value='1'>
<input type='hidden' name='item_name' value='Cart Order No: ".$cart_order_id."' />
<input type='hidden' name='item_number' value='".$cart_order_id."' />
<input type='hidden' name='amount' value='".$amount."' />
<input type='hidden' name='notify_url'value='http://inspectourgadgets.co.uk/modules/gateway/PayPal/ipn.php'/>
<input type='hidden' name='return' value='".$GLOBALS['storeURL']."/confirmed.php?act=conf&oid=".base64_encode($cart_order_id)."'/>
<input type='hidden' name='shipping' value='".$basket['shipCost']."' />
<input type='hidden' name='invoice' value='".$cart_order_id."' />
<input type='hidden' name='first_name' value='".$ccUserData[0]['firstName']."' />
<input type='hidden' name='last_name' value='".$ccUserData[0]['lastName']."' />
<input type='hidden' name='currency_code' value='".$config['defaultCurrency']."' />
<input type='hidden' name='address1' value='".$ccUserData[0]['add_1']."' />
<input type='hidden' name='address2' value='".$ccUserData[0]['add_2']."' />
<input type='hidden' name='city' value='".$ccUserData[0]['town']."' />
<input type='hidden' name='state' value='".$ccUserData[0]['county']."' />
<input type='hidden' name='zip' value='".$ccUserData[0]['postcode']."' />
<input type='hidden' name='day_phone_a' value='".$ccUserData[0]['phone']."' />
<input type='hidden' name='add' value='1' />
<input type='hidden' name='rm' value='2' />
<input type='hidden' name='no_note' value='1' />
<input type='hidden' name='upload' value='1' />";
if($module['method']=="std"){
$hiddenVars .="<input type='hidden' name='return' value='".$GLOBALS['storeURL']."/confirmed.php?act=conf&oid=".base64_encode($cart_order_id)."' />\r\n
<input type='hidden' name='cancel_return' value='".$GLOBALS['storeURL']."/confirmed.php?act=conf&f=1&oid=".base64_encode($cart_order_id)."' />";
}
return $hiddenVars;
}