Paypal按钮问题

发布于 2024-11-08 13:59:39 字数 434 浏览 0 评论 0原文

我在沙箱环境中测试了 PayPal 按钮并且它有效。现在我试图让它在实时环境中工作,但按钮仍然处于禁用状态。

我的代码是,

[PayPal initializeWithAppID:@"APP-80W284485P519543T" forEnvironment:ENV_LIVE];  
UIButton *button = [[PayPal getInstance] getPayButton:self buttonType:BUTTON_278x43 startCheckOut:@selector(payWithPayPal) PaymentType:DONATION withLeft:20 withTop:240];   
[self.view addSubview:button];

如果我将环境 ENV_LIVE 更改为 ENV_SANDBOX,则按钮将启用

I have a PayPal Button tested in sandbox environment and it worked. Now i am trying to get it working in the live environment the button remains disable.

My code is

[PayPal initializeWithAppID:@"APP-80W284485P519543T" forEnvironment:ENV_LIVE];  
UIButton *button = [[PayPal getInstance] getPayButton:self buttonType:BUTTON_278x43 startCheckOut:@selector(payWithPayPal) PaymentType:DONATION withLeft:20 withTop:240];   
[self.view addSubview:button];

if I change Environment ENV_LIVE to ENV_SANDBOX the button is enable

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

烟雨凡馨 2024-11-15 13:59:40

只有您的应用程序获得 PayPal 批准后才能使用实时环境。您用于初始化 PayPal 的 AppID 已进行硬编码,以便在 SANDBOX 环境中使用。对于实时应用程序,您需要使用 PayPal 分配给您的应用程序的应用程序 ID。按照本页中的步骤获取您的应用的应用 ID。

请记住,您需要经过自己的验证 PayPal Premier 或 Business 帐户,然后应用程序才能运行(即使已获得批准)。

如果您要提交移动应用程序,请执行以下额外步骤

  1. iPhone (iOS) 应用程序必须包括:
    • “.app”和“移动配置”文件,其 UDID 为 396ea30899bb294607270258115a8eb9c929c0217754a0e4b281fd313f20d9e13c87534e26b091e3。这就是 PayPal 将测试的两部 iPhone。
  2. iPad (iOS) 应用程序必须包括:
    • “.app”和“移动配置”文件,其 UDID 92e19f163eb553d42dfed00487fcaf73f7521c6e
  3. 对于 Android 应用,请提供指向您的 .apk 文件的链接,或将 .apk 文件附加到“屏幕截图和任何内容”中。应用程序的
  4. “屏幕截图和任何支持文档” 对于 Blackberry 应用程序,提供 .jad 文件的链接,或将 .jad 文件附加到应用程序的“屏幕截图和任何支持文档”
  5. 对于 Symbian 应用程序,提供 .wgz 的链接在应用程序的“屏幕截图和任何支持文档”中归档或附加 .wgz 文件

一旦您的应用程序获得批准,您将收到一个实时应用程序 ID。只需将测试应用程序 ID 替换为实时应用程序 ID,并将您的 Sandbox API 凭据更改为实时 API 凭据即可。

The live environment can be used only after your app has been approved by PayPal. The AppID you are using to initialize PayPal is hardcoded for use in the SANDBOX env. For a live application you need to use the App ID that is assigned to your app by PayPal. Follow the steps in this page to get an App ID for your app.

Remember, you need to have your own verified PayPal Premier or Business Account before the app will work (even if it is approved).

If you are submitting a mobile app take these extra steps

  1. iPhone (iOS) app must include:
    • ".app" and "mobile provision" file with UDIDs 396ea30899bb294607270258115a8eb9c929c021 AND 7754a0e4b281fd313f20d9e13c87534e26b091e3. Those are the two iPhones that PayPal will test with.
  2. iPad (iOS) app must include:
    • ".app" and "mobile provision" file with UDID 92e19f163eb553d42dfed00487fcaf73f7521c6e
  3. For an Android app, provide a link to your .apk file or attach the .apk file in the "Screen captures and any supporting documentation" of the application
  4. For a Blackberry app, provide a link to your .jad file or attach the .jad file in the "Screen captures and any supporting documentation" of the application
  5. For a Symbian app, provide a link to your .wgz file or attach the .wgz file in the "Screen captures and any supporting documentation" of the application

Once your app is approved, you'll receive a Live App ID. Just replace the Test App ID with the Live App ID, and change your Sandbox API credentials to Live API Credentials.

忘东忘西忘不掉你 2024-11-15 13:59:39

您必须先将应用程序提交到 PayPal,然后才能将其转换为实时应用程序。在沙盒模式下测试您的应用程序后,他们会为您提供一个 ID。

检查此链接

https://www.x.com/community/ppx/xspaces/移动/机电

You have to submit the app to paypal before converting it to live. They will provide you one id after testing your app in sandbox mode.

Check this link

https://www.x.com/community/ppx/xspaces/mobile/mep

烟雨凡馨 2024-11-15 13:59:39

有时,当 PayPal 服务器关闭或服务器出现任何问题时,PayPal 对象的初始化会失败,并且在这些情况下该按钮将被禁用。

您可以使用以下代码检查初始化的状态:

if ([PayPal initializationStatus] == STATUS_COMPLETED_SUCCESS) { //We have successfully initialized and are ready to pay
}

} 

来自文档:

“使用 PayPal 付款”按钮已返回
通过 getPayButtonWithTarget 方法
被禁用,直到初始化为止
完全的。一旦初始化完成
完成,如果成功的话
按钮将变为启用状态。

当初始化状态返回时
STATUS_COMPLETED_ERROR - 请求
超时或主机不可用(网络
连接失败)有效
初始化错误情况
初始化 PayPal 重试尝试。

如果由于以下原因初始化失败
买家错误,错误信息为
呈现为 UIAlertView。

At times, when PayPal server is down or for any problems with server, the initialization of the PayPal object fails, and the button would be disabled in these cases.

You can check for the status of the initialization using the following code:

if ([PayPal initializationStatus] == STATUS_COMPLETED_SUCCESS) { //We have successfully initialized and are ready to pay
}

} 

From the documentation:

The “Pay with PayPal” button returned
by the getPayButtonWithTarget method
is disabled till the initialization is
complete. Once the initialization is
complete, if it was successful, the
button will become enabled.

When initialization status returns
STATUS_COMPLETED_ERROR - Request
timeouts or host unavailable (Network
connection failure) are valid
initialization error cases for
initializePayPal retry attempts.

If initialization failed due to a
buyer error, the error message is
presented as a UIAlertView.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文