今天我试着发送更新的应用程序,但苹果拒绝了我的应用程序,因为我使用的是uniqueIdentifier。经过一些研究,我发现libPayPalEC.a使用了3次uniqueIdentifier。
通过终端:string .Lib/PayPal/libPayPalEC.a | grep uniqueIdentifier
有没有人现在可以在哪里下载更新库?我到处都找过了。
谢谢,
发布于 2013-05-14 23:33:04
在github上进行了一些研究和很好的回答后:https://github.com/paypal/PayPal-iOS-SDK/issues/13#issuecomment-17882240我已经移除了paypal库,移除了deviceToken生成,PayPal移动端工作了!
如何在没有库的情况下使用PayPal支付:
你需要在后端创建支付流程(如PHP),在iOS应用程序中,只需打开带有指向后端的网址的web视图。要处理成功或错误,请处理web视图请求,以便您可以捕获链接,如error、cancel或success (后台重定向的页面)。
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
NSString *urlString = [[request.URL absoluteString] lowercaseString];
if (urlString.length > 0) {
//80 is the default HTTP port.
//The PayPal server may add the default port to the URL.
//This will break our string comparisons.
if ([request.URL.port intValue] == 80) {
urlString = [urlString stringByReplacingOccurrencesOfString:@":80" withString:@""];
}
NSLog(@"URL %@",urlString);
if ([urlString rangeOfString:@"success"].location != NSNotFound) {
// handle error
if (visible) {
[self dismissViewControllerAnimated:YES completion:complete];
} else {
dismissOnAppear = YES;
}
return FALSE;
} else if ([urlString rangeOfString:@"cancel"].location != NSNotFound) {
// handle error
if (visible) {
[self dismissViewControllerAnimated:YES completion:complete];
} else {
dismissOnAppear = YES;
}
return FALSE;
} else if ([urlString rangeOfString:@"error"].location != NSNotFound) {
// handle error
if (visible) {
[self dismissViewControllerAnimated:YES completion:complete];
} else {
dismissOnAppear = YES;
}
return FALSE;
}
}
return TRUE;
}在后端处理上,你不再需要发送土令牌(从iOS库),你只需要使用来自贝宝的令牌作为标准方式。
作为支付方式,请使用_express-checkout not _express-checkout-mobile,并且不要将drt作为deviceToken发送。
发布于 2013-05-14 13:58:14
请参考github上的问题:https://github.com/paypal/PayPal-iOS-SDK/issues/13
https://stackoverflow.com/questions/16530011
复制相似问题