简体   繁体   English

在沙盒模式下创建 PayPal 订阅按钮

[英]Creating a PayPal Subscription Button in Sandbox mode

I am trying to setup a sandbox for PayPal Smart Buttons to test before I release to production.我正在尝试为 PayPal 智能按钮设置一个沙箱,以便在我发布到生产环境之前进行测试。

When I go to PayPal Subscriptions , I select my plan and click 'Copy Code'.当我转到PayPal Subscriptions 时,我选择我的计划并单击“复制代码”。 The result is:结果是:

<div id="paypal-button-container"></div>
<script src="https://www.paypal.com/sdk/js?client-id=XXX&vault=true" data-sdk-integration-source="button-factory"></script>
<script>
  paypal.Buttons({
      ....
      createSubscription: function(data, actions) {
        return actions.subscription.create({
          'plan_id': 'P-YYYY'
        });
      },
      onApprove: function(data, actions) {
        alert(data.subscriptionID);
      }
  }).render('#paypal-button-container');
</script>

Is there a way to enable sandbox for logging in?有没有办法启用沙箱登录? I see that I can create sandbox accounts at Developer Accounts page but the sandbox accounts created there do not work (I mean how is it supposed to know I am in 'sandbox mode'?)我看到我可以在开发人员帐户页面创建沙箱帐户,但在那里创建的沙箱帐户不起作用(我的意思是它怎么知道我处于“沙箱模式”?)

The sandbox and live environments are completely separate.沙盒和实时环境是完全分开的。

Using a sandbox business account, log into the www.sandbox.paypal.com environment, and then you can go to:使用沙盒企业账号,登录www.sandbox.paypal.com环境,即可进入:

https://www.sandbox.paypal.com/billing/overview (same as your link, but with ' sandbox. ' in the URL. https://www.sandbox.paypal.com/billing/overview (与您的链接相同,但 URL 中带有“ sandbox. ”。

Create sandbox plans there.在那里创建沙箱计划。 These sandbox subscriptions can be tested with sandbox personal accounts.这些沙盒订阅可以使用沙盒个人帐户进行测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Sandbox的PayPal按钮未显示 - PayPal button using Sandbox not showing Paypal 将自定义变量传递给订阅按钮 - Paypal pass custom variable to subscription button PayPal 智能按钮切换到订阅/定期捐赠 - PayPal smart button switch to subscription / recurring donation PayPal JS SDK 在沙盒模式下使用实时客户端加载? - PayPal JS SDK loading in sandbox mode with live clientid? RESOURCE_NOT_FOUND 在 JavaScript 中的 PayPal 中创建订阅 Api 响应时 - RESOURCE_NOT_FOUND while creating Subscription Api response in PayPal in JavaScript 使用 Javascript 智能按钮灯箱的 PayPal 访客订阅未关闭 - PayPal guest subscription using Javascript Smart Button light box is not closing 如何为多个计划呈现 Paypal 订阅的多个按钮? - How to render multiple button for Paypal subscription for more then one plan? 使用Paypal Cordova插件,无法使其在生产或沙箱模式下工作 - Using Paypal Cordova Plugin, cannot get it to work using production or sandbox mode PayPal 智能按钮(订阅)使用 paypal.FUNDING.CARD 按钮 update_client_config_error - PayPal Smart Buttons (Subscription) using paypal.FUNDING.CARD button update_client_config_error PayFast-沙盒网站上的订阅取消 - PayFast - Subscription cancellation on sandbox site
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM