javascript - 我需要 "Pro"Paypal 帐户才能使用 Payments API

标签 javascript paypal

如标题所问,我是否需要拥有“专业”帐户才能使用支付 API,特别是 CreatePayment 端点。

我不想使用 Paypal 结账,我只是想用它们来处理来 self 网站的付款。

我知道“功能”列表说自定义和页面 check out 需要专业帐户,但我不确定这是否指的是他们的 REST API。

所以基本上我想使用的是:

curl -v -X POST https://api.sandbox.paypal.com/v1/payments/payment \
-H "Content-Type:application/json" \
-H "Authorization: Bearer Access-Token" \
-d '{
  "intent": "sale",
  "payer": {
  "payment_method": "paypal"
  },
  "transactions": [
  {
    "amount": {
    "total": "30.11",
    "currency": "USD",
    "details": {
      "subtotal": "30.00",
      "tax": "0.07",
      "shipping": "0.03",
      "handling_fee": "1.00",
      "shipping_discount": "-1.00",
      "insurance": "0.01"
    }
    },
    "description": "This is the payment transaction description.",
    "custom": "EBAY_EMS_90048630024435",
    "invoice_number": "48787589673",
    "payment_options": {
    "allowed_payment_method": "INSTANT_FUNDING_SOURCE"
    },
    "soft_descriptor": "ECHI5786786",
    "item_list": {
    "items": [
      {
      "name": "hat",
      "description": "Brown color hat",
      "quantity": "5",
      "price": "3",
      "tax": "0.01",
      "sku": "1",
      "currency": "USD"
      },
      {
      "name": "handbag",
      "description": "Black color hand bag",
      "quantity": "1",
      "price": "15",
      "tax": "0.02",
      "sku": "product34",
      "currency": "USD"
      }
    ],
    "shipping_address": {
      "recipient_name": "Hello World",
      "line1": "4thFloor",
      "line2": "unit#34",
      "city": "SAn Jose",
      "country_code": "US",
      "postal_code": "95131",
      "phone": "011862212345678",
      "state": "CA"
    }
    }
  }
  ],
  "note_to_payer": "Contact us for any questions on your order.",
  "redirect_urls": {
  "return_url": "http://www.amazon.com",
  "cancel_url": "http://www.hawaii.com"
  }
}'

最佳答案

这取决于您对“我的网站”的定义有多严格。

不需要通过将访问者引导至 PayPal 通过 button redirect 来处理付款,您不需要 Pro 帐户。或 popup .

需要一个 Pro 帐户(和 SSL)以使用 Express Checkout 直接从您自己的页面处理付款,提供真正的“无缝”支付。

希望对您有所帮助! :)

关于javascript - 我需要 "Pro"Paypal 帐户才能使用 Payments API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42936332/

相关文章:

php - paypal 创建定期配置文件,显示下一个付款日期与配置文件开始日期相同

ruby-on-rails - paypal_adaptive gem 不工作?

php - 使用 PayPal IPN 将 payment_status 从 "Pending"更新为 "Completed"。它会重新发送 txn_id 吗?

ruby - 如何制作一个 Ruby 应用程序来向特定用户汇款?

javascript - 如何避免级联的 promise 和捕获?

javascript - Angularjs 对点击进行过滤

javascript - 检测主干模型更改以启用表单的保存按钮和更新模型

javascript - 如何让我的游戏发挥作用? ELI5

php - Braintree 付款 - 处理器拒绝(2409)沙盒交易错误

javascript - 用于预加载 Web 应用程序资源的 XMLHttpRequest 和 Service Worker API 之间有什么区别