【问题标题】:Can not see Paypal Button in view在视图中看不到 Paypal 按钮
【发布时间】:2012-12-31 23:01:10
【问题描述】:

我在 ViewController 中没有看到 Paypal 按钮。

UIButton *button = [[PayPal getPayPalInst]getPayButtonWithTarget:self andAction:@selector(payWithPayPal) andButtonType:BUTTON_278x43];

以上是我的代码。我没有得到任何ButtonType。它在 Log 中向我展示了这个...

Printing description of button:
<nil>

而不是这个...

Printing description of button:
<UIButton: 0x72c6020; frame = (0 0; 278 43); opaque = NO; layer = <CALayer: 0x72bc910>>

我是 iPhone 新手,所以任何想法都会对我有很大帮助。 谢谢。

【问题讨论】:

    标签: ios cocoa-touch paypal


    【解决方案1】:

    您在上一堂课中错过了此代码,而您现在正在上课。您需要先初始化 PayPal:-

    [[PayPal getPayPalInst] fetchDeviceReferenceTokenWithAppID:@"APP-80W284485P519543T" forEnvironment:ENV_SANDBOX withDelegate:self];
    [[PayPal getPayPalInst] setLang:@"it_IT"];
    

    希望对你有所帮助..

    【讨论】:

    • 它显示-找不到实例方法“fetchDeviceReferenceTokenWithAppId”...我使用了paypal Delegate。
    • 你声明了#import "PayPal.h" 吗?
    • 是的,我愿意... paypal.h 和 ExpressCheckoutResponseHandler.h
    • 您是否导入了最新的 PayPal 库?
    • 是的..如果你有任何链接,请发给我..如果我使用我自己的按钮,那么它可以工作,但贝宝按钮不工作......
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-15
    • 1970-01-01
    • 1970-01-01
    • 2021-03-18
    • 2012-10-15
    相关资源
    最近更新 更多