当前位置: 首页 > news >正文

服务器怎么装网站吗网站界面(UI)设计

服务器怎么装网站吗,网站界面(UI)设计,江西的赣州网站建设,it人力开发外包服务1.下载支付宝SDK以及Demo https://doc.open.alipay.com/doc2/detail?treeId54articleId103419docType1 2.新建文件夹“AliSDK”#xff0c;将压缩包内的文件拷贝到该文件夹下#xff0c;完成后如下图所示#xff1a; 3.将文件夹拷贝到项目中#xff0c; 4.执行完…  1.下载支付宝SDK以及Demo https://doc.open.alipay.com/doc2/detail?treeId54articleId103419docType1 2.新建文件夹“AliSDK”将压缩包内的文件拷贝到该文件夹下完成后如下图所示   3.将文件夹拷贝到项目中   4.执行完第二步后项目目录里会出现蓝色的AliSDK分组。然后添加相应的库文件添加完成后如下图所示 5.拷贝完成后编译会出现如下错误只需要在相应的类内添加#import Foundation/Foundation.h即可解决 6.添加完成后编译仍然有错误 解决办法Targets-Build Settings-Header Search Path中添加1中建立的aliSDK文件夹的路径找到alisdk路径拖拽到这儿就好了   此时问题解决了。 7.整理项目目录把添加的库文件移动的framework分组内ali也移动到framework分组内如下所示   8.新建Product类Product.h内如下所示 #import Foundation/Foundation.hinterface Product : NSObject{ privatefloat _price;NSString *_subject;NSString *_body;NSString *_orderId; }property (nonatomic, assign) float price; property (nonatomic, copy) NSString *subject; property (nonatomic, copy) NSString *body; property (nonatomic, copy) NSString *orderId;end  9.viewController.h #import ViewController.h #import Product.h #import Order.h #import AliSDK/Util/DataSigner.h #import AlipaySDK/AlipaySDK.h interface ViewController ()endimplementation ViewController- (void)viewDidLoad {[super viewDidLoad];// Do any additional setup after loading the view, typically from a nib. } - (IBAction)clickPay:(UIButton *)sender {[self testPay]; }-(void)testPay{/**点击获取prodcut实例并初始化订单信息*/Product *product [[Product alloc]init];/**商户的唯一的parnter和seller。*签约后支付宝会为每个商户分配一个唯一的 parnter 和 seller。*//**//*需要填写商户app申请的*//**/NSString *partner ;NSString *seller ;NSString *privateKey ;/**//**//**///partner和seller获取失败,提示if ([partner length] 0 ||[seller length] 0 ||[privateKey length] 0){UIAlertView *alert [[UIAlertView alloc] initWithTitle:提示message:缺少partner或者seller或者私钥。delegate:selfcancelButtonTitle:确定otherButtonTitles:nil];[alert show];return;}/**生成订单信息及签名*///将商品信息赋予AlixPayOrder的成员变量Order *order [[Order alloc] init];order.partner partner;order.sellerID seller;order.outTradeNO [self generateTradeNO]; //订单ID由商家自行制定order.subject product.subject; //商品标题order.body product.body; //商品描述order.totalFee [NSString stringWithFormat:%.2f,product.price]; //商品价格order.notifyURL http://www.xxx.com; //回调URLorder.service mobile.securitypay.pay;order.paymentType 1;order.inputCharset utf-8;order.itBPay 30m;order.showURL m.alipay.com;//应用注册scheme,在AlixPayDemo-Info.plist定义URL typesNSString *appScheme alisdkdemo;//将商品信息拼接成字符串NSString *orderSpec [order description];NSLog(orderSpec %,orderSpec);//获取私钥并将商户信息签名,外部商户可以根据情况存放私钥和签名,只需要遵循RSA签名规范,并将签名字符串base64编码和UrlEncodeidDataSigner signer CreateRSADataSigner(privateKey);NSString *signedString [signer signString:orderSpec];//将签名成功字符串格式化为订单字符串,请严格按照该格式NSString *orderString nil;if (signedString ! nil) {orderString [NSString stringWithFormat:%sign\%\sign_type\%\,orderSpec, signedString, RSA];[[AlipaySDK defaultService] payOrder:orderString fromScheme:appScheme callback:^(NSDictionary *resultDic) {NSLog(reslut %,resultDic);}];}} /*生成订单信息*/ - (NSString *)generateTradeNO {static int kNumber 15;NSString *sourceStr 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ;NSMutableString *resultStr [[NSMutableString alloc] init];srand((unsigned)time(0));for (int i 0; i kNumber; i){unsigned index rand() % [sourceStr length];NSString *oneStr [sourceStr substringWithRange:NSMakeRange(index, 1)];[resultStr appendString:oneStr];}return resultStr; }- (void)didReceiveMemoryWarning {[super didReceiveMemoryWarning];// Dispose of any resources that can be recreated. }end    10.appdelegate.m中添加如下代码 - (BOOL)application:(UIApplication *)applicationopenURL:(NSURL *)urlsourceApplication:(NSString *)sourceApplicationannotation:(id)annotation {if ([url.host isEqualToString:safepay]) {//跳转支付宝钱包进行支付处理支付结果[[AlipaySDK defaultService] processOrderWithPaymentResult:url standbyCallback:^(NSDictionary *resultDic) {NSLog(result %,resultDic);}];}return YES; }// NOTE: 9.0以后使用新API接口 - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionaryNSString*, id *)options {if ([url.host isEqualToString:safepay]) {//跳转支付宝钱包进行支付处理支付结果[[AlipaySDK defaultService] processOrderWithPaymentResult:url standbyCallback:^(NSDictionary *resultDic) {NSLog(result %,resultDic);}];}return YES; } 大功告成  转载于:https://www.cnblogs.com/sunjianfei/p/5727119.html
http://www.pierceye.com/news/53099/

