mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-10 18:26:47 +08:00
Run eslint autofix
This commit is contained in:
parent
36a13f6500
commit
11105d913b
141 changed files with 14160 additions and 11825 deletions
|
@ -1,42 +1,42 @@
|
|||
|
||||
class Fastlane {
|
||||
construct() {
|
||||
this.connection = null;
|
||||
this.identity = null;
|
||||
this.profile = null;
|
||||
this.FastlaneCardComponent = null;
|
||||
this.FastlanePaymentComponent = null;
|
||||
this.FastlaneWatermarkComponent = null;
|
||||
}
|
||||
|
||||
construct() {
|
||||
this.connection = null;
|
||||
this.identity = null;
|
||||
this.profile = null;
|
||||
this.FastlaneCardComponent = null;
|
||||
this.FastlanePaymentComponent = null;
|
||||
this.FastlaneWatermarkComponent = null;
|
||||
}
|
||||
connect( config ) {
|
||||
return new Promise( ( resolve, reject ) => {
|
||||
window.paypal
|
||||
.Fastlane( config )
|
||||
.then( ( result ) => {
|
||||
this.init( result );
|
||||
resolve();
|
||||
} )
|
||||
.catch( ( error ) => {
|
||||
console.error( error );
|
||||
reject();
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
||||
connect(config) {
|
||||
return new Promise((resolve, reject) => {
|
||||
window.paypal.Fastlane(config)
|
||||
.then((result) => {
|
||||
this.init(result);
|
||||
resolve();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error)
|
||||
reject();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
init(connection) {
|
||||
this.connection = connection;
|
||||
this.identity = this.connection.identity;
|
||||
this.profile = this.connection.profile;
|
||||
this.FastlaneCardComponent = this.connection.FastlaneCardComponent;
|
||||
this.FastlanePaymentComponent = this.connection.FastlanePaymentComponent;
|
||||
this.FastlaneWatermarkComponent = this.connection.FastlaneWatermarkComponent
|
||||
}
|
||||
|
||||
setLocale(locale) {
|
||||
this.connection.setLocale(locale);
|
||||
}
|
||||
init( connection ) {
|
||||
this.connection = connection;
|
||||
this.identity = this.connection.identity;
|
||||
this.profile = this.connection.profile;
|
||||
this.FastlaneCardComponent = this.connection.FastlaneCardComponent;
|
||||
this.FastlanePaymentComponent =
|
||||
this.connection.FastlanePaymentComponent;
|
||||
this.FastlaneWatermarkComponent =
|
||||
this.connection.FastlaneWatermarkComponent;
|
||||
}
|
||||
|
||||
setLocale( locale ) {
|
||||
this.connection.setLocale( locale );
|
||||
}
|
||||
}
|
||||
|
||||
export default Fastlane;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue