Sha256: 8cf2622d77661579b625a20ce6e19b69974eb1cbe1c3a49f6a0e1adbcd5a5031

Contents?: true

Size: 676 Bytes

Versions: 5

Compression:

Stored size: 676 Bytes

Contents

//= require spree/frontend/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

5 entries across 5 versions & 1 rubygems

Version Path
solidus_braintree-3.3.0 lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/paypal_messaging.js
solidus_braintree-3.2.0 lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/paypal_messaging.js
solidus_braintree-3.1.0 lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/paypal_messaging.js
solidus_braintree-3.0.1 lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/paypal_messaging.js
solidus_braintree-3.0.0 lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/paypal_messaging.js