NoChex Payment gateway

Tobydeh

No avatar

2005-07-02 20:17

In Orders_saved.tpl
<table class='operation_table' cellspacing='0' align='center'>
<td class='ok'>
<br /><br /><br />
$lang[Order_finished]
<br />

<!-- BEGIN NOCHEX CODE --!>
<form method="post" action="https://www.nochex.com/nochex.dll/checkout">
<input type=hidden name=payee_email value="YOUR_EMAIL@DOMAIN.COM">
<input type=hidden name=ordernumber value="Order ID $iOrder">
<input type=hidden name=amount value="$fSummary">
<input type=hidden name=returnurl value="http://www.yourshop.com">
</form>

Tobydeh

No avatar

2005-07-02 20:18

Please let me know if it worked for you!

Badazz

No avatar

2005-07-03 23:57

I´ll think that you shoud change this line to youre own email..

<input type=hidden name=payee_email value="YOUR_EMAIL@DOMAIN.COM">


//Badazz

Jo

No avatar

2005-11-04 21:02

I tried this and it didn't work. Should the code underneath the nochex form still be there like so -

<table class='operation_table' cellspacing='0' align='center'>
<td class='ok'>
<br /><br /><br />
$lang[Order_finished]
<br />


<form method="post" action="https://www.nochex.com/nochex.dll/checkout">
<input type=hidden name=payee_email value="sales@secretshop.co.uk">
<input type=hidden name=ordernumber value="Order ID $iOrder">
<input type=hidden name=amount value="$fSummary">
<input type=hidden name=returnurl value="http://www.secretshop.co.uk">
</form>

<br />
<a href='javascript:windowNew( "?p=ordersWindowPrint&amp;iOrder=$iOrder" );'><b>$lang[Order_print]</b></a>
<br /><br />
<a href='?p='>$lang[Homepage]</a>
<br /><br />
</td>
</table>


Thanks for the help.

Jo

No avatar

2005-11-05 18:02