相关文章:

  • 如何编程制作自己的网站免费下载京东购物
  • 晋城网站开发APP客户端网站建设
  • 湘潭网站建设有名磐石网络建设网站iss
  • 淘客网站开发流程南昌网站快速排名提升
  • 珠海哪个公司建设网站好网站建设业务的延伸性
  • wordpress 制作网站模板上海网站制作开发
  • VM2008 做网站icann 域名注册网站
  • 视频网站VIP卡怎么做赠品个人soho要怎么做企业网站
  • 公司做网站需要哪些费用美食网站模板下载
  • 设备外贸用哪个网站网站开发的英文参考文献
  • 网站安全证书出错怎么做电子商务网站建设精英
  • 关于seo关键词选择有哪些方法合肥seo排名收费
  • 怎么用wordpress建电商网站网站域名改了以后新域名301
  • 织梦后台做的网站怎么绑定域名最好的wordpress教程
  • 列出网站开发建设的步骤网络营销渠道的特点
  • 上海专业网站建站广州互联网大厂公司有哪些
  • 泰通建设集团网站网站制作 flash 修改
  • 怎样建网站卖东西天津塘沽网站建设
  • 凡科建站网址网站账号注册程序
  • 做网站的主流软件西安seo推广优化
  • 商丘网站制作软件app拉新任务平台
  • 企业网站推广形式有网站推广怎么做引流
  • 做网站 发现对方传销秦皇岛优化网站排名
  • 怎么样建设一个电影网站视频下载郑州优之客网站建设
  • 金华市建设局婺城分局网站wordpress虚拟机
  • 做网站的步骤 主题云空间
  • 许昌做网站九零后沈阳网站 房小二
  • 建设局施工许可证网站乐享黔程是什么公司
  • html5 公司网站杭州seo
  • 网站建设 主要内容淮安经济技术开发区建设局网站