SMS/Email Notification


Enable or disable SMS or email notifications, a service provided by Instamojo by nesting send_sms & send_email objects within send_data .

By default send_sms & send_email functionality is set to false. These objects values only accepts true or false.

Referencing Instamojo API documentation, send_sms feature will only be enabled if users phone is supplied. If not, errors occur.

Referencing Instamojo API documentation, send_email feature will only be enabled if users email address is supplied. If not errors occur.

Usage


$.fn.mojoReq({

    data: {
        send_sms: false,
        send_email: false
    }

});

or

$.fn.mojoReq.defaults.data.send_sms = false;
$.fn.mojoReq.defaults.data.send_email = false;

mojoPay(js) Setup: Accept Form Fields & Enable SMS/Email Notification.


<script>
// your secret keys (please obfuscate)
$(function(){
    $.fn.mojoReq.defaults.data.api_key    = 'YOUR-API-KEY';
    $.fn.mojoReq.defaults.data.auth_token = 'YOUR-AUTH-TOKEN';
});
</script>
<script>
$(function(){

    // assign 'click' event at button
    $('.unique-classname').on( 'click' , function( event ){

        // prevents default button behavior
        event.preventDefault();

        // init instamojo checkout
        $.fn.mojoReq({

            // required setup
            sandbox : true,
            data: {
            	amount       : '1000.00',
            	purpose      : 'Download Awesome Blogger Theme',
            	redirect_url : 'https://your.domain.name/success.html',
                
                // include form field data
                buyer_name : $('[name=buyer_name]').val(),
                email      : $('[name=email]').val(),
                phone      : $('[name=phone]').val(),

                // enable Instamojo send sms & email notifications
                send_sms   : true,
                send_email : true

            }

        });
    });

});
</script>

$.fn.mojoReq() says... buyer_name , email, phone, send_sms, send_email are reserved nested data objects.