# PayPal Payment Providers (Checkout)

This folder implements the two **Payment Module Providers** this plugin ships —
PayPal Buttons (`paypal`) and hosted card fields (`paypal_card`) — plus their
shared base class (`base-provider.ts`), which owns the money-critical logic
(capture reconciliation, refund amount validation, idempotency keys).

Register them in `medusa-config.ts` under the Payment module (see the package
README for the full config):

```ts
{
  resolve: "@medusajs/medusa/payment",
  options: {
    providers: [
      {
        resolve: "@easypayment/medusa-payment-paypal/providers/paypal",
        id: "paypal",
        options: {},
        dependencies: ["paypal_onboarding"],
      },
      {
        resolve: "@easypayment/medusa-payment-paypal/providers/paypal_card",
        id: "paypal_card",
        options: {},
        dependencies: ["paypal_onboarding"],
      },
    ],
  },
}
```

Then enable the providers in Admin → Settings → Regions → Payment Providers.
Their full ids are `pp_paypal_paypal` and `pp_paypal_card_paypal_card`
(exported from `../utils/provider-ids.ts`).
