Skip to content

Commit 1f8d521

Browse files
Lec40
1 parent c43ee3d commit 1f8d521

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@angular/platform-browser": "4.0.0",
2020
"@angular/platform-browser-dynamic": "4.0.0",
2121
"@ionic-native/core": "3.4.2",
22+
"@ionic-native/paypal": "^3.5.0",
2223
"@ionic-native/splash-screen": "3.4.2",
2324
"@ionic-native/status-bar": "3.4.2",
2425
"@ionic/storage": "2.0.1",

src/app/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { Signup } from '../pages/signup/signup';
1515
import { Login } from '../pages/login/login';
1616
import { Checkout } from '../pages/checkout/checkout';
1717
import { HttpModule } from '@angular/http';
18+
import { PayPal } from '@ionic-native/paypal';
1819

1920
import { IonicStorageModule } from '@ionic/storage';
2021

@@ -51,6 +52,7 @@ import { IonicStorageModule } from '@ionic/storage';
5152
providers: [
5253
StatusBar,
5354
SplashScreen,
55+
PayPal,
5456
{provide: ErrorHandler, useClass: IonicErrorHandler}
5557
]
5658
})

src/pages/checkout/checkout.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { NavController, NavParams, AlertController } from 'ionic-angular';
33
import { Storage } from '@ionic/storage';
44
import * as WC from 'woocommerce-api';
55
import { HomePage } from '../home/home';
6+
import { PayPal, PayPalPayment, PayPalConfiguration } from '@ionic-native/paypal';
67

78
@Component({
89
selector: 'page-checkout',
@@ -17,7 +18,7 @@ export class Checkout {
1718
billing_shipping_same: boolean;
1819
userInfo: any;
1920

20-
constructor(public navCtrl: NavController, public navParams: NavParams, public storage: Storage, public alertCtrl: AlertController) {
21+
constructor(public navCtrl: NavController, public navParams: NavParams, public storage: Storage, public alertCtrl: AlertController, public paypal: PayPal) {
2122
this.newOrder = {};
2223
this.newOrder.billing_address = {};
2324
this.newOrder.shipping_address = {};

0 commit comments

Comments
 (0)