Unverified Commit c9bc7fc7 authored by Alish's avatar Alish Committed by GitHub
Browse files

Merge pull request #1072 from ever-co/fix/pay-with-stripe

Fix/pay with stripe
parents bac66c93 857eacde
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -222,8 +222,10 @@ export class UsersService extends DBService<User>

		if (user != null) {
			if (user.stripeCustomerId != null) {
				return (await stripe.customers.listCards(user.stripeCustomerId))
					.data;
				return (await stripe.customers.listSources(
					user.stripeCustomerId,
					{ object: 'card' }
				)).data;
			} else {
				return [];
			}
+2 −2
Original line number Diff line number Diff line
@@ -61,9 +61,9 @@ export class OrderRouter implements IOrderRouter {

	async payWithStripe(orderId: string, cardId: string): Promise<Order> {
		const order = await this.router.run<IOrder>(
			'updateWarehouseStatus',
			'payWithStripe',
			orderId,
			status
			cardId
		);
		return this._orderFactory(order);
	}
+1 −1
Original line number Diff line number Diff line
<span class="all {{ smallButtons ? 'small-buttons' : '' }}">
	<span class="actions">
		<button
			*ngIf="!order?.isPaid"
			*ngIf="!order?.isPaid && !userCard"
			class="button button-assertive border-color-brand col-100"
			(click)="toPaymentStage()"
		>