|
@@ -64,21 +64,27 @@ namespace GFGGame
|
|
|
|
|
|
private async void OnVxBtnBuyClick()
|
|
|
{
|
|
|
- string timestamp = ((long)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds).ToString();
|
|
|
+ S2C_CreateWeChatPayOrder response = await ShopSProxy.ReqCreateWeChatOrder(_tempOrderId);
|
|
|
+ if (response == null || response.Error != ErrorCode.ERR_Success)
|
|
|
+ {
|
|
|
+ //TODO 提示调起支付宝失败
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
string APP_ID = "wxd9772f42f126413f";
|
|
|
string MCH_ID = "200768907612";
|
|
|
- string prepayid = "wx201411101639507cbf6ffd8b0779950874";
|
|
|
+ string prepayid = response.PrepayIdStr;
|
|
|
string packageValue = "Sign=WXPay";
|
|
|
- string noncestr = "5K8264ILTKCH16CQ2502SI8ZNMI4POJ5";
|
|
|
- string sign = "C380BEC2BFD727A4B6845133519F3AD6";
|
|
|
+ string noncestr = response.NonceStr;
|
|
|
+ string sign = response.Sign;
|
|
|
AliManagerr.Instance.PayVx(APP_ID, MCH_ID, prepayid, packageValue,
|
|
|
- noncestr, timestamp, sign);
|
|
|
+ noncestr, response.Timestamp, sign);
|
|
|
}
|
|
|
|
|
|
private async void OnAliBtnBuyClick()
|
|
|
{
|
|
|
S2C_CreateAliOrder response = await ShopSProxy.ReqCreateAliOrder(_tempOrderId);
|
|
|
- if (response == null || string.IsNullOrEmpty(response.AliOrderStr))
|
|
|
+ if (response == null || response.Error != ErrorCode.ERR_Success)
|
|
|
{
|
|
|
//TODO 提示调起支付宝失败
|
|
|
return;
|