Skip to content

Commit c6bcd0d

Browse files
author
Your Name
committed
Stripe In Practice Course
1 parent a125257 commit c6bcd0d

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/app/services/checkout.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {CheckoutSession} from '../model/checkout-session.model';
55
import {AngularFireAuth} from '@angular/fire/auth';
66
import {AngularFirestore} from '@angular/fire/firestore';
77
import {filter, first} from 'rxjs/operators';
8+
import {environment} from '../../environments/environment';
89

910
declare const Stripe;
1011

@@ -28,7 +29,7 @@ export class CheckoutService {
2829

2930
const headers = new HttpHeaders().set("Authorization", this.jwtAuth);
3031

31-
return this.http.post<CheckoutSession>("/api/checkout", {
32+
return this.http.post<CheckoutSession>(environment.api.baseUrl + "/api/checkout", {
3233
courseId,
3334
callbackUrl: this.buildCallbackUrl()
3435
}, {headers})
@@ -38,7 +39,7 @@ export class CheckoutService {
3839

3940
const headers = new HttpHeaders().set("Authorization", this.jwtAuth);
4041

41-
return this.http.post<CheckoutSession>("/api/checkout", {
42+
return this.http.post<CheckoutSession>(environment.api.baseUrl + "/api/checkout", {
4243
pricingPlanId,
4344
callbackUrl: this.buildCallbackUrl()
4445
}, {headers})

src/environments/environment.prod.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
export const environment = {
22
production: true,
33
firebase: {
4-
4+
apiKey: "AIzaSyBC9AIbgFfJQPKHBgGg7xULHNWjlnW-3vs",
5+
authDomain: "stripe-course-recording.firebaseapp.com",
6+
databaseURL: "https://stripe-course-recording.firebaseio.com",
7+
projectId: "stripe-course-recording",
8+
storageBucket: "stripe-course-recording.appspot.com",
9+
messagingSenderId: "909700347297",
10+
appId: "1:909700347297:web:0e9e7105baf123acdd87e0"
511
},
612
api: {
7-
baseUrl: ""
13+
baseUrl: "https://stripe-course-recording.appspot.com"
814
}
915
};

0 commit comments

Comments
 (0)