快速结账按钮,而不是在iPhone支付paypal按钮

时间:2013-03-11 06:43:46

标签: ios objective-c paypal

在我的应用程序中,我收到PayPal按钮,但我想获得快速结账按钮 那么,我需要任何额外的库吗?或者我应该更改我的代码?我用了样品比萨库 我的按钮初始化代码是

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

1 个答案:

答案 0 :(得分:1)

替换

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

[[PayPal getInstance] fetchDeviceReferenceTokenWithAppID:yourAppId forEnvironment:ENV_LIVE withDelegate:self];

在IB中使用任意文本的自定义button或在运行时分配新按钮&创建我在上面viewDidLoad创建的PayPal实例。