Skip to content

Installation Guidance

Fadhil Rozaidi edited this page Feb 7, 2022 · 1 revision

Installation

  1. Download RMSPython.zip folder.
  2. Extract the zip file.
  3. Run python sdk.py at the terminal.

Usage

  1. Set which type of enviroment with either sandbox or production
enviroment = "sandbox" #or "production"

Payment Page integration

Set these needed objects that will send the buyer infromation to MOLPay hosted payment page.

#Value set are examples
merchant_id = '' #Insert merchant id here
vkey = '' #Insert Verify Key here
amount = '61.01' #Insert amount here
orderid = '601' #Insert order id here

It is not needed to set all the Endpoint URLs. If not set,by default the Endpoint URLs would be taken from Merchant Portal's End Point settings.

<!-- Value set are examples -->
<input type="hidden" name="returnurl" id="returnurl" value="http://127.0.0.1:5000/returnurl">

Payment endpoint integration

Set the values received from Razer Merchant Services's payment page.

tranID=request.form['tranID']
orderid=request.form['orderid']
status=request.form['status']
domain=request.form['domain']
amount=request.form['amount']
currency=request.form['currency']
appcode=request.form['appcode']
paydate=request.form['paydate']
skey=request.form['skey']
vkey = '' #Insert Private vKey here

IPN(Instant Payment Notification)

Additional object must be set when using IPN

treq = "1" #Value is always 1. Do not change

Call the IPN function

IPN()

Notification & Callback URL with IPN

Set additional object for Notification & Callback URL

nbcb=request.form.get('nbcb')