protected void PlansGridView_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "sub") { try { string smsid = BCPay.sendSMS("订阅人手机号"); BCSubscription sub = BCPay.createSubscription(smsid, "手机收到的验证码,用户输入,获取后传入", new BCSubscription("用户ID", plans[Convert.ToInt32(e.CommandArgument)].ID, "订阅用户银行名称(支持列表可参考getBanks()获取支持银行列表)", "卡号", "姓名", "身份证号", "银行预留手机号,要与发验证码的手机号一致")); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('订阅成功')", true); } catch (Exception ex) { Response.Write("<span style='color:#00CD00;font-size:20px'>" + ex.Message + "</span><br/>"); } } }