首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >没有uniqueIdentifier的libpaypalecc.a?

没有uniqueIdentifier的libpaypalecc.a?
EN

Stack Overflow用户
提问于 2013-05-14 03:51:41
回答 2查看 529关注 0票数 1

今天我试着发送更新的应用程序,但苹果拒绝了我的应用程序,因为我使用的是uniqueIdentifier。经过一些研究,我发现libPayPalEC.a使用了3次uniqueIdentifier。

通过终端:string .Lib/PayPal/libPayPalEC.a | grep uniqueIdentifier

有没有人现在可以在哪里下载更新库?我到处都找过了。

谢谢,

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 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 (后台重定向的页面)。

代码语言:javascript
复制
- (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发送。

票数 2
EN

Stack Overflow用户

发布于 2013-05-14 13:58:14

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16530011

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档