paypal smart payment button display issue - paypal

I have created PayPal Smart Payment Buttons in my application. By default it is showing two buttons first button for PayPal login window, and second button for Debit or Credit Card window.
On clicking the second button the first button is not displaying. I can see the both buttons in chrome developer console. margin-top:59px property is added by the script.
Here you can try PayPal's interactive code demo.
How do I get rid of it? Is there a setting somewhere to show both when button click?

Why do you want to get rid of it? The second button is for entering a debit or credit cads and paying as a guest. Typically this is a much-desired feature, not something people want to get rid of.
When clicked, the top button is being moved out of the way to make good use of screen real estate, since the debit or credit card button does not open a window. It expands the iframe inside the container (which is actually rather amazing to those of us who've been in the payment industry for a long time.)
If you truly want to get rid of card processing, you can. The Smart Payment Buttons documentation has options for disabling funding sources. Basically add &disable-funding=card after your ClientID when invoking the SDK js:
<script src="https://www.paypal.com/sdk/js?client-id=YOUR_CLIENT_ID&disable-funding=card"></script>

Related

Check Make this a monthly donation on PayPal Donation form by default

The previous PayPal donation checkout form https://www.paypal.com/cgi-bin/webscr appears to have stopped working after years suddenly yesterday and says, "Things don't appear to be working at the moment. Please try again later." When generating a donation form through their tool it now has an updated interface so assume they changed something quietly.
When using the new process I'm able to affectively get the same results (albeit different UI now except that the make monthly button is no longer checked automatically. The user has already selected monthly donation in a previous ui that that redirects them to this page so need the monthly donation checked by default. Can't seem how to to do that. When generating the button it says custom variables supported, and lists one called, _xclick-subscriptions that was used before but anytime that is entered it says not supported.
It sounds like you were previously using a "Subscribe" button, not a "Donate" button. These are separate types of buttons within PayPal.
You can go to https://www.paypal.com/buttons and see if you are allowed to create a "Subscribe" button there. If you do create such a button, the .png file of the image in the generated code can be changed later to point to any image you want on your website -- or PayPal's default "Donate" image, if you prefer.
If you are not allowed to create a "Subscribe" button, then you will just have to use the "Donate" type button. Its recurring checkbox cannot be enabled by default.

PayPal smart buttons, how to always open the credit card in a new tab?

I use PayPal smart buttons for integrating payments into a website, following this live demo
I have two problems with the "Debit or Credit Card" button:
It is not always working, when I click on it, the fields are expanding and shown on the same page (my server) and after entering all the info and click "Pay Now" I get message saying "Something went wrong, we will take you back to checkout so you can try again" when I click on "Try again" button a new tab opens for processing the credit card payment on PayPal server (now it will work).
this happens ~50% of the time.
It is related to the first one, the first view (when fields expanding on my site page) it lacks the address fields however they are shown after clicking "Try again" and go to the PayPal tab.
So my question is, can I unify the way that the credit card payment view is shown? Is there a parameter that I can pass while rendering the buttons that makes it always open in a new tab?
The message "Something went wrong, we will take you back to checkout so you can try again" will happen when there is a decline. As you are apparently testing payments yourself, you can expect many such intentional declines by PayPal. They aren't considered a technical or integration problem, but the system behaving as designed.
There is no way to make the black Debit or Credit Card button open a new window. You can disable it if you don't want it, but you can't make it behave differently.
When there is an error or decline using that Debit or Credit Card path, and you click "Try again", it is the same as using the top PayPal button. That is the fallback path.

PayPal credit card button hides PayPal standard button

We are using PayPal with the default button and with visa and MasterCard buttons. When we click on a credit card button the default PayPal button is hidden. Is there a way to avoid this? We don't want that user has to refresh the page to see again the choice for PayPal payment method.
Thanks
There is no way to avoid it, PayPal is intentionally making use of that screen real estate.
You could allow the user to trigger a .close() of the PayPal button (save a reference to it before you .render()) and so then create a fresh one in its place, if you really want to avoid them having to do a page refresh.

PayPal Buy Now Button - Pre-populate Credit Card

Is there any way to make the Buy Now page open up the credit card form straight away.
Currently it's buried underneath the "pay with paypal" option that hardly any of my customers want to use. They have to click the tab at the bottom right. It's a very very poorly designed page and plays havoc with my conversion rates.
Could I for example pre-populate the credit card details in my buy now button so that the credit card form would come up initially?
With buttons it is not possible as the form is hosted by PayPal. You may want to look into other integration methods at https://developer.paypal.com/docs/api/ where you host the form that holds payment info.
See this for an example
https://developer.paypal.com/docs/api/#create-a-payment

Can I show the momentary payment confirmation with smart buttons?

Can I show the Momentary payment confirmation which described here after payment that has been done using the Smart Payment Buttons Integration?
I have enabled the auto-return option and also added the return URL to the sandbox app but it is still not working.
No, you can't. That page is describing the old behavior that only applies when you do a full page redirect away from your site to PayPal.
If you stay on your site and display the smart experience, you are expected to display your own confirmation once the successful capture triggers within your SPB javascript.