Skip to content

Commit

Permalink
Log client IP and country code in PayPal order creation for improved …
Browse files Browse the repository at this point in the history
…tracking
  • Loading branch information
aelassas committed Feb 12, 2025
1 parent 78a8504 commit 4c98361
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/src/controllers/paypalController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export const createPayPalOrder = async (req: Request, res: Response) => {

const clientIp = ipinfoHelper.getClientIp(req)
const countryCode = await ipinfoHelper.getCountryCode(clientIp)
logger.info('clientIp', clientIp)
logger.info('countryCode', countryCode)

const orderId = await paypal.createOrder(bookingId, amount, currency, name, description, countryCode)

Expand Down

0 comments on commit 4c98361

Please sign in to comment.