Skip to content

Commit

Permalink
Create ReadMe.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Hibar3 authored May 21, 2018
1 parent b76a75e commit 7e57940
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions Seamless_Integration/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## Seamlesss Integration with Node.js

### Pre-Requisite
1. Node Js installed(preferably latest version)
2. Install package md5
3. Install package request
4. Install package express
5. Install package body-pareser
6. MOLPay Development or Production ID.
7. MOLPay General API.

For ease of use, a demo version has been uploaded along with a sample html file and all required node modules in a zip file.
If there is any trouble in using the uploaded package modules, the packages can be easily installed on windows via npm install <packagename>
or you can just refer here https://www.npmjs.com/ .


### Installation
1. Download the app.js file
2. Put app.js file in same directory with your project files.
3. Open command prompt terminal,locate destination of app.js.
4. Remember to change name inside app.js of 'index.html' to your own html page. (There is only 1 line with index.html)
5. Run 'node app.js' to execute file.
6. Open localhost based on given localhost server to access your web page.

### Set Environment
Set which type of enviroment to use with either sandbox or production
```Javascript
var enviroment = "sandbox" or "production"
```
For the html demo, set the environment using the following links.

For sandbox:
```html
<script src="https://sandbox.molpay.com/MOLPay/API/seamless/latest/js/MOLPay_seamless.deco.js"></script>
```

For production
```html
<script src="https://www.onlinepayment.com.my/MOLPay/API/seamless/3.17/js/MOLPay_seamless.deco.js">
```
### Usage
Insert values into these parameters:
```Javascript
var merchant_id = "";//Insert merchant id here
var orderid = ""; // Order ID should be random generated by merchant function
var vkey = "**************"; //Replace ********** with your MOLPay verification_Key
```
Note: orderid should be defined by merchant function. Hardcoding method is used for convenience of testing
Please request merchant ID and vkey from Merchant Technical Support / Customer Care : [email protected] . The order ID can be anything.

0 comments on commit 7e57940

Please sign in to comment.