{"id":47870926,"url":"https://github.com/reachweb/resrv-paypal","last_synced_at":"2026-04-04T00:50:58.419Z","repository":{"id":333101336,"uuid":"1136204124","full_name":"reachweb/resrv-paypal","owner":"reachweb","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-25T08:36:27.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-25T12:58:08.400Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reachweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-17T08:59:33.000Z","updated_at":"2026-02-25T08:36:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/reachweb/resrv-paypal","commit_stats":null,"previous_names":["reachweb/resrv-paypal"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reachweb/resrv-paypal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reachweb%2Fresrv-paypal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reachweb%2Fresrv-paypal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reachweb%2Fresrv-paypal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reachweb%2Fresrv-paypal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reachweb","download_url":"https://codeload.github.com/reachweb/resrv-paypal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reachweb%2Fresrv-paypal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31383635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T23:20:52.058Z","status":"ssl_error","status_checked_at":"2026-04-03T23:20:51.675Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T00:50:57.828Z","updated_at":"2026-04-04T00:50:58.410Z","avatar_url":"https://github.com/reachweb.png","language":"PHP","funding_links":["https://developer.paypal.com/","https://developer.paypal.com/docs/api/webhooks/v1/","https://developer.paypal.com/tools/sandbox/","https://developer.paypal.com/docs/reports/reference/paypal-supported-currencies/"],"categories":[],"sub_categories":[],"readme":"# Resrv PayPal Payment Gateway\n\nPayPal payment gateway add-on for [Statamic Resrv](https://github.com/reachweb/statamic-resrv).\n\n## Features\n\n- **PayPal Wallet Payments** - Users can pay with their PayPal account\n- **Direct Card Payments** - Credit/debit card fields rendered directly on your checkout page (Advanced Credit and Debit Card Payments)\n- **No Redirects** - Payment handled inline via PayPal JavaScript SDK\n- **Secure** - PCI-compliant hosted card fields, webhook signature verification\n\n## Requirements\n\n- PHP 8.2+\n- Laravel 11.x\n- Statamic 5.x\n- Statamic Resrv 5.x\n- PayPal Business Account with Advanced Credit and Debit Card Payments enabled (for card fields)\n\n## Installation\n\n```bash\ncomposer require reachweb/resrv-payment-paypal\n```\n\nOptionally publish the configuration:\n\n```bash\nphp artisan vendor:publish --tag=resrv-paypal-config\n```\n\n## PayPal Account Setup\n\n1. Go to the [PayPal Developer Dashboard](https://developer.paypal.com/)\n2. Create a new application (or use an existing one)\n3. Note your **Client ID** and **Client Secret** for both sandbox and live environments\n4. Enable **Advanced Credit and Debit Card Payments** in your app settings to allow direct card input\n\n\u003e **Tip:** Advanced Credit and Debit Card Payments (ACDC) is automatically enabled for sandbox accounts. For live accounts, you may need to request access through your PayPal account manager.\n\n## API Configuration\n\nAdd your PayPal credentials to your `.env` file:\n\n```env\nPAYPAL_CLIENT_ID=your_client_id\nPAYPAL_CLIENT_SECRET=your_client_secret\nPAYPAL_MODE=sandbox\nPAYPAL_WEBHOOK_ID=your_webhook_id\n```\n\nSet `PAYPAL_MODE` to `sandbox` for testing or `live` for production.\n\n\u003e **Important:** For security purposes, never commit your API credentials to version control. Always use environment variables.\n\nIf you have configuration caching enabled, clear it after updating your `.env` file:\n\n```bash\nphp artisan config:clear\n```\n\n## Webhook Configuration (Required)\n\nWebhooks are **mandatory** for the PayPal payment gateway. They ensure payment confirmations are received even if a customer closes their browser before returning to your site.\n\n### Setting up Webhooks\n\n1. In your PayPal Developer Dashboard, go to your application settings\n2. Navigate to **Webhooks** and click **Add Webhook**\n3. Enter your webhook URL: `https://yoursite.com/resrv/api/webhook`\n4. Subscribe to these events:\n   - `PAYMENT.CAPTURE.COMPLETED`\n   - `PAYMENT.CAPTURE.DENIED`\n   - `PAYMENT.CAPTURE.REFUNDED`\n5. Save the webhook and copy the **Webhook ID**\n6. Add the Webhook ID to your `.env` file:\n\n```env\nPAYPAL_WEBHOOK_ID=your_webhook_id\n```\n\n\u003e **Warning:** Without a valid `PAYPAL_WEBHOOK_ID`, webhook signature verification will fail and payment confirmations will be rejected with a 403 error.\n\n### Webhook Signature Verification\n\nThe gateway uses PayPal's [verify-webhook-signature API](https://developer.paypal.com/docs/api/webhooks/v1/#verify-webhook-signature) to validate all incoming webhook notifications. This ensures:\n\n- Webhooks actually come from PayPal\n- The payload hasn't been tampered with\n- Your application is protected from spoofing attacks\n\n## Payment Gateway Configuration\n\nUpdate your `config/resrv-config.php` file to use the PayPal payment gateway:\n\n```php\n'payment_gateway' =\u003e Reach\\ResrvPaymentPaypal\\Http\\Payment\\PaypalPaymentGateway::class,\n```\n\n## Payment Flow\n\nThis gateway uses the PayPal JavaScript SDK for an inline payment experience. When a customer completes a reservation:\n\n1. The checkout page displays PayPal buttons and card fields inline\n2. Customer can either:\n   - Click the **PayPal button** to pay via PayPal wallet (opens popup)\n   - Enter card details directly in the **card fields** on your page\n3. Payment is captured via your server\n4. Customer is redirected to the checkout completion page\n5. PayPal sends a webhook notification\n6. The webhook signature is verified\n7. The reservation is confirmed\n\n### Payment Options Displayed\n\n- **PayPal Button** - Opens PayPal popup for wallet payments, Pay Later, Venmo (US)\n- **Card Fields** - Direct card number, expiry, CVV, and cardholder name input (requires ACDC enabled)\n\nIf Advanced Credit and Debit Card Payments is not enabled for your account, only the PayPal button will be displayed.\n\n## Customizing the Payment View\n\nThe package provides a default checkout payment view. To customize the styling or layout:\n\n```bash\nphp artisan vendor:publish --tag=resrv-paypal-views\n```\n\nThis publishes the view to `resources/views/vendor/statamic-resrv/livewire/checkout-payment.blade.php`.\n\nYou can customize:\n- Button colors and styles\n- Card field container styling\n- Labels and translations\n- Layout and spacing\n\n## Going Live\n\nBefore accepting live payments:\n\n1. Test thoroughly in sandbox mode with [PayPal sandbox accounts](https://developer.paypal.com/tools/sandbox/)\n2. Create a live webhook in your PayPal application with the same events\n3. Ensure Advanced Credit and Debit Card Payments is enabled for your live app\n4. Update your `.env` file with live credentials:\n\n```env\nPAYPAL_CLIENT_ID=your_live_client_id\nPAYPAL_CLIENT_SECRET=your_live_client_secret\nPAYPAL_MODE=live\nPAYPAL_WEBHOOK_ID=your_live_webhook_id\n```\n\n5. Clear the configuration cache:\n\n```bash\nphp artisan config:clear\n```\n\n## Supported Currencies\n\nEnsure your Resrv currency configuration (`resrv-config.currency_isoCode`) uses a [PayPal-supported currency](https://developer.paypal.com/docs/reports/reference/paypal-supported-currencies/).\n\n## Troubleshooting\n\n### Card fields not appearing\n\nIf only the PayPal button appears without card fields:\n- Verify Advanced Credit and Debit Card Payments (ACDC) is enabled in your PayPal app settings\n- Check browser console for JavaScript errors\n- Ensure your PayPal Client ID is correct\n\n### Payments not being captured\n\nEnsure that:\n- Your PayPal API credentials are correct\n- The `PAYPAL_MODE` matches your credential type (sandbox/live)\n- Your server can make outbound HTTPS requests to PayPal's API\n\n### Webhook returns 403 error\n\nThis indicates webhook signature verification failed. Check that:\n- `PAYPAL_WEBHOOK_ID` is correctly set in your `.env` file\n- The webhook ID matches the webhook configured in your PayPal application\n- Your server time is synchronized (significant time drift can cause verification failures)\n\n### Webhook notifications not received\n\nVerify that:\n- Your webhook URL is publicly accessible\n- Your server is not blocking PayPal's IP addresses\n- The webhook is enabled in your PayPal Developer Dashboard\n- You've subscribed to the correct events\n\n### \"PayPal webhook ID is not configured\" error\n\nYou must set the `PAYPAL_WEBHOOK_ID` environment variable. Webhooks are mandatory for this payment gateway to function properly.\n\n### JavaScript SDK fails to load\n\nIf you see \"Failed to load PayPal SDK\" error:\n- Check browser console for specific error messages\n- Verify your `PAYPAL_CLIENT_ID` is correct\n- Ensure your domain is not blocked by PayPal\n- Check for Content Security Policy issues\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freachweb%2Fresrv-paypal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freachweb%2Fresrv-paypal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freachweb%2Fresrv-paypal/lists"}