Sha256: ac4d4e66acdef3aabcb6fdea0c05369d2dd453d8ba4e0eec8b1ec657f0b77147

Contents?: true

Size: 661 Bytes

Versions: 1

Compression:

Stored size: 661 Bytes

Contents

//= require solidus_braintree/constants

SolidusBraintree.PaypalMessaging = function(paypalOptions) {
  this._paypalOptions = paypalOptions || {};

  this._client = null;
};

SolidusBraintree.PaypalMessaging.prototype.initialize = function() {
  this._client = new SolidusBraintree.createClient({usePaypal: true});

  return this._client.initialize().then(this.initializeCallback.bind(this));
};

SolidusBraintree.PaypalMessaging.prototype.initializeCallback = function() {
  this._paymentMethodId = this._client.paymentMethodId;

  this._client.getPaypalInstance().loadPayPalSDK({
    currency: this._paypalOptions.currency,
    components: "messages"
  })
};

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_braintree-2.0.0 app/assets/javascripts/solidus_braintree/paypal_messaging.js