快钱接口
...
请求快钱的参数
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;
}
}
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;
}
}
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"%>
鲜花预定
<%@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"%>
鲜花预定
这样就搞定了,快钱返回的参数上面已经给出,找个连接接着返回的参数就是了...
下一条:ASP字符串函数大全