diff --git a/assets/js/gateways/paypal-rest.js b/assets/js/gateways/paypal-rest.js new file mode 100644 index 000000000..2fec0613f --- /dev/null +++ b/assets/js/gateways/paypal-rest.js @@ -0,0 +1,134 @@ +/** + * PayPal REST Gateway - Checkout Branding. + * + * Styles the checkout submit button with official PayPal branding + * when PayPal is the active payment method. + * + * Per PayPal integration guidelines, PayPal buttons must be presented + * with equal prominence and official logos from approved sources. + */ +/* global wp */ +( function () { + + 'use strict'; + + const GATEWAY_ID = 'paypal-rest'; + const STYLE_ID = 'wu-paypal-btn-style'; + const ICON_CLASS = 'wu-paypal-btn-icon'; + + // Small PayPal "P" favicon from PayPal's CDN — square, won't overlap text. + const ICON_URL = 'https://www.paypalobjects.com/webstatic/icon/pp258.png'; + + /** + * Inject CSS for PayPal button colours. + * Using a