Razer Merchant Services Seamless Integration v3.0(PCI) - RazerMS/Integration-RazerMS_JavaScript_Seamless_Integration GitHub Wiki

Seamless Integration

Latest update 2014/12/08

-New supporting channel (credit card).

Important

Please do not generate your vcode in JS as this will disclose the merchant verify key.

Getting started

Send an email to our support to 'Enable' this feature and 'Register' your domain: [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>
 <script src="https://www.onlinepayment.com.my/MOLPay/API/seamless/3.0/js/MOLPay_seamless.pci.deco.js"></script> 

Example

alt text

<!-- Button trigger MOLPay Seamless -->
<button type="button" id="myPay" class="btn btn-primary btn-lg" data-toggle="molpayseamless" data-mpsmerchantid="molpaymerchant" data-mpschannel="credit" data-mpsamount="1.20" data-mpsorderid="TEST1139669863" data-mpsbill_name="MOLPay Technical" >Pay by Credit Card</button>

Usage

The MOLPay seamless plugin process your button, via data attributes or JavaScript.

Via data attributes

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 Credit Card</button> 

Via JavaScript

Call a MOLPay seamless with id myPay with a single line of JavaScript:

$( document ).ready(function() {
     var options = { 
                    mpsmerchantid:"molpaymerchant",
                    mpschannel:"credit", 
                    mpsamount:"1.20", 
                    mpsorderid:"TEST728638391", 
                    mpsbill_name:"MOLPay Technical", 
                    ...
                   }; 
                    
     $('#myPay').MOLPaySeamless(options)
});
                        

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
mpscardnumber 16 Digits M Credit card number. E.g: 5111111111111111
mpsccmonth 2 Digits M Credit card expired date for month. E.g.: 02
mpsyear 4 Digits M Credit card expired date for year. E.g.: 2014
mpscvv 3 Digits M Card verification value (CVV) printed at the back of credit card. E.g.: 111
mpsbankname String, 128 chars M Bank issuer card name
mpsmerchantid an{1..32} M Merchant login username provided by MOLPay.
mpschannel an{3..32} M credit
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 Buyer name.
mpsbill_email ans{1..128} M Buyer email.
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 vcode = md5( mpsamount & mpsmerchantid & mpsorderid & verify_key & mpscardnumber & mpsccmonth & mpsyear & mpscvv )
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.

Appendix A: Data Type Details

No Code Description
  1. | a | Letters, A-Za-z
  2. | n | Numbers, 0-9
  3. | s | Symbols, .:|?*,!&_-
  4. | {x} | Fixed length x
  5. | {y..x} | Length range: y – x
  6. | {y,x} | Number range: 0-9. 0-9

Appendix B: M/O Details

No Code Description
  1. | M | Mandatory field.
  2. | O | Optional field, value can be empty.
  3. | C | Conditional

Data attributes for individual MOLPay seamless

Options for individual MOLPay seamless can alternatively be specified through the use of data attributes, as explained above.

Return Parameters

  • 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.

Support

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]

⚠️ **GitHub.com Fallback** ⚠️