賦**:
response.setcontenttype("text/plain; charset=utf-8");
printwriter out = null;
try catch (ioexception e)
請求引數//
// 支付型別
string payment_type = "1";
// 必填,不能修改
// 伺服器非同步通知頁面路徑
string notify_url = "******x";
// 需http://格式的完整路徑,不能加?id=123這類自定義引數
// 頁面跳轉同步通知頁面路徑
// 需http://格式的完整路徑,不能加?id=123這類自定義引數,不能寫成http://localhost/
// 商戶訂單號
string out_trade_no = request.getparameter("orderid");
// 商戶**訂單系統中唯一訂單號,必填
// 訂單名稱
string subject = "";
try catch (unsupportedencodingexception e)
;// 必填
string total_fee = request.getparameter("totalfee");// 訂單模組生成,傳給支付寶支付模組
string title = urldecoder.decode(request.getparameter("title"),
"utf-8");
// 付款金額
// string total_fee = request.getparameter("totalfee");
// 必填
system.out.println("移動端傳過來的orderid" + out_trade_no + ",total_fee = " + total_fee);
// 商品展示位址
string show_url = "***x";
// 必填,需以http://開頭的完整路徑,例如:http://www.商戶**.com/myorder.html
// 訂單描述
string body = "商品介紹";
// 選填
// 超時時間
string it_b_pay = "1d";
// 選填
// 把請求引數打包成陣列
mapsparatemp = new hashmap();
sparatemp.put("service", "mobile.securitypay.pay");
sparatemp.put("partner", "***x");
sparatemp.put("seller_id", "***");
sparatemp.put("_input_charset", "utf-8");
sparatemp.put("payment_type", payment_type);
sparatemp.put("notify_url", notify_url);
sparatemp.put("out_trade_no", out_trade_no);
sparatemp.put("subject", subject);
sparatemp.put("total_fee", total_fee);
// sparatemp.put("show_url", show_url);
sparatemp.put("body", body);
// sparatemp.put("it_b_pay", it_b_pay);
string shtmltext = "";
for (iterator iter = sparatemp.keyset().iterator(); iter.hasnext();)
// 建立請求
system.out.println("開始建立 請求!!!!!!!!!!!!!!!!!!!!!!!!!");
shtmltext = shtmltext.substring(0, shtmltext.length() - 1);
system.out.println("待簽名字串shtmltext=" + shtmltext);
string sign = "";
try catch (exception e)
sign = urlencoder.encode(sign, "utf-8");
system.out.println("urlencoder.encode後的 sign=" + sign);
system.out.println("urlencoder.encode後的 shtmltext=" + shtmltext);
string buf = shtmltext + "&sign=\"" + sign + "\"&sign_type=\"rsa\"";
// string
// buf2=c.get("");
system.out.println("發給移動端 = " + buf);
out.write(buf);
out.flush();
out.close();
支付寶正式發布黑莓版客戶端
5月28日,支付寶對外表示,該公司已正式發布黑莓版客戶端,目前支付寶無線支付單項日交易筆數已接近20萬筆。據了解,自去年6月開始,支付寶已經相繼發布了基於windows mobile 塞班 iphone j2me 黑莓等手機系統平台的軟體。此次發布的黑莓手機客戶端分別支援黑莓8300 8800系列。...
服務端整合支付寶APP支付
例項化客戶端 sdk已經封裝掉了公共引數,這裡只需要傳入業務引數。以下方法為sdk的model入參方式 model和biz content同時存在的情況下取biz content model.setbody 我是測試資料 model.setouttradeno outtradeno model.se...
支付寶 PC端支付
首先登入螞蟻金服開放平台,入駐選擇自由研發的這些就不說了,註冊下資訊就可以了。在開發者中心,開放者接入進行建立應用,新增功能等操作 建立完對應的應用後,去應用列表新增電腦 支付的功能 簽約是需要額外的一些資訊的,填寫一下就可以了 開發環境就不說了,jdk之類的 關鍵引數 下面這些是必要的了 中的體現...