fix(client): prevent PayPal script loads in development (#38785)

This commit is contained in:
Rostyslav Ugryniuk
2020-05-12 15:34:24 +03:00
committed by GitHub
parent c0905959a0
commit 88b263fef8
2 changed files with 8 additions and 3 deletions

View File

@@ -76,10 +76,15 @@ export class PaypalButton extends Component {
render() {
const { duration, planId, amount } = this.state;
const isSubscription = duration !== 'onetime';
if (!paypalClientId) {
return null;
}
return (
<PayPalButtonScriptLoader
amount={amount}
clinetId={paypalClientId}
clientId={paypalClientId}
createOrder={(data, actions) => {
return actions.order.create({
purchase_units: [