Dynamic price in Buy item button and hidden notify_url - paypal

I want to create PayPal button with dynamic price (depending from the item)
and hidden notify url.
The "amount" input is not working with saved and encrypted buttons,
but if I use plain text the notify_url is visible in the code.
Is the a way it to be hidden or encrypted and in the same time to have
working amount input

You don't have to specify the notify_url in code, specifying the notify_url as a hidden input only overrides the one that you have specified in your paypal account. About the price, there are lots of possibilities with paypal starting from creating a simple "buy now" button with dropdowns above to select price+product to paypal api's where you can generate buttons in your application

Related

Common Paypal Button to accept payments

I have e-book selling website where I used a paypal button to accept the payment. The button is created from paypal website and its code snippet is added in the form to show the button(not via api). When I set the currency of the button to USD then indian paypal users are not able to use the button. It says "Merchant Does bot accept payment in your currency". If I change it to INR then it only accepts the indian customers only.
Is there any way to accept all currencies via a common button. I means Indians could pay me in INR and Others in USD.
Thanks in advance.
No, separate currencies are needed due to Indian regulations, and there is no support for combining multiple currencies (and their respective amounts) within a single button, other than coding it yourself.
If you generate buttons at PayPal, you need one button for domestic payments in INR, and another button for international payments in a currency such as USD.
It's possible to make something like a dropdown or radio buttons that switch a single PayPal button between the configurations for amount1/USD and amount2/INR -- i.e., give the buyer a way to select their country and change the amount/currency based on that -- but to do that you will need to write some custom JavaScript code to make the switch.

recurring payments where i can pass in the amount and number of payments

I am trying to make a recurring payment button but I want to be able to pass to it the total amount to pay and the amount of payments
if i create a button in paypal then i have to create a button for every option - is there anyway to pass in the html the amount and the number of payments
When creating your button makes sure to disable the "save at PayPal" option which turns it into a hosted button. This will make all of the button details available in the HTML code.
At that point you could then dynamically set the values of the HTML form parameters.
Keep in mind that doing this is less secure because somebody could view source, copy your button code, adjust the values to whatever they want, and then check out that way.
The best way to do this would be using the Express Checkout API, but that will require more coding knowledge.

How to make PayPal recurring donation button for OTHER nonprofits

I would like to include PayPal recurring donation buttons on my website so that users can donate to other nonprofits/charities of my choosing. My website would include many of these buttons, and all money would be sent directly to these charities. How would I go about this? As far as I know, one can only create donate/subscription buttons where the money goes to the creator of the button. Thanks!
When you create the button make sure to uncheck the option to save the button at PayPal, which would bind it to that account.
When you do that the HTML code provided will include a "business" parameter that would be the email address of the account the profile should be created with and the money should drop in to.
Another option would be using the Express Checkout API, with which you can specify the account the money should go to with the SELLERPAYPALACCOUNTID parameter.

Adding an amount text field to "pay now" PayPal button

I want my users to be able to choose the amount before clicking on the "pay now" PayPal button. On the page to build such button on PayPal website, one can add custom fields and call it "amount", but the value entered in this field will not be taken into account when users click the button: they are directed to PayPal website to validate payment, however the amount is zero.
How to create an amount field so that when the user enters a value X and clicks the button, this value X appears as the amount on PayPal payment page?
If you post a sample of the button code you're working with I could adjust it for you accordingly. It sounds like you just need to set something like the following in your code.
<input type="text" name="amount" value="" />
That would make a text field display so the person could enter the amount they want, and since the name is amount, when posted to PayPal it would see it the same as if it were a hidden field.
The easiest way to allow your customers to choose the payment amount is to simply leave the amount field blank when creating the button in the button factory. No custom fields are necessary. The customer will be prompted to enter an "item Price on the hosted checkout page and that is what the customer will pay unless you have profile tax or shipping enabled.

PayPal recurring donation amount (user-defined) option

I see how to add a select box for pre-determined recurring donation/subscription amounts but can there also be an option for the user to decide how much they wish to donate (and perhaps how frequently)?
Thanks
With Donate and Buy Now payment buttons your buyers can enter their own price to pay on the PayPal checkout page. You can accomplish that by just leaving the amount value empty.
Subscription buttons require that an amount (the a3 variable for Subscriptions) value be provided during the redirect to PayPal so if you leave the field blank you would get an error. However, if you change the a3 input type to be text instead of hidden in your HTML form buyers can enter the amount on a text field on your website before being redirected to PayPal.