plugins Paypal V2.0 (with admin config 'PayPal Email','Currency Code')

stormy

No avatar

2006-12-16 22:27

Step 1
edit >>>> lang/en.php

/*
* Name of fields in forms
*/
//--------- PayPal Start
$lang[Currency_Code] = 'Currency Code';
$lang['PayPal_Email'] = 'PayPal Email';
//--------- PayPal Finish

Step 2
edit >>>>actions_client/orders.php

if( checkOrderFields( $_POST ) === true && checkOrderProducts( $iOrder ) === true ){
saveOrder( $iOrder, $_POST );
//--------- paypal star
$aData = throwOrder( $iOrder );
listBasket( $iOrder);
$aData['fSummary'] = sprintf( '%01.2f', $aData['fCourierPrice'] + $aList['fSummary'] );
if( !empty($config['PayPal_email']) ){
$content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_PAYPAL' );
}
else
//-------- paypal end
$content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_SAVED' );

Step 3
edit >>>>templates/messages.tpl

<!-- END NOT_EXISTS -->
//--------- paypal star
<!-- BEGIN ORDER_PAYPAL -->
<div id="message">
<div id="ok">
$lang[Order_finished]<br />
<a href="javascript:windowNew( '?p=ordersWindowPrint&amp;iOrder=$iOrder' );">&raquo; $lang[Order_print]</a><br />
<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[PayPal_email]">
<input type="hidden" name="item_name" value="Order ID $iOrder">
<input type="hidden" name="currency_code" value="$config[currency_code]">
<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>
<a href="?p=">$lang[Homepage]</a>
</div>
</div>
<!-- END ORDER_PAYPAL -->
//-------- paypal end
<!-- BEGIN ORDER_SAVED -->

Step 4
edit >>>>config/general.php

$config['version'] = '2.0';
//--------- paypal star
$config['PayPal_email'] = "edit_your_paypal@email";
$config['currency_code'] = "USD";
//-------- paypal end

Step 5
edit >>>>templates/admin/config_form.tpl

</tr>
//--------- paypal star
<tr>
<th>
$lang[PayPal_Email]
</th>
<td>
<input type="text" name="PayPal email" value="$config[PayPal_email]" size="35" />
</td>
</tr>
<tr>
<th>
$lang[Currency_Code]
</th>
<td>
<input type="text" name="currency code" value="$config[currency_code]" size="5" maxlength="3" />
</td>
</tr>
//-------- paypal end
<tr>
<th>
$lang[Start_page]

:-)

Jo

No avatar

2006-12-17 00:16

I have not started using version 2 yet but will soon so I hope this works. Thanks! :)

parosgr

No avatar

2006-12-26 20:26

Hello,

Yes work fine but how can i change the 'currency_code' i want use (euro) begause i receive this message from paypal:
[This recipient does not accept payments denominated in USD. Please contact the seller and ask him to update his payment receiving preferences to accept this currency.]

George

impala1962

No avatar

2007-01-07 19:33

This is just great, I am able to implement the paypal function, but I get an error in regards to the recipient not accepting USD, I have set it up for CDN but still get the error.

Am I missing something in another area for setup of the cart to be strictly CDN?

Its a bit of a learning curve, but I am enjoying this!!

Bill

pepe

Avatar: pepe

2007-01-08 20:09

I have changed the following lines of step 3... and all work well for me in GERMANY :)

from:

<form target="paypal" name="_$iOrder" action="https://www.paypal.com/cgi-bin/webscr";; method="post">

to:

<form target="paypal" name="_$iOrder" action="https://www.paypal.com/de/cgi-bin/webscr";; method="post">

and from:

<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!">

to:

<input type="image" src="http://www.paypal.com/de_DE/i/btn/x-click-but6.gif";; name="submit" alt="Zahlen Sie mit PayPal - schnell, kostenlos und sicher!">

pepe

pepe

Avatar: pepe

2007-01-08 20:11

Oh.. i have forgotten...

If you wanna use "EURO" , you have to put in "EUR" !!!

pepe

yeco

No avatar

2007-02-09 18:25

http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=1593&page=999

fast way.

Rojo

Avatar: Rojo

2007-02-10 12:00

When you want to use this in Holland then change en_US to nl_NL

and:

<form target="paypal" name="_$iOrder" action="https://www.paypal.com/de/cgi-bin/webscr";;; method="post">

