protected void Page_Load(object sender, EventArgs e) { string cardNo = Request.Form["cardNo"]; string expire = Request.Form["expire"]; string cvv = Request.Form["cvv"]; string firstName = Request.Form["firstName"]; string lastName = Request.Form["lastName"]; string cardType = Request.Form["cardType"]; BCCreditCardInfo info = new BCCreditCardInfo(); info.card_number = cardNo; info.expire_month = int.Parse(expire.Split('-')[1]); info.expire_year = int.Parse(expire.Split('-')[0]); info.cvv = int.Parse(cvv); info.first_name = firstName; info.last_name = lastName; info.card_type = cardType; BCInternationlBill bill = new BCInternationlBill(BCPay.InternationalPay.PAYPAL_CREDITCARD.ToString(), 1, BCUtil.GetUUID(), "dotnet paypal", "USD"); bill.info = info; try { bill = BCPay.BCInternationalPay(bill); Response.Write("<span style='color:#00CD00;font-size:20px'>" + bill.creditCardId + "</span><br/>"); } catch (Exception excption) { Response.Write("<span style='color:#00CD00;font-size:20px'>" + excption.Message + "</span><br/>"); } }
protected void Page_Load(object sender, EventArgs e) { string cardNo = Request.Form["cardNo"]; string expire = Request.Form["expire"]; string cvv = Request.Form["cvv"]; string firstName = Request.Form["firstName"]; string lastName = Request.Form["lastName"]; string cardType = Request.Form["cardType"]; BCCreditCardInfo info = new BCCreditCardInfo(); info.card_number = cardNo; info.expire_month = int.Parse(expire.Split('-')[1]); info.expire_year = int.Parse(expire.Split('-')[0]); info.cvv = int.Parse(cvv); info.first_name = firstName; info.last_name = lastName; info.card_type = cardType; BCPayResult result = BCPay.BCInternationalPay(BCPay.InternationalPay.PAYPAL_CREDITCARD.ToString(), 1, BCUtil.GetUUID(), "dotnet paypal", "USD", info, null, null); Response.Write("<span style='color:#00CD00;font-size:20px'>" + result.resultCode + "</span><br/>"); Response.Write("<span style='color:#00CD00;font-size:20px'>" + result.resultMsg + "</span><br/>"); Response.Write("<span style='color:#00CD00;font-size:20px'>" + result.errDetail + "</span><br/>"); if (result.resultCode == 0) { BCPayPalResult payResult = result as BCPayPalResult; Response.Write("<span style='color:#00CD00;font-size:20px'>" + payResult.creditCardId + "</span><br/>"); } }
protected void Page_Load(object sender, EventArgs e) { //这里填入你在信用卡付款后获得的信用卡id。 BCPayResult result = BCPay.BCInternationalPay(BCPay.InternationalPay.PAYPAL_SAVED_CREDITCARD.ToString(), 1, BCUtil.GetUUID(), "dotnet paypal", "USD", null, "CARD-1K997489XXXXXXXXXXXXXXX", null); Response.Write("<span style='color:#00CD00;font-size:20px'>" + result.resultCode + "</span><br/>"); Response.Write("<span style='color:#00CD00;font-size:20px'>" + result.resultMsg + "</span><br/>"); Response.Write("<span style='color:#00CD00;font-size:20px'>" + result.errDetail + "</span><br/>"); }
protected void Page_Load(object sender, EventArgs e) { BCPayResult result = BCPay.BCInternationalPay(BCPay.InternationalPay.PAYPAL_PAYPAL.ToString(), 1, BCUtil.GetUUID(), "dotnet paypal", "USD", null, null, "http://localhost:50003/paypal/return_paypal_url.aspx"); Response.Write("<span style='color:#00CD00;font-size:20px'>" + result.resultCode + "</span><br/>"); Response.Write("<span style='color:#00CD00;font-size:20px'>" + result.resultMsg + "</span><br/>"); Response.Write("<span style='color:#00CD00;font-size:20px'>" + result.errDetail + "</span><br/>"); if (result.resultCode == 0) { BCPayPalResult payResult = result as BCPayPalResult; Response.Write("<a href=" + payResult.url + ">付款地址</a><br/>"); } }
protected void Page_Load(object sender, EventArgs e) { BCInternationlBill bill = new BCInternationlBill(BCPay.InternationalPay.PAYPAL_PAYPAL.ToString(), 1, BCUtil.GetUUID(), "dotnet paypal", "USD"); bill.returnUrl = "http://localhost:50003/paypal/return_paypal_url.aspx"; try { bill = BCPay.BCInternationalPay(bill); Response.Write("<a href=" + bill.url + ">付款地址</a><br/>"); } catch (Exception excption) { Response.Write("<span style='color:#00CD00;font-size:20px'>" + excption.Message + "</span><br/>"); } }
protected void Page_Load(object sender, EventArgs e) { //这里填入你在信用卡付款后获得的信用卡id。 BCInternationlBill bill = new BCInternationlBill(BCPay.InternationalPay.PAYPAL_SAVED_CREDITCARD.ToString(), 1, BCUtil.GetUUID(), "dotnet paypal", "USD"); bill.creditCardId = "CARD-1K997489XXXXXXXXXXXXXXX"; try { bill = BCPay.BCInternationalPay(bill); Response.Write("<span style='color:#00CD00;font-size:20px'>" + "成功" + "</span><br/>"); } catch (Exception excption) { Response.Write("<span style='color:#00CD00;font-size:20px'>" + excption.Message + "</span><br/>"); } }