How paypal/paypal-php-server-sdk works
Project type and purpose
• This is a PHP-based SDK (client library) for PayPal’s REST APIs (Orders, Payments, Vault).
• It is not a standalone web app or microservice; it’s an integration library meant to be embedded in PHP applications.
File structure
• Top-level:
– src/ : implementation code
– doc/ : markdown docs for controllers, models, API usage
– composer.json : dependency and autoload config
• Under src/:
– Authentication/ : OAuth2 client-credentials grant
– Controllers/ : wrapper classes for OrdersController, PaymentsController, VaultController
– Http/ : HTTP request/response abstraction + callback hooks
– Logging/ : request/response logging configuration builders
– Models/ & Models/Builders/ : data model classes + builder classes for each model
– PaypalServerSdkClientBuilder, Server.php, Utils/ : top-level client initialization and compatibility helpers
• No database, no UI, no background job workers—this is a pure API client.
README for additional insights
• The README spells out supported API endpoints, configuration parameters (environment, retries, logging, auth).
• Shows example of PagerServerSdkClientBuilder → configure client credentials, environment, logging → build(); → call controller methods.
• Points to doc/ for details on each controller and model.