Open pwhipp opened 6 years ago
Have you tried using
style={
size: 'small',
color: 'gold',
shape: 'pill',
label: 'checkout: Just $2.99!'}
Because this style
props is an object with keys defined by Paypal
Please check the docs: https://developer.paypal.com/docs/checkout/quick-start/ (the style
part as their old docs link was kind of removed..)
The issue is the value of the label property in your example. That property doesn't accept free text, it's actually a predefined enum (e.g. paypal, checkout). See docs.
This works fine:
<PaypalExpressBtn
env={env}
client={client}
currency={currency}
total={props.total}
onError={onError}
onSuccess={onSuccess}
onCancel={onCancel}
style={{
size: 'large',
color: 'gold',
label: 'paypal',
shape: 'rect'
}} />
If style parameter is used e.g:
An error occurs during rendering: