wire checkout pay to selected payment method
This commit is contained in:
@@ -41,7 +41,7 @@ export class StorefrontCheckoutController {
|
||||
|
||||
@Post('shop/checkout/pay')
|
||||
@Throttle(throttleProfiles.checkoutPay)
|
||||
async pay(@Req() req: Request, @Res() res: Response, @Body() { captcha }: PayCheckoutDto): Promise<void> {
|
||||
async pay(@Req() req: Request, @Res() res: Response, @Body() { captcha, paymentMethod }: PayCheckoutDto): Promise<void> {
|
||||
const sessionId = this.checkoutSessionCookieService.getSessionId(req, res);
|
||||
|
||||
if (sessionId) {
|
||||
@@ -64,7 +64,7 @@ export class StorefrontCheckoutController {
|
||||
|
||||
const summary = await this.cartService.getCartSummary(cart, discountCodes);
|
||||
|
||||
const session = await this.checkoutSessionService.createFromCartSummary(summary);
|
||||
const session = await this.checkoutSessionService.createFromCartSummary(summary, paymentMethod);
|
||||
|
||||
this.checkoutSessionCookieService.setSessionId(req, res, session.id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user