diff --git a/client/src/components/Donation/PayPalButtonScriptLoader.js b/client/src/components/Donation/PayPalButtonScriptLoader.js index b333b9df15..c476552c51 100644 --- a/client/src/components/Donation/PayPalButtonScriptLoader.js +++ b/client/src/components/Donation/PayPalButtonScriptLoader.js @@ -42,14 +42,20 @@ export class PayPalButtonScriptLoader extends Component { 'paypal-sdk', true, `https://www.paypal.com/sdk/js${queries}`, - this.OnScriptLoad + this.onScriptLoad ); } - OnScriptLoad = () => { + onScriptLoad = () => { this.setState({ isSdkLoaded: true }); }; + captureOneTimePayment(data, actions) { + return actions.order.capture().then(details => { + return this.props.onApprove(details, data); + }); + } + render() { const { isSdkLoaded, isSubscription } = this.state; const { @@ -72,7 +78,11 @@ export class PayPalButtonScriptLoader extends Component {