Paypal Button on AMP-HTML page - paypal

Is there a way of including a PayPal "Buy Button" in an AMP-HTML page?
The PayPal button requires external script, so the page won't validate. Is there a workaround?
Thanks
Ales

PayPal has a series of HTML button examples which don't need a script that you can use. As they rely on forms you may need to also pair it with the amp-form component to get them to pass validation.

Yes, you can use the html buttons of paypal don't work while the "pay now" button image cannot display
You need to add this code in header:
body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}#-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}#-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}#-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}#-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}#keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}
Also you need to import amp-iframe script
You can see here the details about this problem:
https://wordpress.stackexchange.com/questions/367201/amp-and-paypal-form-cors-issue?newreg=fc62243f85a2428fb9e0d2f4e6d03233
You can see here my code example: https://www.dropbox.com/s/q0qlsab4934es3z/paypal.html?dl=0

Related

PayPal button label missing on "submit-button" button

The submit button on my website is blank. It contains no label. Do you know if this is a bug or is there a setting somewhere in paypal? I really searched everywhere, but I could not find it.
This is how it looks like on my website:
And the same happens when I try to setup style on paypal website:
This is the html for this button:
<button id="submit-button" type="button" class="css-sh6tmc eshn35a0" style="margin-bottom: 18px; margin-top: 18px;"></button>
So it's not a problem with CSS but no value is passed. Any ideas? I'm using WooCommerce PayPal checkout plugin, but I don't think it's an issue with the plugin, because the same thing happens on the PayPal website.
This is a PayPal bug affecting all European countries at the moment; seems to be missing translation text for that button.
Anyone can reproduce the issue directly at the integration Demo, clicking the black button and selecting the flag of a European country.
Update: I've been told this will be fixed in PayPal's next release of the component, whenever that happens

How to disable stripe form field when payment process is running?

I am implementing stripe payment feature in my angular project. I am succeed with stripe form customization.
My Actual problem is start here. When User enter Card Detail and press PAY button. loader is spin inside pay button. But Still user can change card number and other details.
I want to disable all form field when stripe payment process is executing. I did try a lot for search solution but failed to get single solution.
Is there Any way To disable form field when payment process is executing ?
In your form submit handler, or the click handler of the submit button, it's common to disable both the submit button and the card element so that users don't change the card details.
You can disable the Stripe Element using the update method on the element [1] and passing disabled: true.
card.update({ disabled: true });
Here is a JS Fiddle to demonstrate: https://jsfiddle.net/utdz6pkr/1/
[1] https://stripe.com/docs/js/element/other_methods/update?type=card#element_update-options-disabled

Created a custom styled PayPal checkout button on Shopify, but I was previously told this wasn't possible

As the subject states, I created a PayPal Checkout button by simply adding the HTML code for the button and modified the text and remove the PayPal logo image.
Normally the code below would be used to generate the button, which of course is limiting:
{{ content_for_additional_checkout_buttons }}
However, I have instead added this HTML in its stead:
<div class="paypal-checkout-button">
<button name="goto_pp" type="submit" id="paypal-express-button" class="additional-checkout-button additional-checkout-button--paypal-express" value="paypal_express">
CHECKOUT WITH PAYPAL
</button>
</div>
The button's functionality is perfectly fine; I even processed a test payment through it. A developer friend of mine told me it wasn't possible without some hacky solution; however, the simple HTML snippet above seems to be a perfect solution to customizing the PayPal button on the cart / product page.
Am I missing anything? Or is this perfectly fine to do?
Appreciate any you can provide on the matter.
It's not the button on the cart that Shopify people have issues/problems with.
It's the button on the checkout and that can't be modified (without a lot of hassle) unless the store owner has a Plus account. That is almost certainly what your developer friend is talking about.
Not to mention, of course, that changing the appearance of the button or forcing it not to appear before the Shopify checkout process is a violation of the PayPal express user agreement.

PayPal Custom payment pages no longer working

I have a checkout system that has been in place over 5 years. I have another checkout system been in place over 2 years. Both have not changed.
I can also confirm when I demo the custom payment pages through my account it all works.
However when people go through checkout on my site, when they see the new PayPal checkout system, there is no logo at the top and my business name is showing up in text at the top.
I have confirmed that the logo works fine and is hosted on HTTPS.
I contacted PayPal business support and this is the response I got:
Hi **** Unfortunately, this is the intended behavior. New layout did
not support page style parameter. I apologise for the inconvenience
caused. Sincerely, Anis Merchant Technical Support PayPal
Can anyone else confirm that PayPal is fazing out custom payment pages? I think this guy is drinking kool aid and like most bad support individuals is providing me incorrect information. However I have been unable to get this idiot to escalate it and get me a real answer.
Especially since I've seen other checkout pages work with a logo at the top.
Any assistance would be appreciated.
Yes, looks like page_style currently does not work in the new checkout page. As a work-around you can use image_url parameter to set your image logo in the checkout page.
PayPal deprecated the page_style variable in September 2016, as well as the cpp_logo_image. The full list of deprecated variables is available here: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/#deprecated-variables
As user Vimalnath mentionned, you can (still) use the image_url parameter:
<input type="hidden" name="image_url" value="https://example.com/myImage.png" />
The recommended dimensions of images changed. Whilst the maximal size for image_url was 750 x 90 as a banner, the recommended size is (in February 2018) : 150 x 50 px. PayPal now consider the image_url as a logo to display in the upper left corner.
I can see that a banner of 750 x 90 is still working on the payment page and will display as a header. Maybe with a smaller logo would PayPal use another layout. I also have not test yet how does a large banner display after the payment was done.

Generating a dynamic Buy Now button

I am currently speccing out a custom auction plugin for WordPress. One thing I would like to do for each item is to generate a dynamic Buy Now link that will redirect to a PayPal screen with the item name and final price.
From what I can see, the only way to generate one of these buttons is to go to the form that generates the buttons for you. Is there a js file that I can use to generate these buttons from a Wordpress admin area? If so, can someone please provide a link so that I can begin reading up on the documentation?
Thank you
There are several examples of how to create a "pay now" button on stackoverflow (with simple HTML form). I would rather not use the "insecure" forms.
For including it in Wordpress you need to create a PHP Script (Plugin) that creates you the button, either with a library or "by hand".
The second thing I would recommend is to give PayPal an URL they should call after a payment status change (IPN). Some libraries (as the one above) can help you with that.