Kartris User Guide

17.14. Paypal

Paypal is a popular internet payment service available in most countries. At present, Kartris integrates only with Paypal Web Site Payments Standard.

17.14.1. Setup within Kartris

  1. Go to Configuration > Payment and Shipping Gateways and click to edit PayPal.
  2. For the 'business', enter the email address of your Paypal account - this is effectively your PayPal user ID.
  3. Change the status from 'OFF' to 'ON' (for live orders) or 'TEST' or 'FAKE' for testing. 'TEST' means that transactions will be sent to PayPal's sandbox server. 'FAKE' means that Kartris will skip the PayPal site and instead format a post back itself to the callback page of Kartris. This is useful for testing that the callback process works, triggers the appropriate emails and so on without keep having to keep going through the PayPal payment process.
  4. If you have Kartris v2.9 or above, it will automatically determine whether to post to the live or sandbox Paypal server. If you have an earlier version of Kartris (or a Paypal DLL in Kartris earlier than 1.1.0.0) you will need to change the URL setting to the appropriate one for LIVE or test orders.

    For live orders:
    https://www.paypal.com/cgi-bin/webscr


    For test orders:
    https://www.sandbox.paypal.com/cgi-bin/webscr

17.14.2. Setup within Paypal

In order to ensure that PayPal calls back your Kartris site, to notify it that a payment for a particular order was made so that confirmation mails can be sent and the order can be tagged as 'paid', you need to set up a few things within your PayPal account.

 

  1. Login to PayPal and go to My Account > Profile. Then click to view My Selling Preferences (left hand side) and then a bit over half way down, click the 'update' link by 'Instant payment notifications'.
  2. The Notification URL should be http://www.mysite.xyz/Callback-PayPal.aspx. The 'Receive IPN messages' radio button should be checked.
  3. Back on the My Selling Preferences page, click the 'update' link by 'Website preferences'. Turn 'Auto Return' on, and enter http://www.mysite.xyz/CheckoutComplete.aspx as the 'Return URL'. This will redirect the user back to your site after they complete a payment on PayPal. But it is important to note that the order itself is called back immediately after payment by PayPal's server calling the Callback.aspx page of your site (see 2. immediately above).
  4. Set 'Payment Data Transfer' off - we don't need this as we send info via the IPN step in 2. above.

You may find that orders where data submitted contains non-English characters (such as French or German accented characters) generate an INVALID response at PayPal. To fix this:

 

  1. Log into PayPal
  2. Go to My Selling Preferences (see above)
  3. Click 'Paypal Button Language Encoding' link at foot of page, and then click the 'more options' button
  4. Set 'Encoding' to 'UTF-8' 
  5. Set 'Do you want to use the same encoding for data sent from paypal to you?' to 'Yes'.
  6. Click 'Save' 

We advise doing this even if you're in the US or UK, as it's quite possible you'll have customers with names and/or addresses either domestically or overseas that contain non-English accented characters.

17.14.3. Google Analytics

Google Analytics ecommerce tracking requires that a client side javascript is run the user's browser when they complete an order. This happens in Kartris on the CheckoutComplete.aspx page right after returning from the payment gateway (see 3. above).

 

It cannot be done on the callback because that is called by PayPal, not the customer's browser. Unfortunately PayPal puts in a 5-second delay after a completed payment before returning the customer to the store. This inevitably results in some customers dropping out after a successful payment but before they have been redirected back to your site, and hence not being logged by Google Analytics as completed sales. There is no workaround for this; the Google Analytics code can only run on the user's browser; it must run after the payment is complete (otherwise you will log sales as successful that don't complete payment) and PayPal apparently has no way to reduce or eliminate the 5-second delay). This is not a Kartris issue alone; it is an issue with all carts that support Google Analytics when they are set up to use PayPal Web Site Payments Standard.

 
powered by tomehost