feat: make stripe functional
This commit is contained in:
parent
177dd78592
commit
1d0162d250
6 changed files with 56 additions and 56 deletions
15
frontend/src/app/service/deposit.service.ts
Normal file
15
frontend/src/app/service/deposit.service.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { inject, Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class DepositService {
|
||||
private http: HttpClient = inject(HttpClient);
|
||||
|
||||
handleDeposit(amount: number): Observable<{ sessionId: string }> {
|
||||
return this.http.post<{sessionId: string}>('/backend/deposit/checkout', {amount});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue