diff --git a/lib/recurly/paypal/strategy/direct.js b/lib/recurly/paypal/strategy/direct.js index f49596216..d7d2ded4c 100644 --- a/lib/recurly/paypal/strategy/direct.js +++ b/lib/recurly/paypal/strategy/direct.js @@ -12,11 +12,16 @@ export class DirectStrategy extends PayPalStrategy { this.emit('ready'); } - start () { - // TODO: More parameters here + get payload () { let payload = { description: this.config.display.displayName }; if (this.config.display.amount) payload.amount = this.config.display.amount; + if (this.config.display.logoImageUrl) payload.logoImageUrl = this.config.display.logoImageUrl; + if (this.config.display.headerImageUrl) payload.headerImageUrl = this.config.display.headerImageUrl; + return payload; + } + start () { + const { payload } = this; const frame = this.recurly.Frame({ path: '/paypal/start', payload }); frame.once('error', cause => this.error('paypal-tokenize-error', { cause })); frame.once('done', token => this.emit('token', token)); diff --git a/lib/recurly/paypal/strategy/index.js b/lib/recurly/paypal/strategy/index.js index 1b4830e36..b793070ad 100644 --- a/lib/recurly/paypal/strategy/index.js +++ b/lib/recurly/paypal/strategy/index.js @@ -15,7 +15,11 @@ const DISPLAY_OPTIONS = [ 'shippingAddressOverride', 'shippingAddressEditable', 'billingAgreementDescription', - 'landingPageType' + 'landingPageType', + + // Not compatible with Braintree options due to lack of support + 'logoImageUrl', + 'headerImageUrl' ]; const DEFAULTS = { display: {