How to create a html paypal with no Billing information input needed? - html

I want to create a html paypal form. But how can I make the form with no Billing information input needed? Or what input variable should I add in the form? So The buyer don't need to input Billing information as the image shown below.

If you don't want the buyer to input billing information again in PayPal checkout page, you can pass buyer's billing information form your site to PayPal, as below:
<input type='hidden' name='first_name' value='tet'>
<input type='hidden' name='last_name' value='test'>
<input type="hidden" name="city" value="test">
<input type="hidden" name="state" value="NE">
<input type="hidden" name="zip" value="68114">
<input type="hidden" name="country" value="US">
<input type='hidden' name='address1' value='testtest'>
Then PayPal can fill in these information automatically.

Related

PayPal HTML form Basics with unencrypted values

is it still possible to use the PayPal HTML form Basics with unencrypted values in hidden fields? I know that people can change easily the value in the form, but can I use it or there is a problem with PayPal? Can PayPal block or limit my account if in my site I use this kind of form to pass the payment value? Thanks
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="seller#site.com">
<input type="hidden" name="item_name" value="hat">
<input type="hidden" name="item_number" value="123">
<input type="hidden" name="amount" value="15.00">
<input type="hidden" name="first_name" value="John">
<input type="hidden" name="last_name" value="Doe">
<input type="hidden" name="address1" value="9 Elm Street">
<input type="hidden" name="address2" value="Apt 5">
<input type="hidden" name="city" value="Berwyn">
<input type="hidden" name="state" value="PA">
<input type="hidden" name="zip" value="19312">
<input type="hidden" name="night_phone_a" value="610">
<input type="hidden" name="night_phone_b" value="555">
<input type="hidden" name="night_phone_c" value="1234">
<input type="hidden" name="email" value="jdoe#test.com">
<input type="image" name="submit"
src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
alt="PayPal - The safer, easier way to pay online">
</form>
For backwards compatibility with old websites, legacy HTML forms like this will still work. They redirect to the PayPal site, and the PayPal site securely collects the payment information.
However, there is absolutely no reason to use an HTML form. The current HTML/JS Checkout integration supports all the same features of the above and more. It presents a modern, in-context experience and does not redirect away from your site.

Paypal recurring payments using cmd=_xclick-subscriptions not returning transaction data to return url

I'm using a recurring payment feature on my website. Below is the code for the payment page.
<form id = "ofnForm" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="XXXXXXX#gmail.com">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="a3" value="5">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="Y">
<input type="hidden" name="src" value="1">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" class="payData" name="custom" value="1286">
<!-- Specify URLs -->
<input type='hidden' name='cancel_return' value='XXX.com/users/paymentAccountstatus/1286'>
<input type='hidden' name='return' value='XXX.com/users/paymentAccountstatus/1286'>
<input type="hidden" name="notify_url" value='XXX.com/users/paymentAccountstatus/1286'>
<input type='hidden' name='rm' value='2'>
<!-- Display the payment button. -->
<img style="margin-top: 10px;" src="xx.com/image/paypal.png" id="paypal_img" class="paypal_img"/>
</form>
Onclick of the payment button system is redirecting to paypal website where the user is able to pay the amount. After payment succes paypal redirecting to the receipt page to show the payment detail. Below the payment detail there is a button called "return to marchant website". Onclicking to that button user is redirecting to my website but, I am not able to retrive any data from the return response.
Could anyone tell me why I am not able to receive any response from PayPal?
Any help is appriciable.
Do you have "Payment data transfer" enabled in https://www.paypal.com/businessmanage/preferences/website ?
It might not work with subscriptions
In any case, it's not very useful. The user may never return, either because they didn't click to return or because they were interrupted somehow.
If you need a reliable notification of the transaction information from subscriptions, set up a separate asynchronous listener for either webhook events, or the older Instant Payment Notification (IPN) message service

Redirection error for my HTML form

I have a question about integrating mailchimp in an HTML form. I have my subscribe button and I want to redirect it to my mailchimp's sub website.
<form action="https://xxxxxxxxxx.xxxxxxxxx.list-manage.com/subscribe/post" method="POST">
<input type="hidden" name="u" value="xxxxxxxxxxxxxxxxxxxxxxxxx">
<input type="hidden" name="id" value="xxxxxxxxxx">
<input type="email" placeholder="Enter your e-mail..." name="EMAIL" required></input>
</form>
So I submit it via enter key and I redirect to my website.
http://my-website.com?u=xxxxxxxxxxxxx&id=xxxxxxxx&EMAIL=email%40email.com
But my expectation is this:
https://xxxxx.xxx.list-manage.com/subscribe/post?u=xxxxxxxxxxxxx&id=xxxxxxxx&EMAIL=email%40email.com
How can I fix this?

How to secure paypals purchase forms

I'm trying to help someone with a problem, where you can donate for some points, but you the source code will allow you to edit the values of the paypal button.
For instance, i choose 5 points which should cost 5 dollar, but when I edit source code I can see the whole paypal form with values, and edit the values.
So how can I secure the form so that it cannot be edited?
Here's the code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="at" value="nBWAy2wwJn1O1LdoLcMn8AOdPxBBUxhnZfqFvAlGQq1oDm0czxn5FBcpgIW">
<input type="hidden" name="business" value="admin#worldofthegods.com">
<input type="hidden" name="item_name" value="DP|1|452160">
<input type="hidden" name="amount" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://www.worldofthegods.com/donate.php?action=done">
<input type="hidden" name="cancel_return" value="http://www.worldofthegods.com/donate.php?action=cancel">
<input type="hidden" name="notify_url" value="http://www.worldofthegods.com/ipn_donator.php">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="image" src="http://worldofthegods.com/images/PaypalButton.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
In this way, it's impossible. I guess what you want to do, and this is not the correct way you are following.
You need to verify each payment and make sure they are valid and payed in correct amount.
Paypal IPN is the solution and you need some Server-side programming.
Read more:
Paypal API Question - Can I use Return Url to verify payment
How to verify successful payment of paypal
I'd suggest using something like Express Checkout, which allows you to send the transaction details in an API call instead of showing them in HTML code to the buyer.
However, barring that, your next best option is to use Encrypted Website Payments. https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/encryptedwebpayments/#id08A3I0P017Q

Two submit buttons

I have two forms on a same page and I have two submit buttons...so how do I check if the user filled out the first form before clicking the submit button on second form? The first form posts the data to php page which presents on a same page as the html and the second form sends the data to another PHP page with thank you message....I mean how do force the user to finish the first form before clicking the submit button on the second form? if the user hits the submit button on the second form, the form directs to thank you page with out checking if the user finished the first form..how do I stop that?
<html>
<body>
<form action="" method="post" enctype="multipart/form-data">
<input type="hidden" name="submited" value="true" />
<label for="file">Choose Photo:</label>
<input type="file" name="file" onchange="file_selected = true;" required>
<input type="submit" value="Submit" name="submit">
</form>
<form action="Send.php" method="post">
First Name:<input type="text" name="fname" required><br>
Last Name:<input type="text" name="lname" required><br>
Choose Username:<input type="text" name="username" required><br>
Age:<input type="text" name="age" required><br>
<input type="submit" value="Submit" name="submit">
</form>
You can change the name field and then access the value on the server side.
For example:
<input type="submit" value="Submit" name="submitOne" />
If you're using php you could use something like this:
if(isset($_POST['submitOne'])){ /* first one pressed */ }
There are also some other options like using jQuery or javascript to validate first.
Try: http://bassistance.de/jquery-plugins/jquery-plugin-validation/