payment problem

Get help with nopcart's interaction with payment provider gateways like Authorize.net, Worldpay, etc.

Moderators: Koibito, Stefko, Randy

payment problem

Postby shlemberg » Wed Sep 30, 2009 10:24 am

i my name is sagi.

i have a problem with the checkout.html when the user is clicking on submiy butoon.
the nopcart.js is not sending the amuont to the credit card company.
i get an error when i clicking on submiy butoon.

ERROR = "the amuont is not legal"

this is the code:

<HTML>
<HEAD>
<TITLE>

</TITLE>
<STYLE>

.frame {
float: right;
font-size: 1.2em;
margin: 0px 0;
padding: 0 0px;
width: 300px;
height: 50px;
background: url(images/pay.gif);

}



.greetext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;color: #006600;}
.blacktext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;color: #000000;}
.checkout {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000;}
.checkoutinput {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000;}
.nopcart {background: #46AC6F;border: 1px;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #ffffff;}
.nopheader {background: #46AC6F;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF;}
.nopentry {background: #FFFFFF;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000;}
.noptotal {background: #FFFFFF;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000;}
.nopbutton {background: #FFFFFF;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000;}
.style2 {font-size: 16px; font-family: Arial, Helvetica, sans-serif;}
a:link {
color: #000000;
text-decoration: none;
}
a:hover {
color: #009900;
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:active {
text-decoration: none;
}
</STYLE>
<SCRIPT SRC="language-il.js"></SCRIPT>
<SCRIPT SRC="nopcart.js">
//=====================================================================||
// NOP Design JavaScript Shopping Cart ||
// ||
// For more information on SmartSystems, or how NOPDesign can help you ||
// Please visit us on the WWW at http://www.nopdesign.com ||
// ||
// JavaScript Shop Module, V.4.4.0 ||
//=====================================================================||
</SCRIPT>


<script language="vbscript"> sub linka() if document.formi.chk.checked=true then document.getelementbyid("linka").style.display="block" else document.getelementbyid("linka").style.display="none" end if end sub </script>



<BODY BGCOLOR="White" TEXT="Black">
<div align="right">
<NOSCRIPT>
Whoops, we detected that your browser does not have JavaScript, or it is disabled. Our product catalog requires that you
have JavaScript enabled to order products. <a href="http://www.netscape.com">Netscape</a> and <a href="http://www.microsoft.com/ie">Microsoft</a>
offer free browsers which support JavaScript. If you are using a JavaScript compliant browser and still have problems, make sure you
have JavaScript enabled in your browser's preferences.
</NOSCRIPT>



<img src="images/reg.gif" align="right"><br/>
<br/>
<br/>
<br/><br/>
<br/>



<SCRIPT>
CheckoutCart();
</SCRIPT>

<br/>
<br/>
<br/>
<br/>
<br/>
<br/><br/><br/><br/>

<span class="style2"> למעבר לתשלום יש לאשר את התקנון </span>
<form name="formi">
<br>
<div class="frame">
<div align="center"><br/>
<input type=checkbox name="chk" onClick="linka()">
<span class="style2"><strong>אני מאשר שקראתי והסכמתי עם <a href="policy.html" target="_blank">התקנון</a></strong><a href="policy.html" target="_blank"></a></span><br>
</div>
</div>
<br><br><br><br><br>
<div id="linka" style="display: none">


<!--<form action="/cgi-bin/checkout.pl" method="POST" onSubmit="return CheckForm(this)">
</FORM> -->

<form action="pelepayform" action="https://www.pelepay.co.il/pay/paypage.aspx" target="_top">
</FORM>

credit card company form:

<form name="pelepayform" action="https://www.pelepay.co.il/pay/paypage.aspx" target="_top" method="post">
<INPUT TYPE="hidden" value="info@barlogo.co.il" NAME="business">
<INPUT TYPE="hidden" value="" NAME="amount">
<INPUT TYPE="hidden" value="" NAME="orderid">
<INPUT TYPE="hidden" value="_chart_shopp" NAME="description">
<INPUT TYPE="hidden" value="12" NAME="max_payments"><input type="image" src="http://www.pelepay.co.il/btn_images/pay_button_6.gif" name="submit" alt="Make payments with pelepay"></form>


</div>

</body>

<SCRIPT SRC="nopcart.js">
document.pelepayform.amount.value=(strOutput);//put your chart total amount
document.pelepayform.orderid.value= "";//put your chart order id number
</script>

</html>
shlemberg
WebMaster
 
Posts: 21
Joined: Wed Sep 30, 2009 10:10 am

Re: payment problem

Postby Koibito » Wed Sep 30, 2009 12:57 pm

Which format does the payment gateway use for the amount? PayPal, for instance, expects the amount to look like "50.00" or so, but that could be different from what your payment gateway expects. We need to know if the payment gateway wants the currency sign or not, and if it expects the amounts with a comma or not, i.e. "50,00" or "50.00".
John
Koibito
Site Admin / Guru
 
Posts: 918
Joined: Sun May 28, 2006 1:59 am
Location: New Jersey, USA

Re: payment problem

Postby shlemberg » Wed Sep 30, 2009 2:16 pm

it expects the amounts "50.00"
shlemberg
WebMaster
 
Posts: 21
Joined: Wed Sep 30, 2009 10:10 am

Re: payment problem

Postby Koibito » Wed Sep 30, 2009 6:24 pm

You will get the currency sign by default, so that is probably the reason that it is complaining about the amount not being legal.
John
Koibito
Site Admin / Guru
 
Posts: 918
Joined: Sun May 28, 2006 1:59 am
Location: New Jersey, USA

Re: payment problem

Postby shlemberg » Wed Sep 30, 2009 6:46 pm

how i loose the currency sign ?

how i get only the total number ?
shlemberg
WebMaster
 
Posts: 21
Joined: Wed Sep 30, 2009 10:10 am

Re: payment problem

Postby shlemberg » Wed Sep 30, 2009 9:22 pm

i thinki have a problem with the PaymentProcessor.
the checkout section don't send the amount value to the input type line at the checkout.html

Code: Select all
if ( PaymentProcessor == 'wp') {
         //Process this for WorldPay
         strOutput += "<input type=hidden name=\"orderid\" value=\""+ strPP + "\">";
         strOutput += "<input type=hidden name=\"amount\" value=\""+ moneyFormat(fTotal) + "\">";
      }



Code: Select all
<form name="pelepayform" action="https://www.pelepay.co.il/pay/paypage.aspx" target="_top" method="post" onSubmit="return strTOT(this)" >

<INPUT TYPE="hidden" value="info@barlogo.co.il" NAME="business">
<INPUT TYPE="hidden" value="" NAME="amount">
<INPUT TYPE="hidden" value="" NAME="orderid">
<INPUT TYPE="hidden" value="_chart_shopp" NAME="description">
<INPUT TYPE="hidden" value="3" NAME="max_payments">
<!--<form action="checkout.php" method="POST" onSubmit="return CheckForm(this)">-->

<input type="image" src="http://www.pelepay.co.il/btn_images/pay_button_6.gif"  name="submit" alt="Make payments with pelepay"></form>



when i put a value to the name line it working.

Code: Select all
<INPUT TYPE="hidden" value="35.00" NAME="amount">
shlemberg
WebMaster
 
Posts: 21
Joined: Wed Sep 30, 2009 10:10 am

Re: payment problem

Postby Koibito » Thu Oct 01, 2009 2:03 am

In the code you posted above, you need the CheckoutCart function within the form tags. You'll get something like this:
Code: Select all
<form ...>
<nobr>
<script type="text/javascript">
CheckoutCart();
</script>
</nobr>
.
.
</form>
John
Koibito
Site Admin / Guru
 
Posts: 918
Joined: Sun May 28, 2006 1:59 am
Location: New Jersey, USA

Re: payment problem

Postby shlemberg » Thu Oct 01, 2009 5:43 am

still not working

Code: Select all
<form ...>
<nobr>
<script type="text/javascript">
CheckoutCart();
</script>
</nobr>
.
.
</form>

   
 
<form name="pelepayform" action="https://www.pelepay.co.il/pay/paypage.aspx" target="_top" method="post" onSubmit="return strTOT(this)" >
<INPUT TYPE="hidden" value="info@barlogo.co.il" NAME="business">
<INPUT TYPE="hidden" value="" NAME="amount">
<INPUT TYPE="hidden" value="" NAME="orderid">
<INPUT TYPE="hidden" value="_chart_shopp" NAME="description">
<INPUT TYPE="hidden" value="3" NAME="max_payments">
<!--<form action="checkout.php" method="POST" onSubmit="return CheckForm(this)">-->

<input type="image" src="http://www.pelepay.co.il/btn_images/pay_button_6.gif"  name="submit" alt="Make payments with pelepay"></form>
shlemberg
WebMaster
 
Posts: 21
Joined: Wed Sep 30, 2009 10:10 am

Re: payment problem

Postby Koibito » Thu Oct 01, 2009 12:54 pm

That's not what I meant. You want to post the total amount to the payment gateway, so the variable that holds the total amount total has to be one of the form variables.

Code: Select all
<form name="pelepayform" action="https://www.pelepay.co.il/pay/paypage.aspx" target="_top" method="post" onSubmit="return strTOT(this)" >
<nobr>
<script type="text/javascript">
CheckoutCart();
</script>
</nobr>
<INPUT TYPE="hidden" value="info@barlogo.co.il" NAME="business">
<INPUT TYPE="hidden" value="" NAME="amount">
<INPUT TYPE="hidden" value="" NAME="orderid">
<INPUT TYPE="hidden" value="_chart_shopp" NAME="description">
<INPUT TYPE="hidden" value="3" NAME="max_payments">
<input type="image" src="http://www.pelepay.co.il/btn_images/pay_button_6.gif"  name="submit" alt="Make payments with pelepay">
</form>


Use "View Generated Source" in FireFox, or "Save As" in Internet Explorer to see if you get the correct variable name and value in there.
John
Koibito
Site Admin / Guru
 
Posts: 918
Joined: Sun May 28, 2006 1:59 am
Location: New Jersey, USA

Re: payment problem

Postby shlemberg » Fri Oct 02, 2009 11:33 am

i am not sure i anderstand what to do.
i have internet explorer.
shlemberg
WebMaster
 
Posts: 21
Joined: Wed Sep 30, 2009 10:10 am

Re: payment problem

Postby Koibito » Fri Oct 02, 2009 1:00 pm

shlemberg wrote:i am not sure i anderstand what to do. i have internet explorer.


In Internet Explorer, save the checkout page to your local harddrive, using 'Save As' or equivalent, so you can see the code that was generated by the CheckoutCart() function. When you just look at the source code with the page loaded in the browser, you won't see the HTML generated by the CheckoutCart() function.
John
Koibito
Site Admin / Guru
 
Posts: 918
Joined: Sun May 28, 2006 1:59 am
Location: New Jersey, USA

Re: payment problem

Postby shlemberg » Fri Oct 02, 2009 1:22 pm

OK working

thanks man for your help.

now costumers can buy from my website.
shlemberg
WebMaster
 
Posts: 21
Joined: Wed Sep 30, 2009 10:10 am

Re: payment problem

Postby Koibito » Fri Oct 02, 2009 3:25 pm

Yes, it seems to work now.

What are you selling there? Road signs?
John
Koibito
Site Admin / Guru
 
Posts: 918
Joined: Sun May 28, 2006 1:59 am
Location: New Jersey, USA

Re: payment problem

Postby shlemberg » Sun Oct 04, 2009 7:41 am

i sell sign for parking,business,home.....
shlemberg
WebMaster
 
Posts: 21
Joined: Wed Sep 30, 2009 10:10 am


Return to Help: Payment Gateways

Who is online

Users browsing this forum: No registered users and 2 guests