打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
快钱接口
请求快钱的参数
view plaincopy to clipboardprint?
package com.bitmyth.pay.domain;
import com.bitmyth.util.MD5;
/**
* 快钱接口REQUEST
*/
public class PayBillRequest {
/**
* 商户编号
*/
private String merchant_id = "";
/**
* 商户密钥
*/
private String merchant_key = "";
/**
* 订单编号
*/
private String orderid = "";
/**
* 订单金额
*/
private int amount = 0;
/**
* 货币类型,1为人民币
*/
private String curr = "1";
/**
* 是否安全校验,2为必校验,推荐
*/
private String isSupportDES = "2";
/**
* 支付结果返回地址
*/
private String merchant_url = "";
/**
* 支付人真实姓名
*/
private String pname = "";
/**
* 商品信息
*/
private String commodity_info = "";
/**
* 商户私有参数
*/
private String merchant_param = "";
/**
* 传递email到快钱网关页面
*/
private String pemail = "";
/**
* 代理/合作伙伴商户编号
*/
private String pid = "";
/**
* 加密串
*/
private String mac = "";
public String getMerchant_id() {
return merchant_id;
}
public void setMerchant_id(String merchant_id) {
this.merchant_id = merchant_id;
}
public String getMerchant_key() {
return merchant_key;
}
public void setMerchant_key(String merchant_key) {
this.merchant_key = merchant_key;
}
public String getOrderid() {
return orderid;
}
public void setOrderid(String orderid) {
this.orderid = orderid;
}
public int getAmount() {
return amount;
}
public void setAmount(int amount) {
this.amount = amount;
}
public String getCurr() {
return curr;
}
public void setCurr(String curr) {
this.curr = curr;
}
public String getIsSupportDES() {
return isSupportDES;
}
public void setIsSupportDES(String isSupportDES) {
this.isSupportDES = isSupportDES;
}
public String getMerchant_url() {
return merchant_url;
}
public void setMerchant_url(String merchant_url) {
this.merchant_url = merchant_url;
}
public String getPname() {
return pname;
}
public void setPname(String pname) {
this.pname = pname;
}
public String getCommodity_info() {
return commodity_info;
}
public void setCommodity_info(String commodity_info) {
this.commodity_info = commodity_info;
}
public String getMerchant_param() {
return merchant_param;
}
public void setMerchant_param(String merchant_param) {
this.merchant_param = merchant_param;
}
public String getPemail() {
return pemail;
}
public void setPemail(String pemail) {
this.pemail = pemail;
}
public String getPid() {
return pid;
}
public void setPid(String pid) {
this.pid = pid;
}
/**
* 这个方法一定要最后调用
* 生成加密串,注意顺序
*/
public String getMac() {
String ScrtStr = "merchant_id=" + this.merchant_id + "&orderid=" + this.orderid
+ "&amount=" + this.amount + "&merchant_url=" + this.merchant_url
+ "&merchant_key=" + this.merchant_key;
mac = MD5.getMD5Str(ScrtStr);
return mac;
}
}
快钱返回的参数
view plaincopy to clipboardprint?
package com.bitmyth.pay.domain;
import com.bitmyth.util.MD5;
/**
* 快钱接口RESPONSE
*/
public class PayBillResponse {
private String merchant_key = "";
private String merchant_id = "";// 获取商户编号
private String orderid = "";// 获取订单编号
private String amount = "";// 获取订单金额
private String dealdate = "";// 获取交易日期
private String succeed = "";// 获取交易结果,Y成功,N失败
private String mac = "";// 获取安全加密串
private String merchant_param = "";// 获取商户私有参数
private String couponid = "";// 获取优惠券编码
private String couponvalue = "";// 获取优惠券面额
public String getMerchant_key() {
return merchant_key;
}
public void setMerchant_key(String merchant_key) {
this.merchant_key = merchant_key;
}
public String getMerchant_id() {
return merchant_id;
}
public void setMerchant_id(String merchant_id) {
this.merchant_id = merchant_id;
}
public String getOrderid() {
return orderid;
}
public void setOrderid(String orderid) {
this.orderid = orderid;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getDealdate() {
return dealdate;
}
public void setDealdate(String dealdate) {
this.dealdate = dealdate;
}
public String getSucceed() {
return succeed;
}
public void setSucceed(String succeed) {
this.succeed = succeed;
}
public String getRemoteMac() {
return mac;
}
public void setMac(String mac) {
this.mac = mac;
}
public String getMerchant_param() {
return merchant_param;
}
public void setMerchant_param(String merchant_param) {
this.merchant_param = merchant_param;
}
public String getCouponid() {
return couponid;
}
public void setCouponid(String couponid) {
this.couponid = couponid;
}
public String getCouponvalue() {
return couponvalue;
}
public void setCouponvalue(String couponvalue) {
this.couponvalue = couponvalue;
}
public String getLocalMac(){
String ScrtStr = "merchant_id="+this.merchant_id+"&orderid="+this.orderid+"&amount="+this.amount+"&date="+this.dealdate+"&succeed="+this.succeed+"&merchant_key="+this.merchant_key;
String rest = MD5.getMD5Str(ScrtStr);
return rest;
}
}
把这些参数条件用POST方法提交到快钱
view plaincopy to clipboardprint?
<%@page contentType="text/html; charset=GBK"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/Token.tld" prefix="t"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>鲜花预定</title>
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<mce:script type="text/javascript"><!--
function goPayBill(){
document.myform.submit();
}
// --></mce:script>
</head>
<body onload="goPayBill()">
<form action="https://www.99bill.com/webapp/receiveMerchantInfoAction.do" method="post" name="myform">
<input type="hidden" name="merchant_id" value="${pay.merchant_id}">
<input type="hidden" name="merchant_key" value="${pay.merchant_key}">
<input type="hidden" name="orderid" value="${pay.orderid}">
<input type="hidden" name="amount" value="${pay.amount}">
<input type="hidden" name="curr" value="${pay.curr}">
<input type="hidden" name="isSupportDES" value="${pay.isSupportDES}">
<input type="hidden" name="merchant_url" value="${pay.merchant_url}">
<input type="hidden" name="pname" value="${pay.pname}">
<input type="hidden" name="commodity_info" value="${pay.commodity_info}">
<input type="hidden" name="merchant_param" value="${pay.merchant_param}">
<input type="hidden" name="pemail" value="${pay.pemail}">
<input type="hidden" name="pid" value="${pay.pid}">
<input type="hidden" name="mac" value="${pay.mac}">
</form>
</body>
</html>
这样就搞定了,快钱返回的参数上面已经给出,找个连接接着返回的参数就是了...
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
NHibernate学习
C#模拟cmd
后台自动发送邮件的程序(Java Mail,WEB版)
C# 获得网页js执行之后的Html代码(body)部分(修订版)
用session实现用户登录
Java实现的文件监控管理
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服