Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This guide references version 1 of the SDK #1

Open
mckinlde opened this issue Nov 30, 2023 · 1 comment
Open

This guide references version 1 of the SDK #1

mckinlde opened this issue Nov 30, 2023 · 1 comment

Comments

@mckinlde
Copy link

This guide integrates version 1 of the SDK; could you refer me to a similar guide for version 2?

On line 79 of the referenced script.js (link 1 below), the urlParam passed to script_to_head() uses a hosted-fields param. The hosted-fields param is used by version 1 of the SDK (link 2), where version 2 of the SDK expects a card-fields. (link 3)

I don't mean to be a pain, but PayPal directly states that new integrations should use SDK version 2. If I built a v1 integration, would it be supported?

  1. https://github.com/paypaldev/PayPal-Advanced-Checkout-Tutorial/blob/main/script.js
  2. https://developer.paypal.com/sdk/js/v1/reference/#link-overview
  3. https://developer.paypal.com/sdk/js/reference/#link-overview
@mrepol742
Copy link

mrepol742 commented Apr 23, 2024

You can use whatever components you liked to in v1 or v2 of the sdk.

There are 4 components supported by both v1 and v2

Buttons is the default component
If you want to support credit/debit card payment u need to use paypal hosted fields.
Marks is use when paypal buttons are presented alongside other funding sources on the page and the PayPal buttons are shown when the buyer selects a radio button.

Its up to use what component u wanna use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants