angularjs - 如何在 AngularJS 应用程序中集成 Payumoney?

标签 angularjs payumoney

我已经发送了所有必需的参数。点击提交按钮后,响应页面是这样的。校验和失败且无法处理请求。

enter image description here

html表单

<form action="https://secure.payu.in/_payment" method="post">
<input type="text" ng-model="checkout.txnid"  name="txnid">
 <p>{{checkout.txnid="123456"}}</p>
<input type="text" ng-model="checkout.key"  name="key">
 <p>{{checkout.key="WHlKGc"}}</p>
<input type="text" ng-model="checkout.amount"  name="amount">
 <p>{{checkout.amount=checkout.grandtotal}}</p>
<input type="text" ng-model="checkout.productinfo"  name="productinfo">
 <p>{{checkout.productinfo="pending"}}</p>
<input type="text" ng-model="checkout.firstname" name="firstname">
 <p>{{checkout.firstname=userinfo.name}}</p>
<input type="text" ng-model="checkout.email"  name="email">
 <p>{{checkout.email=userinfo.email}}</p>
<input type="text" ng-model="checkout.phone"  name="phone">
 <p>{{checkout.phone="8125434557"}}</p>
<input type="text" ng-model="checkout.hash" name="hash">
 <p>{{checkout.hash=encrypttext}}</p>
<input type="text" ng-model="checkout.surl"  name="surl">
 <p>{{checkout.surl="www.google.com"}}</p>
<input type="text" ng-model="checkout.furl"  name="furl">
 <p>{{checkout.furl="www.appqube.in"}}</p>
<input type="text" ng-model="checkout.service_provider" name="service_provider">
 <p>{{checkout.service_provider="payu_paisa"}}</p>
<button class="button style-10" href="" ng-click="ProceedToCheckout(checkout)" type="submit" value="submit">Checkout</button>

Controller :使用 Sha512 生成哈希 key 。
var string = data.key + '|' + data.txnid + '|' + data.amount + '|' + data.productinfo + '|' + data.firstname + '|' + data.email + '|||||||||||' + data.salt;
$scope.encrypttext = $crypthmac.encrypt(string,"");

我正在使用 angular-hmac-512 进行加密:
txnid:123456
key:WHlKGc
amount:120
productinfo:pending
firstname:vasu
email:narala.vasu@gmail.com
phone:8125434557
hash:06d5393243d78d0e0518bb5dac11d762be576c23c3e51344f604547550328f6e0c84b9d8fed4543766e4057abb1ae87ccf1d9cb7b069cef498d2fcdcdd5e84dc
surl:www.google.com
furl:www.appqube.in
service_provider:payu_paisa.

我是 Angular 的新手。请帮助我如何将 Form action 重定向到 https://secure.payu.in/_payment

最佳答案

您正在直接重定向到生产。相反,您应该使用 PayU 提供的测试链接。 Here是下载整合 PayU 指南的链接。

测试网址为 https://test.payu.in/_payment

关于angularjs - 如何在 AngularJS 应用程序中集成 Payumoney?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38115366/

相关文章:

javascript - Angular,在文本框中显示所选选项

android - PayUBiz-安卓 : getting Mandatory param hash is missing

android - Payu SDK,解析元元素内容时出错

php - PayUMoney 集成重定向到本地主机

android - 在 webview 中加载成功 URL 时调用类或 Activity

javascript - 如何在更改之前捕获输入 radio 值?

html - 当 ng-view 内容大于窗口高度时出现边框问题

javascript - AngularJS 中的 getTime(),Java Script 中的 new Date(date) 错误

angularjs - AngularJs中两个不同模块的 Controller 之间如何通信

postman - 向您付款 金额无效错误