Last active
September 21, 2018 14:49
-
-
Save Komock/91097c803a0dcef336820e71239ff4df to your computer and use it in GitHub Desktop.
some
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private handleConfirmationSuccess(methodId: string) { | |
this.paymentsService.pollPaymentMethodCreated(methodId).pipe( | |
mergeMap(methodId => this.paymentsService.setDefaultPaymentMethod(methodId)), | |
mergeMap(methodId => forkJoin(of(methodId), this.paymentsService.fetchPaymentMethods())), | |
tap((data) => { | |
const id = data[0]; | |
this.paymentsService.paymentMethods.defaultMethod = this.paymentsService.paymentMethods.getPaymentMethod(id); | |
this.routerDataStorage.set({ paymentMethodCreated: PaymentGatewayTypes.CARD }); | |
this.router.navigate(['../../../'], { | |
relativeTo: this.route, | |
replaceUrl: true, | |
}); | |
}) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment