Collect additional data in orders

master
Mark Moffat 2019-12-30 18:05:43 +10:30
parent 5644a3a5af
commit 48b4963dfe
4 changed files with 10 additions and 0 deletions

View File

@ -77,6 +77,8 @@ router.post('/checkout_action', async (req, res, next) => {
orderPaymentGateway: 'Adyen',
orderPaymentMessage: response.refusalReason,
orderTotal: req.session.totalCartAmount,
orderItemCount: req.session.totalCartItems,
orderProductCount: req.session.totalCartProducts,
orderEmail: req.session.customerEmail,
orderFirstname: req.session.customerFirstname,
orderLastname: req.session.customerLastname,

View File

@ -60,6 +60,8 @@ router.post('/checkout_action', (req, res, next) => {
orderPaymentGateway: 'AuthorizeNet',
orderPaymentMessage: 'Your payment was successfully completed',
orderTotal: req.session.totalCartAmount,
orderItemCount: req.session.totalCartItems,
orderProductCount: req.session.totalCartProducts,
orderEmail: req.session.customerEmail,
orderFirstname: req.session.customerFirstname,
orderLastname: req.session.customerLastname,

View File

@ -164,6 +164,8 @@ router.post('/checkout_action', (req, res, next) => {
orderPaymentId: payment.id,
orderPaymentGateway: 'Paypal',
orderTotal: req.session.totalCartAmount,
orderItemCount: req.session.totalCartItems,
orderProductCount: req.session.totalCartProducts,
orderEmail: req.session.customerEmail,
orderFirstname: req.session.customerFirstname,
orderLastname: req.session.customerLastname,

View File

@ -53,6 +53,8 @@ router.post('/checkout_action', (req, res, next) => {
orderPaymentGateway: 'Stripe',
orderPaymentMessage: charge.outcome.seller_message,
orderTotal: req.session.totalCartAmount,
orderItemCount: req.session.totalCartItems,
orderProductCount: req.session.totalCartProducts,
orderEmail: req.session.customerEmail,
orderFirstname: req.session.customerFirstname,
orderLastname: req.session.customerLastname,
@ -229,6 +231,8 @@ router.post('/checkout_action_subscription', async (req, res, next) => {
orderPaymentGateway: 'Stripe',
orderPaymentMessage: subscription.collection_method,
orderTotal: req.session.totalCartAmount,
orderItemCount: req.session.totalCartItems,
orderProductCount: req.session.totalCartProducts,
orderEmail: req.session.customerEmail,
orderFirstname: req.session.customerFirstname,
orderLastname: req.session.customerLastname,