Razer Merchant Services FB App Seamless Integration - RazerMS/Integration-RazerMS_JavaScript_Seamless_Integration GitHub Wiki
Please do not generate your vcode in JS as this will disclose the merchant verify key.
Please refer our example file FB-App-Seamless
-
Change your App-ID in line 7:
appId: '{Your FB AppID}'
-
Change your Merchant ID in line 22:
data-mpsmerchantid=\"{MerchantID}\"
Register your domain by email to our support: [email protected]
Include below javascript library in your web.
<!-- jQuery (necessary for MOLPay Seamless JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
Put your .js file here. For example:"<script src="./molpay_facebook_seamless.js"></script>"
<script src="https://www.onlinepayment.com.my/MOLPay/API/seamless/js/MOLPay_seamless.deco.js"></script>
<!-- Button trigger MOLPay Seamless -->
<button type="button" id="myPay" class="btn btn-primary btn-lg" data-toggle="molpayseamless" data-mpsmerchantid="molpaymerchant" data-mpschannel="maybank2u" data-mpsamount="1.20" data-mpsorderid="TEST1139669863" data-mpsbill_name="MOLPay Technical" >Pay by Maybank2u</button>
The MOLPay seamless plugin process your button, via data attributes or JavaScript.
Activate a MOLPay seamless without writing JavaScript. Set data-toggle="molpayseamless"
on a controller element, like a button, along with a data-mpsamount="1.01"
to set value.
<button type="button" data-toggle="molpayseamless">Pay by Maybank2u</button>
Call a MOLPay seamless with id myPay
with a single line of JavaScript:
$( document ).ready(function() {
var options = {
mpsmerchantid:"molpaymerchant",
mpschannel:"maybank2u",
mpsamount:"1.20",
mpsorderid:"TEST728638391",
mpsbill_name:"MOLPay Technical",
...
};
$('#myPay').MOLPaySeamless(options)
});
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-mpsamount=""
.
Name | Data Type (size) | M/O | Description --- | --- | --- | --- | --- mpsmerchantid | an{1..32} | M | Merchant login username provided by MOLPay. mpschannel | an{3..32} | M | Refer to Appendix C for more channel code. mpsamount | ns{10,2} | M | The transaction amount in one bill. Min accepted amount : 1.01 mpsorderid | an{1..32} | M | Bill / Invoice no. provided by merchant. mpsbill_name | a{1..128} | M | Propagated from FB. mpsbill_email | ans{1..128} | M | Propagated from FB. mpsbill_mobile | n{1..128} | M | Buyer mobile contact number. mpsbill_desc | an{1..200} | M | Bill / Description provided by merchant / buyer. mpscountry | a{2} | O | Buyer country. mpsvcode | an{32} | C | This is the data integrity protection hash string provided by merchant. mpscurrency | a{3} | O | Payment currency, E.g. MYR, SGD, USD & etc. mpslangcode | a{2} | O | Default language, E.g. 'en' for default mpsreturnurl | ans{1..200} | O | Obsoleted. Used for multiple return URL. All URLs must be registered beforehand with MOLPay.
No | Code | Description |
---|
- | a | Letters, A-Za-z
- | n | Numbers, 0-9
- | s | Symbols, .:|?*,!&_-
- | {x} | Fixed length x
- | {y..x} | Length range: y – x
- | {y,x} | Number range: 0-9. 0-9
No | Code | Description |
---|
- | M | Mandatory field.
- | O | Optional field, value can be empty.
- | C | Conditional
No | Code | Description | Type |
---|
- | affinonline | Affin Bank(Affin Online) | Online Banking
- | amb | Am Bank (Am Online) | Online Banking
- | bankislam | Bank Islam | Online Banking
- | cimbclicks | CIMB Bank(CIMB Clicks) | Online Banking
- | fpx | MyClear FPX (Maybank2u, CIMB Clicks, HLB Connect, RHB Now, PBB Online, Bank Islam | Online Banking
- | hlb | Hong Leong Bank(HLB Connect) | Online Banking
- | maybank2u | Maybank(Maybank2u) | Online Banking
- | pbb | PublicBank (PBB Online) | Online Banking
- | rhb | RHB Bank(RHB Now) | Online Banking
- | cash-711 | 7-Eleven(MOLPay Cash) | Physical Payment
Options for individual MOLPay seamless can alternatively be specified through the use of data attributes, as explained above.
- All return parameters are same as described in MOLPay API for merchant.
- Merchant can use the same return URL script for this seamless integration.
- Once payment done, existing page will be replaced by the merchant return URL.
Merchant Technical Support / Customer Care : [email protected]
Sales/Reseller Enquiry : [email protected]
Marketing Campaign : [email protected]
Channel/Partner Enquiry : [email protected]
Media Contact : [email protected]
R&D and Tech-related Suggestion : [email protected]
Abuse Reporting : [email protected]