paypal / paypal-js

Loading wrapper and TypeScript types for the PayPal JS SDK
Apache License 2.0
227 stars 75 forks source link

[BUG]: The Venmo button that is supposed to be rendered as part of the PayPal SDK is not visible on iPhones when rendered inside of an iframe #510

Open kyleknaggs opened 1 year ago

kyleknaggs commented 1 year ago

Is there an existing issue for this?

🐞 Describe the Bug

There is an issue with the Venmo button that is part of the PayPal SDK is not rendering when viewed on an iPhone using Safari if the PayPal SDK is presented within an <iframe/>.

As part of our integration with the new PayPal API, we have added functionality for our clients to make payments using both PayPal and Venmo across our suite of products using the react-paypal-js library. However one of the issues that we have run into is that the Venmo button that is part of the PayPal SDK is not rendering as expected when the webpage with the Venmo button is viewed on iOS device that has the Venmo app installed using Safari. We have since spoken to contacts within PayPal who let us know that this is because our product renders the Venmo button inside of an <iframe/>. However, our product is a web application that enables non-profits to raise funds by allowing them to embed our donation form on their own websites. This means that the ability for the Venmo button to render within an <iframe/> on iOS devices is critical to our ability to accept payments using Venmo.

From what I can tell from the official Pay with Venmo documentation, in order for the Venmo button to be displayed by the PayPal SDK the following requirements must be met:

  1. It must be used for a one time payment. (Not an ongoing/recurring transaction)
  2. In order to see the Venmo button while on a mobile device:
    • Users must have the Venmo app installed on their device.
    • iOS users must use Safari as their browser.
    • Android users must use Chrome as their browser.
  3. The payment that is being made must be thorough a US merchant.
  4. The user who is viewing the interface where the Venmo button is displayed must be located within the US.

I wanted to bring this up this as there is no mention here about restrictions related to the Venmo when it is rendered within an <iframe/>.

😕 Current Behavior

  1. Use Safari to visit the following URL https://secure.qgiv.com/for/safnes on an iPhone that has Venmo installed.
  2. Select a one time donation amount and scroll down to the bottom of the Choose Gift step.

Current Behaviour: At this point only the PayPal button is visible. Screenshot: https://d.pr/i/zALoiM

Note: If you visit the URL of the <iframe/> that is embedded on this page directly (https://secure.qgiv.com/for/safnes/embed) you will see that the Venmo button is now rendered. You can see the screenshot for what this looks like here: https://d.pr/i/xGKSwq

🤔 Expected Behavior

  1. Use Safari to visit the following URL https://secure.qgiv.com/for/safnes on an iPhone that has Venmo installed.
  2. Select a one time donation amount and scroll down to the bottom of the Choose Gift step.

Expected Behaviour: The PayPal and the Venmo buttons should be present. Screenshot: https://d.pr/i/xGKSwq (Taken when the <iframe/> is viewed directly)

🔬 Minimal Reproduction

1. Use Safari to visit the following URL https://secure.qgiv.com/for/safnes on an iPhone that has Venmo installed.
2. Select a one time donation amount and scroll down to the bottom of the Choose Gift step.

**Actual Behaviour: Only the PayPal button is visible.**

🌍 Environment

| Software         | Version(s)                   |
| ---------------- | -----------------------------|
| react-paypal-js  | ^7.8.1                       |
| Browser          | Safari 16.3.1. (Tied to iOS) |
| Operating System | iOS 16.3.1                   |

Relevant log output

No relevant logs were noted in the output of the device.

Code of Conduct

➕ Anything else?

I think it is worth noting that up until this point we have found the “smart logic” that is responsible for whether or not the Venmo button appears to be extremely unreliable up until this point. There were a couple days last week when the Venmo button simply disappeared on the same webpage that I linked to up above in spite of the fact that the PayPal merchant account information had not changed and no code changes had been pushed to production (it was between pushes that we noticed that it disappeared before suddenly reappearing a couple days later) when viewed on the same browser using the same device in the same location. In addition to that we noticed that the button suddenly disappeared when we were experimenting with the onShippingChange handler that is part of the PayPal SDK in spite of the documentation never mentioning that implementing this handler will suddenly disable the Venmo button completely.

All of this has been extremely frustrating as we have clients who would love to make use of Venmo when processing payments, however we have been unable to give them accurate information on when & how they can expect the Venmo button display because of the general flakiness of the Venmo API.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

chrismorata commented 1 year ago

Bump

JoeSRocha commented 1 year ago

Bump

BDKSoftware commented 1 year ago

Bump

kyleknaggs commented 1 year ago

Bump

@chrismorata and @JoeSRocha I've updated the title & description of this issue to reflect our most recent findings/conversations with PayPal about the problem that we ran into on our product now that we have more information than we did before.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

chrismorata commented 1 year ago

Bump

adunnCT commented 1 year ago

Bump

I am having this same issue; although, both the Venmo and PayPal buttons render on Safari for iOS, but NOT for Firefox or Chrome iOS

devchristina commented 1 year ago

Hi all, apologies in the delay of any acknowledgement / follow up on this issue. I'll check with the team and see what we can do to help here.

github-actions[bot] commented 11 months ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

chrismorata commented 10 months ago

Bump

chrismorata commented 10 months ago

@devchristina Were there any updates you are able to provide?

github-actions[bot] commented 7 months ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

chrismorata commented 7 months ago

Bump

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

chrismorata commented 6 months ago

Bump

romeritoCL commented 5 months ago

There an update on the Braintree documentation regarding Venmo: https://developer.paypal.com/braintree/docs/guides/venmo/overview

Venmo does not work when loaded within an iframe element.

Probably not the expected outcome, but at least it tells us what not to do.

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

wsbrunson commented 3 months ago

Bump.

The PayPal team should have an update about this soon. Hopefully by the end of this week or next week.

wsbrunson commented 3 months ago

Two updates:

Venmo issue

I spoke too soon, PayPal is not ready to make an announcement yet. I can let you all know what's planned though. The Venmo team has been working on a web checkout experience much like what PayPal already has for checkout. Once the Venmo team has finished, Venmo should be available when rendered inside an iframe. App-switching will still be supported but when on desktop or when we can not app switch, we will render the web experience.

One caveat: it will not work when rendered inside of a Mobile WebView. I believe this is already the case today but this experience will still not be supported because of restrictions we have with rendering our checkout experience in a WebView.

Repo Moving

We have moved this repository to our paypal-js monorepo: https://github.com/paypal/paypal-js

I would suggest opening this issue again here: https://github.com/paypal/paypal-js/issues so we can continue to track it and provide updates as the Venmo team finishes development. We are going to archive this repo at the end of the day which will turn off Issues activity.

I don't have a lot of experience with GitHub Issues, apparently you can transfer them to a different repo which is what I did!

Thank you all for your patience, I know this has been a long-running issue.

Janving commented 2 months ago

I am also facing a iframe issue.