Is it possible to generate a paypal express button without form? - paypal

I have created a command to get a markup from Paypal API and it returns me a form with Paypal button and some hidden input fields. Is it possible to generate a Paypal express button without a form and contains URL including the item details?

Related

PayPal REST API: Setting landing page to 'BILLING' when creating order always returns link to login page instead of card fields form

When creating an order request in PayPal REST API they say there is a possibility to set 'landing_page' field in 'application_context' object to 'BILLING' to get a link for credit or debit card payment form. Unfortunately when I use 'approve' link from 'links' array from order response it always opens login form. What should I do to get a link to credit/debit card form when using 'BILLING' setting of landing page ?
Current PayPal checkout integrations don't use redirects, and that parameter is no longer used from what I've seen
Instead of redirecting, use the JS SDK for the approval flow. Here is a demo that fetches to a backend for creating and capturing the order with the API.
With this integration, the "Debit or Credit Card" button is present and will open inline on your own site.

How to display payment method form and billing information form in custom page in magento 2?

Is it possible to display payment method in custom page with billing information form like check out page.
I want to display all payment method with billing information page. After select payment method customer can checkout from this custom page.

Add same custom input fields to all Paypal 'add to cart' buttons

I have a list of items on my site that can be purchased, each with a generic Paypal 'Add to cart' button. What I need to be able to do is to collect info from eight additional fields - I've done this in the past on a page with just a single 'buy it now' button via on0/os0, but I don't want the customer to have to enter this extra information on every item they add to cart as it will be the same for every item on the order. Ideally the eight fields I need would be put on the Payment Page, but from what I've read Paypal don't allow this.
What would be the neatest way of doing this? If there was only one form on the page I can see how I could easily do it, but as each 'add to cart' button is a separate form I'm a bit stuck.
Thanks in advance!
You can build your own cart functionality and then use cart upload to transmit the result to PayPal for checkout.
(Or better yet, if you can write API calls, use the Express Checkout API -- with SOLUTIONTYPE=Sole in the initial SetExpressCheckout call if PayPal is your only method of taking payments)
Basically, you have to build this sort of custom cart functionality yourself. PayPal will gladly process the payment with the information you then send, and that is all.

PayPal Donation button in form element

I am having great trouble to make PayPal donation button works as when I want to add is in between form tag. So where PayPal button itself having own form tag and action but when inserting between my form tag it is taking my form action and completely ignoring PayPal own form action which is stopping to take donner to Paypal page.
Now limitation is I cannot move PayPal button nor my own Form tag or action so please guide me.
You can't embed a form within a form, which is why you're having the trouble you're having.
One thing you can do to fix the issue is to make your form post to a final confirmation page which would then post to PayPal.
If you want to avoid the final confirmation page you could make your form post to a processor script like PHP that generates the request to PayPal and sends the user over there accordingly. The Express Checkout API is great for this sort of thing, but you would need to be familiar with web services in order to utilize that.

Dynamic price in Buy item button and hidden notify_url

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