PayUmoney Integration with angularjs giving Checksum failed error
<p>I am trying to integrate payumoney with angularjs. But it shows error like 'checksum failed'.</p>

<h2>controller.js</h2>

<pre><code>(function ()
{
'use strict';

angular
    .module('app.todo')
    .controller('TodoController', TodoController);

/** @ngInject */
function TodoController($document, $mdDialog, $mdSidenav, Tasks, Tags,$scope,$crypthmac)
{
    var vm = this;

    vm.txnid = "fd3e847h2";
    vm.firstname = "Hemanth";
    vm.email = "kevinguru888@gmail.com";
    vm.phone = "9901996148";
    vm.service_provider = "payu_paisa";
    vm.productinfo = "steering";
    vm.amount = "399.00";
    vm.surl = "http://localhost:3000/success";
    vm.furl = "http://localhost:3000/failure";
    vm.key = "OygoFs";
    vm.salt = "BV1QBwCv";

    var string = vm.key + '|' + vm.txnid + '|' + vm.amount + '|' + vm.productinfo + '|' + vm.firstname + '|' + vm.email + '|||||||||||' + vm.salt;
    vm.hash = $crypthmac.encrypt(string,"");


}
})();
</code></pre>

<h2>html file</h2>

<pre><code>&lt;head&gt;
&lt;script type='text/javascript' src="../bower_components/angular-hmac-   sha512/angular-hmac-sha512.js"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;div id="todo" class="page-layout simple tabbed"&gt;

&lt;!-- HEADER --&gt;
&lt;div class="header md-accent-bg" layout="row" layout-align="start center"&gt;
     &lt;div class="title"&gt;
        &lt;span class="md-display-1 font-weight-300"&gt;PAY U Form&lt;/span&gt;
     &lt;/div&gt;

&lt;/div&gt;
&lt;!-- / HEADER --&gt;
&lt;md-content layout-padding&gt;
    &lt;div class="innerContent"&gt;
        &lt;form action='https://test.payu.in/_payment', method='post', name="buyDetailsForm"&gt;
            &lt;md-content class="md-padding"&gt;
                &lt;div layout="row" layout-align="space-around"&gt;
                    &lt;div flex style="max-width:400px;"&gt;
                        &lt;md-input-container class="md-block"&gt;
                            &lt;label&gt;Transaction Id&lt;/label&gt;
                            &lt;input name="txnid" ng-model="vm.txnid"&gt;
                        &lt;/md-input-container&gt;
                    &lt;/div&gt;

                    &lt;div flex style="max-width:400px;"&gt;
                        &lt;md-input-container class="md-block"&gt;
                            &lt;label&gt;Name&lt;/label&gt;
                            &lt;input name='firstname' ng-model="vm.firstname"&gt;
                        &lt;/md-input-container&gt;
                    &lt;/div&gt;

                    &lt;div flex style="max-width:400px;"&gt;
                        &lt;md-input-container class="md-block" flex-gt-sm&gt;
                            &lt;label&gt;Email&lt;/label&gt;
                            &lt;input name='email' ng-model="vm.email"&gt;
                        &lt;/md-input-container&gt;
                    &lt;/div&gt;
                &lt;/div&gt;

                &lt;div layout="row" layout-align="space-around"&gt;
                    &lt;div flex style="max-width:400px;"&gt;
                        &lt;md-input-container class="md-block"&gt;
                            &lt;label&gt;Mobile&lt;/label&gt;
                            &lt;input name='phone' ng-model="vm.phone"&gt;
                        &lt;/md-input-container&gt;
                    &lt;/div&gt;

                    &lt;div flex style="max-width:400px;"&gt;
                        &lt;md-input-container class="md-block" flex-gt-sm&gt;
                            &lt;label&gt;Service Provider&lt;/label&gt;
                            &lt;input name='service_provider' ng-model="vm.service_provider"&gt;
                        &lt;/md-input-container&gt;
                    &lt;/div&gt;
                &lt;/div&gt;

                &lt;div layout="row" layout-align="space-around"&gt;
                    &lt;div flex style="max-width:400px;"&gt;
                        &lt;md-input-container class="md-block"&gt;
                            &lt;label&gt;Product Info&lt;/label&gt;
                            &lt;input name='productinfo' ng-model="vm.productinfo"&gt;
                        &lt;/md-input-container&gt;
                    &lt;/div&gt;

                    &lt;div flex style="max-width:400px;"&gt;
                        &lt;md-input-container class="md-block" flex-gt-sm&gt;
                            &lt;label&gt;Amount&lt;/label&gt;
                            &lt;input name='amount' ng-model="vm.amount"&gt;
                        &lt;/md-input-container&gt;
                    &lt;/div&gt;
                &lt;/div&gt;

                &lt;div layout="row" layout-align="space-around"&gt;
                    &lt;div flex style="max-width:400px;"&gt;
                        &lt;md-input-container class="md-block"&gt;
                            &lt;label&gt;Success Url&lt;/label&gt;
                            &lt;input name='surl' ng-model="vm.surl"&gt;
                        &lt;/md-input-container&gt;
                    &lt;/div&gt;

                    &lt;div flex style="max-width:400px;"&gt;
                        &lt;md-input-container class="md-block" flex-gt-sm&gt;
                            &lt;label&gt;Failure Url&lt;/label&gt;
                            &lt;input name='furl' ng-model="vm.furl"&gt;
                        &lt;/md-input-container&gt;
                    &lt;/div&gt;
                &lt;/div&gt;

                &lt;div layout="row" layout-align="space-around"&gt;
                    &lt;div flex style="max-width:400px;"&gt;
                        &lt;md-input-container class="md-block"&gt;
                            &lt;label&gt;Key&lt;/label&gt;
                            &lt;input name='key' ng-model="vm.key"&gt;
                        &lt;/md-input-container&gt;
                    &lt;/div&gt;

                    &lt;div flex style="max-width:400px;"&gt;
                        &lt;md-input-container class="md-block" flex-gt-sm&gt;
                            &lt;label&gt;Hash&lt;/label&gt;
                            &lt;input name='hash' ng-model="vm.hash"&gt;
                        &lt;/md-input-container&gt;
                    &lt;/div&gt;
                &lt;/div&gt;

            &lt;/md-content&gt;
            &lt;div layout="row" layout-align="end center"&gt;
                &lt;md-button class="md-raised md-primary" ng-click="vm.cancel()"&gt;Cancel&lt;/md-button&gt;
                &lt;md-button class="md-raised md-primary" ng-click="vm.submit(buyDetailsForm)"&gt;Place Order&lt;/md-button&gt;
            &lt;/div&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/md-content&gt;   
&lt;/div&gt;
</code></pre>

<p>The error shows like "SORRY! We were unable to process your payment Checksum Failed".</p>