PayPal Popup Disappears on Checkout - paypal

I'm about to create a PayPal payment gateway for donations on my website, it goes fine with the sandbox account, but when I turn to the live mode, it does not end well.
The PayPal check-out window pop and disappear immediately in a live mode before even showing anything in that window. The only thing I changed on the live mode is the post URL which I replaced "api-m.sandbox." with "api-m." behind this "paypal.com"

The only thing I changed on the live mode is the post URL which I replaced "api-m.sandbox." with "api-m." behind this "paypal.com"
You also need to use a live client id an secret from the developer dashboard Apps and Credentials, and the JS SDK must have the same live client id for its src when loaded.
As an aside (since this is for donations) consider the simpler donate SDK which does not use API calls, and offers a payment experience more tailored for this.
If you do stick with the main JS SDK for some reason, style: { label: "donate" } can be used in the button initialization to add that text to the button, if desired.
paypal.Buttons({
style: { label: "donate" },

Related

PayPal Payment COMPLETE on a static HTML/JS website with no server backend. How to render a completed payment page?

I am building a static website using only JS HTML CSS and a touch of JQuery. I have a PayPal button that works in the PayPal sandbox and charges my mock user but I can't figure out how to change anything after payment is complete.
I would like the page to redirect to a payment complete page with the order details. Is it as simple as setting up the SANDBOX APP SETTINGS URL and custom building a page with that URL?
I'll assume you are using something like this client-side integration.
Inside the onApprove function, in the .then() of you actions.order.capture, you can use actions.redirect('otherPage.html')
Alternatively, rather than redirecting and for more of a single page application feel you can rewrite the DOM and replace the contents of <body> or your main container div using jQuery.
$('body').html('<h2>Thanks for your order!</h2>');

Facebook MessengerExtensions in Browser?

Attempting to load the Facebook MessengerExtensions appears not to work when using the in-browser experience for Facebook messenger (as opposed to the native apps on iOS or Android). When I interact with my bot's persistent menu to open a webview (that is trying to use MessengerExtensions), I get this error in the browser console of a newly opened tab:
Messenger Extensions are not enabled - could be "messenger_extensions" was not set on a url, the domain was not whitelisted or this is an outdated version of Messenger client
I have the impression that MessengerExtensions is simply not supported for the in-browser experience but have a couple of questions:
Can someone find where in the docs this lack of support is stated (because I've obviously missed it if it's there...)?
If this is supported somehow, suggestions for what I might be doing wrong? (I have confirmed that my persistent menu button has messenger_extensions: true and my web_url is whitelisted...)
Is there some kind of workaround (not using MessengerExtensions) for the webview opened in the browser to get the page-scoped user Id (PSUID) for the user interacting with the bot?
For a button generated with the Send API I could conceivably append the PSUID to the URL being opened as a query param (not sure of security considerations on that)
For the persistent menu the web_url of the button action is NOT dynamic (it's configured ahead of time) so I'm unsure how this URL when opened from the browser-based messenger interface is supposed to figure out what user opened it. Thoughts/Ideas?
I've just tried it on the chrome with facebook api version 2.10, and it works. When I clicked on the button, I got a "lightbox" looking window that opened on top of the messenger, and all the proper callbacks are called in javascript.
this is my button json:
{
type: 'web_url',
title: <title>,
url: <url>,
messenger_extensions: true,
fallback_url: <url>,
webview_height_ratio: 'tall'
}
these are a few things that I did:
the button spec should contain messenger_extensions: true
facebook whitelisted_domains doesn't do subdomains, so make sure you whitelist the entire url before the parameters.
fallback_url should be whitelisted as well.

"Create Paypal button" interface

When I try to create / modify a "Paypal button", I always arrive on a page that:
Looks the same as 10 years ago
Recommends to use "Internet Explorer 7 (!), Firefox 3 or Safari 4" for best results
In this button creation page, I cannot find how to choose the style among the "Custom payment page styles" created in this page: https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-page-styles. What is this page useful for, then, if we cannot use them when creating a button?
Did I miss a new interface somewhere (URL?) for button creation or is this very old interface still up to date?
The button creation page, which you are seeing is valid and it still appears the same.
However, the customization of the checkout page is no longer available through the Custom Payment pages( This feature is deprecated).
You may still add a logo, but that has to be done through coding. You will need to add the variable "image_url" with the value of the logo URL. For Express Checkout payments, you may use LOGOIMG .
For more details, kindly refer to this link: https://developer.paypal.com/docs/classic/admin/checkout-settings/#customizing-paypal-checkout-pages.

Facebook messenger checkbox plugin is hidden (already checked other answers)

I have the same problem like asked here: Facebook messenger checkbox plugin is hidden
I tried the implementation of the Facebook Checkbox Plugin according to Facebooks documentation but it won't show on my VM in my Company.
The Facebook SDK Implementation works fine, I tried the "Share" and "Like"-Button, which show up correct.
I have a Facbook Page which has public access and a Messenger APP in DEV-mode. The "Send-API" from Facebook works correct too: I am able to send message to myself as administrator from my Webpage on my development VM.
Following Steps are done: use a random user_ref on every request, set my page on the whitelist, use "https", visit my page FB-loggedIN and FB-loggedOut
But the result ends in Markup and Log-Infos like this screen:
See FF DeveloperTools Markup Screenshot for current state
According to this I visited a page given as origin where the Plugin should work (see first link in my question) - but there the plugins' HTML is the same like mine.
So is there a general problem on Facebooks' site or is there quite more necessary, to get this plugin running? Could it be a problem with self-signed certificate on my VM?
At the moment I don't want to notify or login any user. All I want is that the checkbox is shown.
Pherhaps anyone has an idea or the same experiences :)
Additional Info: the console shows following message
fb:messenger_checkbox failed to resize in 45s
after some fiddling we found out that a registered webhook is required (even if you dont consume the events) to make the messenger checkbox plugin render properly.

X-Cart checkout is empty

I have problem with my x-cart website. When I click on "Buy Now" button on one product, and after that I click on "My Cart" which is the checkout section, it returns that my cart is empty although I already click to buy product.
Here is my website: http://www.farlin-cambodia.com/home.php?cat=591
How can I fix it?
The store you're referring to is of version 4.1.6, that's an old version where there were no adding to cart without redirect (with ajax). The behaviour in question is still there, thus the feature is added as a custom mode.
If JS is enabled in the browser, and if the store considers that it's enabled, the JS script is supposed to send some data to script minicart_content.php, and the php script is to process the received data further. However it doesn't happen, and there are no JS errors, which makes me believe that the problem is in the code of minicart_content.php, with this file is very likely being modified too.
If JS is disabled in the browser ( and if you click the corresponding button in the store in the pink side menu block - "If Javascript is disabled in your browser click here"), this custom scenario is not applied, so the store uses the default functionality which allows to add the products to cart with out problems.
Thus, the possible solution is:
roll back the custom changes you implemented, and use default functionality (adding products to cart with a redirect to cart page)
or
check the minicart_content.php script and find out, why it doesn't want to properly process the data sent by JS script
If you're not sure how to achieve this, consider contacting X-Cart support team for further investigation. Not sure if I can give a link to X-Cart support here, but I'm sure you'll easily find it, if only try to search=)