Jump to content

vokf

Member
  • Posts

    880
  • Joined

  • Last visited

Everything posted by vokf

  1. 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; }
  2. Hi, 1st post :-) I'm having problems getting PayPal to return back to the cart following a successful payment. I currently run another store which uses PDShop Pro (and ASP based cart), and have just tested that so see if that works (returns the user to the cart - it does) The URL that the browser gets returned to is: http://inspectourgadgets.co.uk/confirmed.p...urn+to+Merchant Which reports the error: "You must login to view this page." IPN on my PayPal account is switched on. However, as I run 2 stores from the same PayPal account, I need to override a the notify and return variables: On my CubeCart store (for some reason, PayPal doesn't return), taken from transfer.inc.php: <input type='hidden' name='notify_url' value='http://inspectourgadgets.co.uk/modules/gateway/PayPal/ipn.php'/> <input type='hidden' name='return' value='http://inspectourgadgets.co.uk/confirmed.php'/> On my working PDShop Pro site: <input type="hidden" name="notify_url" value="http://www.precious-world.co.uk/shop/gateway_ppipn.asp"> <input type="hidden" name="return" value="http://www.precious-world.co.uk/shop/checkout5.asp"> Other than this problem, things are going well! After playing with ASP and PHP based carts, this is about as easy as PDShop Pro to setup, but appears to have a better comunity feel :-) If this is a PayPal problem, can anyone recommend a Payment provider that has zero setup and allows customisation of the payment screen I'm currently using the page style feature to select different payment screen styles: <input type='hidden' name='page_style' value='my_paypal_style_name'> Thanks for any help, Jason
×
×
  • Create New...