コード例 #1
0
        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/>");
            }
        }
コード例 #2
0
ファイル: PAYPAL.aspx.cs プロジェクト: fxhome/beecloud-dotnet
        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/>");
            }
        }
コード例 #3
0
        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/>");
            }
        }