Migs integration may not be working! the transaction is NOT going through!

First of all I love your invoicing application!
I have set up Migs as default payment gateway and I have entered all needed parameters as per my bank But when I tested it for payment it gives me this error :

“There was an error processing your payment. Please try again later.
The transactionId parameter is required”

Any idea why it is not going through ?


In the test for the Migs OmniPay driver I can see that a value for transactionId is set however this isn’t the standard practice for OmniPay (the library we use to integrate with payment gateways).


Do you know what value transactionId is supposed to be set to, usually this would be supplied by the payment gateway after the transaction is processed.

Hello Helli
I was wondering if you are able to fix the Migs ingratiation and Transaction ID issue in the new Update that was just released. Please let me know
I appreciate all your support
Your application still rocks!

I’ll try to include the change with the next release.

Thanks - I look forward to it.

Thanks for the new update - Migs is working now!
Hillel, You are the best :slight_smile:

Great to hear, thanks for letting us know!

Dear Hillel
I have a major problem with the payment integration of MIGS.
The 2 way payment has been working fine for few month but now Moto feature ( no pin number needed ) is disabled by my bank! As it is not offer enough security!
Now I am only having one choice of 3 way payment for MIGS. but when I switch to 3 way payment the system doesn’t work! It gives errors! and it doesn’t go to bank page. Do you think the 3 way MiGS is not working fine? can we test it !

Secondly, I spoke to my bank and they said if I cant fix the 3 way payment, I can still have the 2 way payment working and the Moto feature enabled for it if the application developer have a PCI cerfitcate ( which means your cant have access to see credit card data of customers )

Please advice on this?

Thanks for replying to this and helping us out.

Sorry, I don’t have good answers for you. 2 way is known to work well but there are clearly problems with 3 way. Our applications follows PCI security recommendations but isn’t officially certified.

Is it possible for you to use a different payment gateway?

Hello Hillel
I got the below message from our bank. We are now using Migs 2- and 3 ways in our application - Will this affect our application payment gateway. Now that the secure hash feature has changed to SHA256
Is this something you are aware off. this change is worldwide
You think we will have a problem ??
the message is below

" Dear Clients,
Please be noted that we received the below important notification from MasterCard for security update important action: Please be advised, effective 30th November 2016, the use of MD5 algorithms will no longer be accepted by the MasterCard Payment Gateway. Merchants currently using MD5 algorithms will need to upgrade to SHA256 algorithms to avoid interruption to service after this point.

In line with industry best practices, we have taken this decision in order to maintain appropriate levels of safety, security and integrity for you and your merchant customers.

As you will be aware, we are currently accepting SHA256 algorithms widely across the MasterCard Payment Gateway and we are committed to ensuring you can smoothly transition any of your merchant customers who are still using MD5 algorithms by the 30th November 2016 deadline to avoid any possible business impact.
Moreover, Please find attached for the Development Toolkit (PHP and ASP.NET) for new modification.
Note: We strongly recommend you take the necessary actions and forward this email to development team to amend your systems in line with the guidelines in order to meet the 30th November deadline and avoid any possible business impact."

Any advise?

Kind regards


Hello Hillel

Referance to my email above
After extenseive research I have found this Patch for SHA256 support for OmniPay MIGS:


— AbstractRequest.php.2 2016-09-21 19:45:07.846345749 -0400
+++ AbstractRequest.php 2016-09-21 19:46:47.049424061 -0400
@@ -67,6 +67,9 @@

     $hash = null;
     foreach ($data as $k => $v) {
  •        // Skip vpc_ keys that are not included in the hash calculation
  •        if(in_array($k, array('vpc_SecureHash', 'vpc_SecureHashType'))) continue;
  •        if ((strlen($v) > 0) && ((substr($k, 0, 4)=="vpc_") || (substr($k, 0, 5) =="user_"))) {
               $hash .= $k . "=" . $v . "&";


Kind regards


Are you using invoiceninja.com or are you self-hosting?

If you’re self hosting you can try applying the patch to your codebase to see if it helps.

Can you post the page where you found the fix.

Hello Hilal
Currently, I use it invoiceninga.com
Here is the source of the fix:
According to Visa and Matster card the the hash feature supposed to stop and MD5 algorithms will no longer be accepted by the MasterCard Payment Gateway. and will be replaced. by SHA256 algorithms

Here is the batch source : https://gist.github.com/lucasnetau/bcacb528d664f0ad1339086c1a585021/e81ded7d7672a25db4030ea6e34c82bb7b3d92f9

We only have less than 3 weeks then the MD5 algorithms will be no longer accepted!

Any Help ??


If the patch is available in a newer version of the Omnipay library we could look into updating.

Without it the omnipay for migs will not work at all!

found this - also could be very useful
Omnipay patch: Patch for SHA256 support for OmniPay MIGS
here is the link:

Please create an issue on the Omnipay driver repo to have this fix included with the driver.

Hi Hillal
I was able to add it to the self-host version on our site but we also have another major invoice account ( hosted by ninja - subdomain ) where as we cant do it!
Is there away you can update the Omnipay file AbstractRequest.php with the new encryption hash calculation method SHA256 as per Visa and MasterCard instruction. The MD5 hash will be no longer supported after 30th of November - we have less than 10 days to do this small fix / update. If we don’t do this we will be no longer able to use the application for payments.
Do you think we can add this on or before 30 of November?

As previously suggested, have you created an issue on the project on GitHub?

NO - I really don’t know how!
in two days the MDS will be no longer supported by migs
any help ??