RazerMS / Integration-RazerMS_JavaScript_Seamless_Integration

Razer Merchant Services Seamless Integration
https://merchant.razer.com/seamless-demo-latest/index.html
33 stars 16 forks source link

No return or callback #1

Closed infacq closed 2 years ago

infacq commented 9 years ago

Hi

how do I get any feedback from the server. What is the proper flow of setting up

when I trigger this $('#myPay').MOLPaySeamless(options), it does not return anything. Perhaps I could be wrong in setup. Here is a function called when button is clicked

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://www.onlinepayment.com.my/MOLPay/API/seamless/3.0/js/MOLPay_seamless.deco.js"></script>
    $scope.processCheckout = function(ev) {
        ev.preventDefault();
        var request = $http({
                method: "post",
                url: "/pay",
                transformRequest: transformRequestAsFormPost,
                headers : { 'Content-Type': 'application/x-www-form-urlencoded' },
                data: param($scope.checkout)
            });
        request.success(function(res) {
            var options = { 
                mpsmerchantid:"testxxxx",
                mpschannel:"maybank2u", 
                mpsamount: res.od_total_rm, 
                mpsorderid: res.id, 
                mpscountry: res.od_currency,
                mpsbill_name: $scope.checkout.cs_fullname
            };
            console.log(options, data);
            $(ev).MOLPaySeamless(options);
        })
    }
tekjau commented 9 years ago

Hi @infacq I think you need a developer account in order to proceed on this. You may contact support@molpay.com for the account credentials.

infacq commented 9 years ago

please tell me the prerequisite of this library. And also best practise

tekjau commented 9 years ago

@infacq you need to apply at least a developer account which is something like xxxxxx_Dev or a real merchant account in order to use this. Prereqistered URLs are required too. Then you can set all 3 endpoints in the merchant admin, ie return URL, notification URL and callback URL. For all these endpoints, best practice is to enable IPN for all 3 endpoints.

infacq commented 9 years ago

is that for sandbox acct?

tekjau commented 9 years ago

@infacq No, sandbox has no such features, you need to get a dev account. You may contact support@molpay.com to get one.