Migs Payment Gateway

Migs Payment Gateway gives you a chance to add Buy now buttons and create your own without coding knowledge, the plugin also has hooks and filters with reporting tools.

Author:Gabriel82 (profile at wordpress.org)
WordPress version required:3.7.1
WordPress version tested:4.1.7
Plugin version:1.1
Added to WordPress repository:01-12-2013
Last updated:26-08-2015
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:100
Rated by:1
Plugin URI:https://www.openprogrammer.info/2012/01/01/mi...
Total downloads:1 264
Active installs:10+
plugin download
Click to start download

Migs (Mastercard Internet Gateway Service) Payment Gateway gives you a chance to add Buy now buttons and create your own without coding knowledge, the plugin also has hooks and filters with reporting tools.

Greetings everyone,

It's such a pleasure to see you using WordPress and this plugin, nevertheless I do have to remind you that this plugin is "NOT A MIGS OFFICIAL PLUGIN" and it's shared under "GNU GENERAL PUBLIC LICENSE".

So please take your time and read the license.txt especially the “NO WARRANTY” section, and remember to check your Migs portal for each transaction before processing any shipment. If you find any bugs please report them on wordpress.org so I can try resolve them.

Regards, Gabriel

==

Before Starting!!

Please make sure your account is working, use the bank test page or go to Test-Case page... If test case is returning "Not Calculated - No 'SECURE_SECRET' present." Please retry it on your bank test page if both gives this then contact the bank. (Small TIP) Ask the bank to run a test of your account...

How to add paying button to the website?

To add a new button to the website you can add this button to any page/post:

[my_migs_button amount="100"]

In php code:

do_shortcode('[my_migs_button amount="100"]')

As you notice the default text is "Buy now" to change this:

[my_migs_button amount="100" text="Buy new item!"]

In php code:

do_shortcode('[my_migs_button amount="100" text="Buy new item!"]')

To add a css class:

[my_migs_button amount="100" cssclass="somecolors"]

In php code:

do_shortcode('[my_migs_button amount="100" cssclass="somecolors"]')

To add a predefined post id (This can be used):

[my_migs_button amount="100" post_id="1"]

In php code:

do_shortcode('[my_migs_button amount="100" post_id="1"]')

To show price in button:

[my_migs_button amount="100" showprice="1"]

In php code:

do_shortcode('[my_migs_button amount="100" showprice="1"]')

Show button for logged in only in users:

[my_migs_button amount="100" loggedinonly="1"]

In php code:

do_shortcode('[my_migs_button amount="100" loggedinonly="1"]')

The amount is required!!!

For more advanced options with the button please use the "migs_payment_gateway_modify_button" filter.

How to set a custom return url: (this is not obligatory)

1- Create a new page/post (Depends on your needs and design). 1- Paste this code in the page [my_migs_return_url] 1- Copy the page ID to Settings page

The return url will be updated to the new page/post.

List of action hooks:

  • migs_payment_gateway_update_on_return
  • migs_payment_gateway_send_admin_email
  • migs_payment_gateway_insert_to_logs
  • migs_payment_gateway_settings_updated
  • migs_payment_gateway_get_settings

List of action hooks:

  • migs_payment_gateway_update_on_return
  • migs_payment_gateway_send_admin_email
  • migs_payment_gateway_insert_to_logs
  • migs_payment_gateway_settings_updated
  • migs_payment_gateway_get_settings

Example: How to add action hooks to this plugin?

This code can be added in functions.php in the theme folder.

function bank_transection_return($obj) {
    if ($obj->updated > 0){
        //When it comes here it means the product was successfully updated and paid.
        print_r($obj);
    }else{
        //When it comes here it means the product was not updated but that does not mean the product was not paid.
        echo "Did not update? ";
    }
}
add_action('migs_payment_gateway_update_on_return', 'bank_transection_return', 10 , 1);

List of filter hooks:

migs_payment_gateway_modify_button

How to add filter hooks to the plugin?

This code can be added in functions.php in the theme folder.

function migs_payment_gateway_modify_button_html( $html, $atts ) {
    //This filter you can change the buttons on the site
    //print_r($atts) Will return Array ( [amount] => 100 [text] => Buy new shoes ) 
    return '<div class="extra_div">' . $html . '</div>';
}
add_filter( 'migs_payment_gateway_modify_button', 'migs_payment_gateway_modify_button_html', 10, 2);