Midtrans / midtrans-nodejs-client

Official Midtrans Payment API Client for Node JS | https://midtrans.com
MIT License
174 stars 56 forks source link

Support for ejs import #58

Closed RobyCigar closed 1 year ago

RobyCigar commented 1 year ago

Hi, thanks for the library, currently i have problem with the import statement how can I import the package using ejs syntax in my client? import snap from 'midtrans-client' currently the available docs only explain about common js import const blah = require('midtrans-client') thank you

Andrenzo17 commented 1 year ago

Hi @RobyCigar do you mean this is for client side is front end? This library/package is mainly NOT FOR FRONTEND (Browser's javascript) usage, but for backend (Node JS server) usage:

Thank you

RobyCigar commented 1 year ago

thanks for your reply @Andrenzo17 sorry I thought the word client in "midtrans-nodejs-client" mean its for the client(frontend)

Initially i was looking for snap npm package, the docs said i should add inline script in my html, but i feel like its not a proper way to add package directly using inline script in my project, i would rather using npm than inline script, so i stumbled to this repo.