Info
Version: | 2.2.1.1-pre |
Author(s): | Thinkpower |
Last Update: | Monday, May 25, 2015 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | http://www.nuget.org/packages/Thinkpower.BindingIOS.Alipay/ |
NuGet Url: | https://www.nuget.org/packages/Thinkpower.BindingIOS.Alipay |
Install
Install-Package Thinkpower.BindingIOS.Alipay
dotnet add package Thinkpower.BindingIOS.Alipay
paket add Thinkpower.BindingIOS.Alipay
Thinkpower.BindingIOS.Alipay Download (Unzip the "nupkg" after downloading)
Dependencies
- PCLCrypto(1.0.2.15130)
Tags
public override void ViewDidLoad()
{
base.ViewDidLoad();
var btn1 = new UIButton()
{
BackgroundColor = new UIColor(0,0,255,255),
Frame = new CoreGraphics.CGRect(50, 50, 200, 100)
};
btn1.SetTitle ("Order", UIControlState.Normal);
btn1.TouchUpInside += (sender, e) =>
{
var orderStr = OrderHelper.OrderStr("id", "id", "20150525-000001",
"Xamarin中文书", "Visual C#与Xamarin跨平台行动App开发实战",
"0.01",
"http://notify.java.jpxx.org/index.jsp"
);
var PrivateKey = "PrivateKey";
var schemeStr = OrderHelper.SchemeStr(orderStr, PrivateKey);
AlipaySDK.DefaultService().PayOrder(orderStr, schemeStr, completionBlock);
};
this.View.AddSubview(btn1);
}
Action<NSDictionary> completionBlock = new Action<NSDictionary>((result) =>
{
new UIAlertView("title", result.ToString(), null, "ok", null).Show();
});
//(代码于正式版时公开).