to:
<form target="paypal" name="_$iOrder" action="https://www.paypal.nl/cgi-bin/webscr";;; method="post">

havugot1

No avatar

2007-02-11 16:16

Hi,

I use QC2.0 with PAYPAL and NOCHEX.

The code i use is located at ;

http://www.opensolution.org/Quick.Cart/forum/index.php?p=readTopic&nr=3395

Andrew

http://www.aycs.co.uk/Havugot1QuickCart/index.php

valpenguin

No avatar

2007-03-09 16:29

Hi all,
I use QC 2.1 with PAYPAL in EURO.
How find code?

chaudhary

No avatar

2007-03-26 11:18

Parse error: syntax error, unexpected $end in /home/chic123/public_html/actions_client/orders.php on line 127

chaudhary

No avatar

2007-03-26 13:32

i am using 2.0 its working fine, problem is that, after filling the information to Order Delivery Form, with submit button i want to transfer all the filled information to PAYPAL shopping cart
i dont want PAYPAL image button?????

chaudhary

No avatar

2007-03-27 16:55

i am using 2.0 its working fine, problem is that, after filling the information to Order Delivery Form, with submit button i want to transfer all the filled information to PAYPAL shopping cart
i dont want PAYPAL image button?????
--------------------------------------------------------------
here is code for my messages.tpl
---------------------------------------------------------------


<form target="paypal" name="PayPalForm" action="https://www.paypal.com/cgi-bin/webscr";;; method="post">

<script type='text/javascript'>
<!--
window.onload = function( ){
document.PayPalForm.submit();
}
//-->
</script>

<input type="hidden" name="cmd" value="_ext-enter">
<input type="hidden" name="redirect_cmd" value="_xclick">
<input type="hidden" name="business" value="$config[email]">
<input type="hidden" name="item_name" value="[$aList[iQuantity]] x $aList[sProduct] | Options:$aAttributes[basketList] | Date/Time Ordered:$aData[sDate]"><!-- adds volume of order -- adds last item to cart - also adds attributes if turned on, also adds date and time of order -->
<input type="hidden" name="item_number" value="$iOrder | Price:$aList[fPrice] ea | Sub Total:$aList[fSummary] | Shipping Cost:$aData[fCourierPrice] | Via: $aData[sCourier] | Comment on order: $aData[sComment]"><!-- adds last product name, order id number, price, subtotal, shipping cost and comment if entered to comment field -->
<input type="hidden" name="amount" value="$aData[fSummary]"> <!-- adds costing here -->
<input type="hidden" name="shipping" value="$aData[Delivery_cost]"> <!-- adds price of shipping -->
<input type="hidden" name="shipping2" value="">
<input type="hidden" name="currency_code" value="GBP"><!-- Sets the shipping and billing country. -->
<input type="hidden" name="first_name" value="$aData[sFirstName]">
<input type="hidden" name="last_name" value="$aData[sLastName]">
<input type="hidden" name="address1" value="$aData[sStreet]">
<input type="hidden" name="address2" value=""><!-- add fields if this is needed -->
<input type="hidden" name="city" value="$aData[sCity]">
<input type="hidden" name="state" value="$aData[sState]"> <!-- added state field to accomodate the US - remove if not neeed/used -->
<input type="hidden" name="zip" value="$aData[sZipCode]"> <!-- this could also be postcode or ....? -->
<input type="hidden" name="lc" value="UK"> <!-- Locale. This is the buyer's checkout flow language. -->
<input type="hidden" name="email" value="$aData[sEmail]"> <!-- Email address. (Max. length = 127) -->
<input type="hidden" name="no_note" value="1">
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but06.gif";;; name="submit" alt="Make payments with PayPal" width="62" height="31" border="0" onClick="top.location.href='index.php?p=ordersBasket'"> <!-- added last -->
</form>

Luigi29

No avatar

2008-02-27 10:57

DOes it work with version 2.2 also?

idaryl

Avatar: idaryl

2008-02-27 21:28

Claudhary --- it looks like like you are using my version of added details for PayPal - it is for version 1.4 only - this way will not work for 2.0x (the alist and adata formatting in the admin - orders - ordersDelivery and clients are different - as a result nothing matches - however, I'm working on a reasonable and easy solution - right now, its unavailable)

Back to top
about us | contact