I fiddled around for hours last night and have got Nochex Checkout working (see my draft cart: http://www.secretshop.co.uk/QuickCart)

Feel free to play around with it, I wont take any orders seriously. If you press the pay with Nochex button you will see that the Nochex Checkout displays the amount and the order reference number.

The only problems I have are:

there are now 2 submit buttons on the orders_delivery page, one to submit the order to the site and one to submit the order to the Nochex Checkout, and once one is pressed you can't go back and submit the other.

Secondly, for some reason I can only get the Nochex form to read the basket amount BEFORE delivery is added.

Hopefully someone out there will know a way around these problems.

I will tidy up my code in the next few days and paste some here for people try themselves.

Hope I have been of some help and that this makes sense to you all!

Thanks
Jo

Jo

No avatar

2005-11-05 18:34

Ok, after a bit more playing around I have now got the code working without the problem of the 2 submit buttons.

Now the customer goes through the cart as usual, presses the send button to submit the order to the site, goes through to the orders_saved page and chooses their payment processor (so far I have only included Paypal and Nochex).

So please go to http://www.secretshop.co.uk/QuickCart and place an order (I will not process it) to try it out and let me know what you think / if you have any problems etc.

Jo

Jo

No avatar

2005-12-05 15:29

For anyone visting the above link - at the moment there is an error regarding telephone number which I have fixed in my new version of QuickCart at SecretShop.co.uk (please dont place test orders there though).

If you still want to test it at SecretShop.co.uk/QuickCart, feel free but ignore the telephone error!

Thanks.

P.S - If anyone wants more info on how I added the Paypal and Nochex payment options to the cart feel free to ask.

rubdub

No avatar

2005-12-06 11:00

Hey Jo I tested your mod out and it works great. I'd love to know how you did it.

Jo

No avatar

2005-12-08 02:38

Hi,

Basically, to add Paypal and Nochex to the cart I edited the orders_saved.tpl file (in templates/default). The following code works but it doesnt include the delivery charge for some reason. If it doesnt work or if someone knows how to add the delivery please let me know!

Here is the full code to paste into orders_saved.tpl (dont forget to change the email addresses and return url's in the forms):


<style type="text/css">
<!--
.style3 {font-family: Arial, Helvetica, sans-serif; font-weight: bold; }
.style4 {
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
color: #669933;
}
.style5 {color: #000000}
-->
</style>
<table cellspacing='0' align='left'>
<tr>
<td colspan='2' style='padding: 5px;' class='h1'>
$lang[Order] - Payment
</td>
</tr>
</table>
<p>&nbsp;</p>
<table class="operation table" width="441" border="0" align="center" cellpadding="10" cellspacing="0">
<tr bgcolor="#DACFE0">
<td width="201" valign="top" class='ok'>
$lang[Order_finished]
</td>
<td width="200">
After making payment you will be returned to this website </td>
</tr>
<tr bgcolor="#DACFE0">
<td colspan="2">As you have already given us your address details there is no need to fill in these sections whilst using the secure Nochex checkout, however, you may do so if you wish. </td>
</tr>
</table>
<div align="center"><br>
</div>
<br>
<br>
<table width="441" border="0" align="center" cellpadding="4" cellspacing="0">
<tr bgcolor="#669933">
<td height="29" bgcolor="#669933"><span class="style3">Pay with PAYPAL:</span></td>
<td><span class="style3">Pay with NOCHEX: </span></td>
</tr>
<tr bgcolor="#F3F3F3">
<td width="210"><form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<div align="center">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="youremail@yourdomain.co.uk">
<input type="hidden" name="item_name" value="Payment - www.yourdomain.co.uk">
<input type="hidden" name="item_number" value="Order ID $iOrder">
<input type="hidden" name="amount" value="$fSummary">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="GBP">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but6.gif" border="0"

name="submit" alt="Pay with PayPal">
</div>
</form></td>
<td width="209"><form action="https://www.nochex.com/nochex.dll/checkout" method=post>
<div align="center">
<input type="hidden" name="email" size="64" value="youremail@yourdomain.co.uk">
<input type="hidden" name="amount" size="8" value="$fSummary">
<input type="hidden" name="ordernumber" size="64" value="Order ID $iOrder">
<br>
<input type="hidden" name="logo" size="64">
<br>
<input type="hidden" name="returnurl" size="64" value="www.yourdomain.co.uk">
<input name="image" type="image" src="http://support.nochex.com/web/images/cardsboth2.gif" alt="I accept payment using NOCHEX">
<!-- NOCHEX LOGO FINISH -->
</div>
</form></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><span class="style4">*If you don't have a Paypal account and don't want to sign up for one, you can use Nochex to pay with UK credit or debit cards <span class="style5">without</span> becoming a member</span></td>
</tr>
</table>
<div align="center"><br>
<a href='javascript:windowNew( "?p=ordersWindowPrint&amp;iOrder=$iOrder" );'><b>$lang[Order_print]</b></a>
<br />
<br />
<a href='?p='>$lang[Homepage]</a>
<br />
<br />
</td>
</table>
</div>

Jedi Hunter

No avatar

2005-12-08 16:02

what if I'm using Authorize.net? this is a "sample code" they sent me using AIM (advanced integration method):

<html>
<head>
<title>AIM Example in PHP&nbsp;&nbsp;::&nbsp;&nbsp;Authorize.Net</title>

<style type="text/css">
<!--

body {background-color: #ffffff; color: #000000;}

body, td, th, h1, h2 {font-family: sans-serif;}

pre {margin: 0px; font-family: monospace;}

a:link {color: #000099; text-decoration: none;}

a:hover {text-decoration: underline;}

table {border-collapse: collapse;}

.center {text-align: center;}

.center table { margin-left: auto; margin-right: auto; text-align: left;}

.center th { text-align: center; !important }

td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}

h1 {font-size: 150%;}

h2 {font-size: 125%;}

.p {text-align: left;}

.q {background-color: #9999cc; font-weight: normal; color: #ffffff;}

.e {background-color: #ccccff; font-weight: bold;}

.h {background-color: #9999cc; font-weight: bold;}

.v {background-color: #cccccc;}

i {color: #666666;}

img {float: right; border: 0px;}

hr {width: 600px; align: center; background-color: #cccccc; border: 0px; height: 1px;}

//-->
</style>

</head>


<body>

<div class="center">

<table border="0" cellpadding="3" width="600">
<tr class="h">
<td>


<b>Authorize.Net<br>
Advanced Implementation Method (AIM)<br>
PHP Example Code</b><br>
<br>
This is just a test to:<br>
1) post an HTTP request to the secure Authorize.Net server<br>
2) process feedback from the secure Authorize.Net transaction DLL<br>
<br>

</td>
</tr>
<tr class="v">
<td>



<?php


$DEBUGGING = 1; # Display additional information to track down problems
$TESTING = 1; # Set the testing flag so that transactions are not live
$ERROR_RETRIES = 2; # Number of transactions to post if soft errors occur

$auth_net_login_id = "CHANGE THIS";
$auth_net_tran_key = "CHANGE THIS";
$auth_net_url = "https://certification.authorize.net/gateway/transact.dll";
# Uncomment the line ABOVE for shopping cart test accounts or BELOW for live merchant accounts
# $auth_net_url = "https://secure.authorize.net/gateway/transact.dll";

$authnet_values = array
(
"x_login" => $auth_net_login_id,
"x_version" => "3.1",
"x_delim_char" => "|",
"x_delim_data" => "TRUE",
"x_url" => "FALSE",
"x_type" => "AUTH_CAPTURE",
"x_method" => "CC",
"x_tran_key" => $auth_net_tran_key,
"x_relay_response" => "FALSE",
"x_card_num" => "4242424242424242",
"x_exp_date" => "1203",
"x_description" => "Recycled Toner Cartridges",
"x_amount" => "12.23",
"x_first_name" => "Charles D.",
"x_last_name" => "Gaulle",
"x_address" => "342 N. Main Street #150",
"x_city" => "Ft. Worth",
"x_state" => "TX",
"x_zip" => "12345",
"CustomerBirthMonth" => "Customer Birth Month: 12",
"CustomerBirthDay" => "Customer Birth Day: 1",
"CustomerBirthYear" => "Customer Birth Year: 1959",
"SpecialCode" => "Promotion: Spring Sale",
);

$fields = "";
foreach( $authnet_values as $key => $value ) $fields .= "$key=" . urlencode( $value ) . "&";


echo "<hr>";
///////////////////////////////////////////////////////////

echo "<b>01: Post the transaction (see the code for specific information):</b><br>";


$ch = curl_init("https://certification.authorize.net/gateway/transact.dll"); // URL of gateway for cURL to post to
curl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)
curl_setopt($ch, CURLOPT_POSTFIELDS, rtrim( $fields, "& " )); // use HTTP POST to send form data
### curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response. ###
$resp = curl_exec($ch); //execute post and get results
curl_close ($ch);


echo "<hr>";
///////////////////////////////////////////////////////////

echo "<b>02: Get post results:</b><br>";
echo $resp;
echo "<br>";

echo "<hr>";
///////////////////////////////////////////////////////////

echo "03: Parse post results (simple approach)<br>";

$text = $resp;

echo "<table cellpadding=\"5\" cellspacing=\"0\" border=\"1\">";
echo "<tr>";
echo "<td class=\"v\">";


$tok = strtok($text,"|");
while(!($tok === FALSE)){
//while ($tok) {
echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$tok."&l t;br>";
$tok = strtok("|");
}


echo "</td>";
echo "</tr>";
echo "</table>";


echo "<hr>";
///////////////////////////////////////////////////////////

echo "<b>04: Parse the results string into individual, meaningful segments:</b><br>";


echo "<table cellpadding=\"5\" cellspacing=\"0\" border=\"1\">";

///////////////////////////////////////////////////////////
// STATISTICAL USE ONLY: //
///////////////////////////////////////////////////////////

echo "<tr>";
echo "<td class=\"q\">";
echo "Length of the returned string from Authorize.Net:";
echo "</td>";

echo "<td class=\"q\">";
echo strlen($resp);
echo "</td>";

echo "</tr>";

$howMany = substr_count($resp, "|");

echo "<tr>";
echo "<td class=\"q\">";
echo "Number of delimiter characters in the returned string:";
echo "</td>";

echo "<td class=\"q\">";
echo $howMany;
echo "</td>";

echo "</tr>";
///////////////////////////////////////////////////////////



$text = $resp;
$h = substr_count($text, "|");
$h++;




for($j=1; $j <= $h; $j++){

$p = strpos($text, "|");

if ($p === false) { // note: three equal signs

echo "<tr>";
echo "<td class=\"e\">";

// x_delim_char is obviously not found in the last go-around

if($j>=69){

echo "Merchant-defined (".$j."): ";
echo ": ";

echo "</td>";
echo "<td class=\"v\">";

echo $text;
echo "<br>";

} else {

echo $j;
echo ": ";

echo "</td>";
echo "<td class=\"v\">";

echo $text;
echo "<br>";

}


echo "</td>";
echo "</tr>";

}else{

$p++;

// We found the x_delim_char and accounted for it . . . now do something with it

// get one portion of the response at a time
$pstr = substr($text, 0, $p);

// this prepares the text and returns one value of the submitted
// and processed name/value pairs at a time
// for AIM-specific interpretations of the responses
// please consult the AIM Guide and look up
// the section called Gateway Response API
$pstr_trimmed = substr($pstr, 0, -1); // removes "|" at the end

if($pstr_trimmed==""){
$pstr_trimmed="NO VALUE RETURNED";
}


echo "<tr>";
echo "<td class=\"e\">";

switch($j){

case 1:
echo "Response Code: ";

echo "</td>";
echo "<td class=\"v\">";

$fval="";
if($pstr_trimmed=="1"){
$fval="Approved";
}elseif($pstr_trimmed=="2"){
$fval="Declined";
}elseif($pstr_trimmed=="3"){
$fval="Error";
}

echo $fval;
echo "<br>";
break;

case 2:
echo "Response Subcode: ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 3:
echo "Response Reason Code: ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 4:
echo "Response Reason Text: ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 5:
echo "Approval Code: ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 6:
echo "AVS Result Code: ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 7:
echo "Transaction ID: ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 8:
echo "Invoice Number (x_invoice_num): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 9:
echo "Description (x_description): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 10:
echo "Amount (x_amount): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 11:
echo "Method (x_method): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 12:
echo "Transaction Type (x_type): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 13:
echo "Customer ID (x_cust_id): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 14:
echo "Cardholder First Name (x_first_name): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 15:
echo "Cardholder Last Name (x_last_name): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 16:
echo "Company (x_company): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 17:
echo "Billing Address (x_address): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 18:
echo "City (x_city): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 19:
echo "State (x_state): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 20:
echo "ZIP (x_zip): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 21:
echo "Country (x_country): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 22:
echo "Phone (x_phone): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 23:
echo "Fax (x_fax): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 24:
echo "E-Mail Address (x_email): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 25:
echo "Ship to First Name (x_ship_to_first_name): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 26:
echo "Ship to Last Name (x_ship_to_last_name): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 27:
echo "Ship to Company (x_ship_to_company): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 28:
echo "Ship to Address (x_ship_to_address): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 29:
echo "Ship to City (x_ship_to_city): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 30:
echo "Ship to State (x_ship_to_state): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 31:
echo "Ship to ZIP (x_ship_to_zip): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 32:
echo "Ship to Country (x_ship_to_country): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 33:
echo "Tax Amount (x_tax): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 34:
echo "Duty Amount (x_duty): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 35:
echo "Freight Amount (x_freight): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 36:
echo "Tax Exempt Flag (x_tax_exempt): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 37:
echo "PO Number (x_po_num): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 38:
echo "MD5 Hash: ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

case 39:
echo "Card Code Response: ";

echo "</td>";
echo "<td class=\"v\">";

$fval="";
if($pstr_trimmed=="M"){
$fval="M = Match";
}elseif($pstr_trimmed=="N"){
$fval="N = No Match";
}elseif($pstr_trimmed=="P"){
$fval="P = Not Processed";
}elseif($pstr_trimmed=="S"){
$fval="S = Should have been present";
}elseif($pstr_trimmed=="U"){
$fval="U = Issuer unable to process request";
}else{
$fval="NO VALUE RETURNED";
}

echo $fval;
echo "<br>";
break;

case 40:
case 41:
case 42:
case 43:
case 44:
case 45:
case 46:
case 47:
case 48:
case 49:
case 50:
case 51:
case 52:
case 53:
case 54:
case 55:
case 55:
case 56:
case 57:
case 58:
case 59:
case 60:
case 61:
case 62:
case 63:
case 64:
case 65:
case 66:
case 67:
case 68:
echo "Reserved (".$j."): ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";
break;

default:

if($j>=69){

echo "Merchant-defined (".$j."): ";
echo ": ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";

} else {

echo $j;
echo ": ";

echo "</td>";
echo "<td class=\"v\">";

echo $pstr_trimmed;
echo "<br>";

}

break;

}

echo "</td>";
echo "</tr>";

// remove the part that we identified and work with the rest of the string
$text = substr($text, $p);

}

}

echo "</table>";

echo "<br>";




echo "<hr>";
///////////////////////////////////////////////////////////


echo "<b>04: Done.</b><br>";



?>


</td>
</tr>
</table>

</div>

</body></html>

Jedi Hunter

No avatar

2005-12-08 16:02

what do I need to change in order to make this work?

Jedi Hunter

No avatar

2005-12-08 16:26

will QC even work with Authorize.Net?

Newbie

No avatar

2005-12-13 13:48

I'm no php programmer but surely you should be able to set your array up to reflect the variables from QC . . . . ie:

you would change

"x_amount" => "12.23", to "x_amount" => "$fSummary", etc etc

I imagine you have a link like Jo above to select your payment gateway and then all the relevant variables are carried forward to your Authorize page where you set the corresponding array up??? Does that sort of make sense???

I know what I mean but it's slightly harder to actually explain it :-o

Any php guru out there who could shed a bot more light on the subject??

Cryptix

Avatar: Cryptix

2006-05-19 21:01

I originally made my post in the wrong topic. But here it is anyway:

I'm using QC 1.2, but im yet to get nochex working. Could anyone please offer me some help as to how to get nochex working with 1.2?

Any help would be very much appreciated. Thank you.

~Jo

No avatar

2006-06-27 19:13

Hi,

I got Paypal and Nochex working with v0.3.1. See here > http://www.secretshop.co.uk/QuickCart_1

Feel free to make a test order, nothing will be processed.

The details are above on how I got that working. I haven't tried it in v1.2 yet but it's definitely worth a try because it worked great with v0.3.1 (apart from the page jumping to the right after checkout but that's probably just something silly I've done and hopefully wont happen to others!)

~Jo

No avatar

2006-06-27 19:23

Reading back, I have just realised there's no "orders_saved.tpl" in v.1.2 but there might be an equivalent file to paste the code into...

Anyone got any ideas? I'm having a look now but it might take me a while to figure it out!

Karl19

No avatar

2006-07-12 16:10

Hi Jo,

Did you find a way to add NoChex with version 1.2 (or 1.3)? I'm just about to get stuck into QuickCart as I need a small cart for a client, but one of the requirements is for NoChex to work.

Would be intereting to hear your progress.

Thanks, karl

Jo

No avatar

2006-07-20 23:42

Hi there,

Yes I got it working after a little playing around and thanks to Ste707 for posting how to add Paypal as it's basically the same as that - see this thread:

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

Follow the instructions for adding Paypal as in the thread above, then change it a little as follows to add Nochex -

Step 1 (please note: this step is not essential but just keeps it tidier instead of putting Paypal and Nochex through under the head of just Paypal)

In actions_client/orders.php:

Use code posted in thread above but change this line:

$content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_PAYPAL' );

to this:

$content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_PAYPAL_NOCHEX' );



Step 2

In templates/messages.tpl -

Paste this code instead of the code in the other thread:

Add all the following code to the file at the top.

<!-- BEGIN ORDER_PAYPAL_NOCHEX -->
<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 />
<a href="?p=">$lang[Homepage]</a><br><br>
<table width="70%" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="YOU@YOURDOMAIN.co.uk">
<input type="hidden" name="item_name" value="Order ID $iOrder">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="amount" value="$aList[fSummary]">
<input type="image" src="PUT IN SOURCE OF YOUR BUTTON OR PAYPAL BUTTON HERE" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form></td>
<td><form action="https://www.nochex.com/nochex.dll/checkout"; method=post>
<input type="hidden" name="email" size="64" value="YOU@YOURDOMAIN.co.uk">
<input type="hidden" name="amount" size="8" value="$aList[fSummary]">
<input type="hidden" name="ordernumber" size="64" value="Order ID $iOrder">
<input type="hidden" name="logo" size="64">
<input type="hidden" name="returnurl" size="64" value="www.YOURDOMAIN.co.uk">
<input name="image" type="image" src="http://support.nochex.com/web/images/cardsboth2.gif"; alt="I accept payment using NOCHEX">
<!-- NOCHEX LOGO FINISH -->
</form></td>
</tr>
</table>
</br></br>
</div>
</div>
<!-- END ORDER_PAYPAL_NOCHEX -->


Obviously, don't forget to change the email address and domain etc. to your own. I hope that works for everyone and that these instructions make sense!

Thanks,
Jo

Jo

No avatar

2006-08-31 15:22

UPDATE: anyone using QCLoaded v1.3 with Paypal code added, see this thread (it might save you some frustration!):

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

pauld

No avatar

2007-03-19 14:33

code works great but it wouldn't transfer the 'posatage/courier' amount to the nochex site...

until i changed this line

<input type="hidden" name="amount" size="8" value="$aList[fSummary]">

to

<input type="hidden" name="amount" size="8" value="$fSummary">


now it works fine, dont know why but I hope this helps

Back to top
about us | contact