代码之家  ›  专栏  ›  技术社区  ›  joost

如何使用Braintree JS SDK v3实现自定义PayPal按钮

  •  1
  • joost  · 技术社区  · 7 年前

    Braintree custom paypal button 可以使用自定义按钮启动PayPal支付过程。然而:我能找到的唯一文档是JS SDK v2,它们已经发展到了v3。

    更改日志位于 https://github.com/braintree/braintree-web/blob/master/CHANGELOG.md#300-beta1 特别声明 Developers have the option to customize the PayPal button that is displayed on their page. We provide only a bindable programmatic handler.

    如何使用现有按钮开始使用SDK的v3付款?

    1 回复  |  直到 7 年前
        1
  •  3
  •   Community CDub    5 年前

    充分披露:我在Braintree工作。如果您有任何其他问题,请随时联系 support

    自从 version 3.16.0 of Braintree's Javascript SDK ,原来的PayPal组件被弃用,取而代之的是由PayPal开发的新的“PayPal Checkout”组件。这个新组件完全由PayPal开发,与Braintree在旧组件中使用的集成相比,它提供了一些优势。旧组件能够完全使用定制的PayPal按钮,但新的“PayPal Checkout”组件没有。然而,它确实为按钮的外观提供了相当大的灵活性。

    在里面 PayPal's documentation for the "PayPal Checkout" component 你可以找到 instructions on how to customize the PayPal button . PayPal的文档将向您展示如何更改形状、颜色和使用的标签。

    您可以使用 Braintree checkout playground . 这使用PayPal的“PayPal checkout”组件运行Braintree checkout的实例。当您更改右侧的代码时,页面左侧的示例会自动更新。