Closed mcdado closed 1 month ago
I enabled the first option below in the Sandbox app but it still doesn't work.
Hi @mcdado, I faced same issue in my project. Have you found any solution?
I did, but sincerely I don't know how or why. I remember trying again the next day and it now worked.
Same here, tried everything and still does not works.
Hint: PayPalButtons does renders, PayPalCardFields does not.
I enabled the first option below in the Sandbox app but it still doesn't work.
When we recently went to production with our integration, I had to enable then option Advanced Credit and Debit Card Payments in the Live environment as well. It then took a day for it to actually start working โ by itself.
The library should have a better error message when the option is not enabled and you try to render PayPalCardFieldsProvider
with React and the PayPalCardFieldsComponent
created by the plain JS paypal.CardFields()
Library used
react-paypal-js
๐ Describe the Bug
I'm trying to use the
PayPalCardFieldsProvider
andPayPalCardFieldsForm
to have more control than simply usingPayPalButtons
. I don't want to collect the billing and shipping information in the checkout component, because when a user signs up, they already provide all the information ahead of time and this information is available in the shopping cart. This is the main problem I have with PayPalButtons, I found no way to disable the billing address form when selecting Credit/debit card in the checkout. While PayPalButtons works in so far as rendering the checkout options, the CardFields component doesn't: it renders an empty<div>
:๐ฌ Minimal Reproduction
I'm writing a Next.js app, here is the client component that should render the checkout section below the shopping cart. My goal is to show both the PayPal button, optionally processors like MyBank and Giropay, but also credit card.
๐ Actual Behavior
When using PayPalCardFieldsProvider and PayPalCardFieldsForm, the Checkout form is not rendered (see below). I tried using
PayPalCardFieldsForm
and the individual form fields (PayPalNameField
,PayPalNumberField
, ...) but the result is the same.๐ค Expected Behavior
The Checkout form should be rendered.
๐ Environment
โ Additional Context
โโโ @paypal/paypal-js@8.1.0 โโโ @paypal/react-paypal-js@8.5.0 โโโ next@14.1.1 โโโ react@18.2.0