Custom BTCPay donation integration

fixes #122
This commit is contained in:
softsimon
2020-10-07 20:15:42 +07:00
parent 96b3419227
commit 5859f4ff9b
14 changed files with 359 additions and 15 deletions

View File

@@ -61,4 +61,16 @@ export class ApiService {
});
return this.httpClient.get<number[]>(this.apiBaseUrl + '/transaction-times', { params });
}
requestDonation$(amount: number, orderId: string): Observable<any> {
const params = {
amount: amount,
orderId: orderId,
};
return this.httpClient.post<any>(this.apiBaseUrl + '/donations', params);
}
getDonation$(): Observable<any[]> {
return this.httpClient.get<any[]>(this.apiBaseUrl + '/donations');
}
}