BAD_INPUT_ERROR on paypal form

rnnessa
New Community Member

We are using a simple paypal form to submit payments from WHMCS. I believe this used to work, but now we are getting a BAD_INPUT_ERROR. I'm not sure which value is the problem. Below is the form.

 

<form style="display:none;" id="paypalForm" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="{$payPalEmail}">
<input type="hidden" id="item_name" name="item_name" value="">
<input type="hidden" id="amount" name="amount" value="">
<input type="hidden" name="tax" value="0.00">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="{$noShiping}">
<input type="hidden" name="address_override" value="{$addressOverride}">
<input type="hidden" name="first_name" value="{$firstname}">
<input type="hidden" name="last_name" value="{$lastname}">
<input type="hidden" name="email" value="{$email}">
<input type="hidden" name="address1" value="{$address1}">
<input type="hidden" name="city" value="{$city}">
<input type="hidden" name="state" value="{$statecode}">
<input type="hidden" name="zip" value="{$postcode}">
<input type="hidden" name="country" value="{$countrycode}">
<input type="hidden" name="night_phone_a" value="{$night_phone_a}">
<input type="hidden" name="night_phone_b" value="{$night_phone_b}">
<input type="hidden" name="night_phone_c" value="{$night_phone_c}">
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="currency_code" value="{$currency_code}">
<input type="hidden" id="custom" name="custom" value="">
<input type="hidden" name="return" id="return" value="">
<input type="hidden" name="cancel_return" value="{$cancelReturn}">
<input type="hidden" name="notify_url" value="{$notifyUrl}">
<input type="hidden" name="bn" value="WHMCS_ST">
<input type="hidden" name="rm" value="2">
<input id="paypalBtn" type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but03.gif" name="submit" alt="Make a one time payment with PayPal" border="0">
</form>

Login to Me Too
1 REPLY 1

MTS_Chiranjeevi
Moderator
Moderator

Good day @rnnessa,

 

Thank you for posting to the PayPal community.

 

This should be an issue with your html button code which is passing wrong payment requests to PayPal system.

 

I would suggest to please cross check you payment request values using the below guide link and pass valid request to PayPal system.

 

https://developer.paypal.com/api/nvp-soap/paypal-payments-standard/integration-guide/Appx-websitesta...

 

Sample HTML button code :  Use the following samples as a starting point to create your own HTML payment button code:

https://developer.paypal.com/api/nvp-soap/paypal-payments-standard/integration-guide/sample-code-lan... 

 

Sincerely,

Chiranjeevi

PayPal/Braintree MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.