How to link my website to paypal with QC version 2.2

uk.hamza

No avatar

2007-09-06 17:56

Hi folks:

Has anyone established a connection from their website to paypal using QC version 2.2?

If yes would you be able to share it with us please? does any of the code of earlier versions work for QC 2.2?

Your help is very appreciated. Thank you very much.

» Quick.Cart v2.x

merci

No avatar

2007-09-07 10:00

uk.hamza - we have plugin which integrate Q.C with payment system, but it is payed. Here is description: http://opensolution.org/os/templates/en_plugins.html#OK

uk.hamza

No avatar

2007-09-11 14:16

Ok guys!! many of you are wondering how to link Paypal to their Website. I have been fiddling around and with some ideas of our members in this forum, i have managed to integrate Paypal with version 2.2. Here are the steps:

in the "Order.php" in "Actions_Client" folder enter this code between those to lines which are already there:

//--------Start Paypal Code
$aData = throwOrder( $iOrder );
listBasket( $iOrder);
$aData['fSummary'] = sprintf( '%01.2f', $aData['fCourierPrice'] + $aList['fSummary'] );
if( $aData['fCourierPrice'] > 0 ){
$content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_PAYPAL' );
}
else
//--------End Paypal Code

if( checkOrderFields( $_POST ) === true && checkOrderProducts( $iOrder ) === true ){
saveOrder( $iOrder, $_POST );

so the code between start paypal code and end paypal code will be placed here.

$content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_SAVED' );
unset( $_SESSION['iOrderSession'] );

Then go to the file called "message.tpl" in Templates and past this code at the end:

<!-- BEGIN ORDER_PAYPAL -->
<div id="message">
<!-- <div id="ok"> -->
<form target="paypal" name="_$iOrder" action="https://www.paypal.com/cgi-bin/webscr"; method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="$config[email]">
<input type="hidden" name="item_name" value="Order ID $iOrder">
<input type="hidden" name="currency_code" value="GBP"> <!--You can change the currency value depending on your website specification. in my case i used british pound -->
<input type="hidden" name="amount" value="$aList[fSummary]">
<input type="hidden" name="shipping" value="$aData[fCourierPrice]">
<input type="hidden" name="no_note" value="1">
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but6.gif"; name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form><br />
</div>
<!-- END ORDER_PAYPAL -->

Some of you may have used this code but they wonder why first time the paypal was on the page and when i did another transaction it disapeared. The problem is most probably when you filled in the details, you have choosed free delivery. Obviousely in the code above it says show only the PayPal logo if the courier deliverey is greater than zero. To overcome this problem add an equal symbol "=" in front of the "greater then" symbol ">"

I hope this help!!! need your feedbacks!! I am now trying to add some features on this code by adding Item descriptions from the shopping cart to the paypal website. If anyone have an idea before i get to the results please share it with us.

ntr23

Avatar: ntr23

2009-02-05 12:00

Is there anybody who implement paypal payment to QC 3.2. It is possible to add this function to the free version?

Jan

beholder

Avatar: beholder

2009-02-05 14:31

http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=5761

poldark77

No avatar

2009-02-05 19:12

Does it works also in version 2.1? Thank you
------Quick cart v2.1-------

poldark77

No avatar

2009-02-05 22:43

Thank you uk.hamza. I did what you suggested and it works. But, as you said: "Some of you may have used this code but they wonder why first time the paypal was on the page and when i did another transaction it disapeared. The problem is most probably when you filled in the details, you have choosed free delivery. Obviousely in the code above it says show only the PayPal logo if the courier deliverey is greater than zero. To overcome this problem add an equal symbol "=" in front of the "greater then" symbol ">"
the second time, it doesn't show paypal button anymore. Neither it does if I change the code as you told (symbol = in front of >): it gives me error in code line 86 (the line I changed).

Now I have removed shipping options (I don't want them, because I will contact my clients), but still I cannot see the Paypal button. What is the problem?
Thank you

Back to top
about us | contact