Intro
Welcome to Gateway v2.0. Gateway v2.0 was developed due to the difficulties I faced during the implementation of MPG for a commercial company. BML does provide almost everything you would need to know, in their developer's guide. However, some critical information seems to be missing and requires you to contact BML to attain them. One of them is the algorithm used to generate hashes.
They do provide a test gateway, with a handful of functionalities from the live one. Although, the test gateway would go down pretty often and you might lose a lot of precious time. Gateway v2.0 was developed to save that time. Gateway v2.0 does not offer the use of Credit/Debit cards (for obvious reasons) but it does accept the same request as MPG and responds the same as well.
Requests sent to Gateway v2.0
Requests sent to Gateway v2.0 would need to be that mentioned in the BML MPG developer's guide. As such, having the following form on the page you would implement your request would do.
<form method="post" action="https://pay.mv">
<input type="hidden" name="Version" value="1.0.0" />
<input type="hidden" name="MerID" value="7796090001009" />
<input type="hidden" name="AcqID" value="407387" />
<input type="hidden" name="MerRespURL" value="https://pay.mv/example" />
<input type="hidden" name="PurchaseCurrency" value="462" />
<input type="hidden" name="PurchaseCurrencyExponent" value="2" />
<input type="hidden" name="OrderID" value="MPGORDID01154321" />
<input type="hidden" name="SignatureMethod" value="SHA1" />
<input type="hidden" name="PurchaseAmt" value="000000001200" />
<input type="hidden" name="Signature" value="P4XgdpDnYrM6vtDlOr1DHUE/vkU=" />
</form>
For the input field, "MerRespURL", you would need to replace with your application's URL to which Gateway v2.0 would need to respond upon completion of the transaction.
Do note that the URI used in "action" attribute would need to be the test gateway URI given by BML if you are going to be using BML's test gateway. Once you have completed the implementation and BML has approved it, you could replace the "action" attribute with the BML live gateway's URI.
Responses from Gateway v2.0
Gateway v2.0's response is composed to be the same as the one from MPG except for the descriptions and codes used through out. Basic structure does not change.
What ever that happens in between
To reduce the hassles that might be face during the implementation process of MPG, Gateway v2.0 will also check the validity of your hash generation. If Gateway v2.0 shows an error saying your hash does not match to the generate hash, please check your hash generation algorithm. If you have difficulties, you could either contact me or BML for further instructions.
That said, do also check if your hash generation on the response side is the same as the hash Gateway v2.0 generates while responding to you. The developer's guide has an outdated algorithm for the response hash generation. You would need to contact them to obtain the updated algorithm.