1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

org billing settings setup

This commit is contained in:
Kyle Spearrin
2018-07-16 17:17:07 -04:00
parent 786f6953e7
commit 0650cafb28
17 changed files with 501 additions and 26 deletions

View File

@@ -26,7 +26,7 @@ export class AdjustPaymentComponent {
@ViewChild(PaymentComponent) paymentComponent: PaymentComponent;
@Input() currentType?: PaymentMethodType;
@Input() user = true;
@Input() organizationId: string;
@Output() onAdjusted = new EventEmitter();
@Output() onCanceled = new EventEmitter();
@@ -41,8 +41,10 @@ export class AdjustPaymentComponent {
const request = new PaymentRequest();
this.formPromise = this.paymentComponent.createPaymentToken().then((token) => {
request.paymentToken = token;
if (this.user) {
if (this.organizationId == null) {
return this.apiService.postAccountPayment(request);
} else {
return this.apiService.postOrganizationPayment(this.organizationId, request);
}
});
await this.formPromise;