Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11PayPal Payments Standard is a legacy hosted-checkout integration, not the pattern to choose for a new PHP project. If you are maintaining an existing Standard integration, keep its IPN listener isolated, validate each notification with PayPal before acting on it, and make fulfillment idempotent. For new work, use PayPal’s REST APIs with OAuth 2.0: obtain an access token, create an order, let the payer approve it, then capture the order from your server.
What “PHP cURL to PayPal Website Payments Standard” means
Payments Standard sends the buyer through a PayPal-hosted payment flow. A merchant can use Instant Payment Notification (IPN) to receive server-to-server notices about a payment or a later event. The notification is asynchronous: it is not the same thing as an immediate response to the buyer’s browser, and it must be validated before it is trusted.
As an Amazon Associate I earn from qualifying purchases.
PayPal labels the NVP/SOAP integration method legacy and says it accepts new integrations and supports existing ones, while recommending newer solutions for new integrations. That makes the title’s older PHP cURL pattern mainly relevant to maintaining or migrating an existing integration.
IPN and the customer’s return page do different jobs
The return page is part of the buyer-facing flow; an IPN listener is a separate server endpoint that PayPal calls. A customer returning to your site is not, by itself, reliable proof that payment completed. Conversely, IPN may arrive after the buyer has left, so it should not be the only mechanism for displaying an immediate transaction result.
#1 Best Overall
- Use the, easy-to-use, and customizable POS to get started.
- Accept contactless payments, chip cards, Apple Pay, and Google Pay from anywhere, with improved connectivity, extended battery life, and enhanced security. Pay one low rate for every tap or dip.
- No long-term commitments or contracts, no monthly fees- and with offline payments, keep taking payments for up to 24 hours.
- Safely and securely accepts payments anywhere. Plus, get data security, 24/7 fraud prevention, and payment-dispute management at no extra cost.
- Use the, easy-to-use, and customizable POS to get started.
Choose the flow that matches the work
| Choice | Best fit | What to account for |
|---|---|---|
| Payments Standard with IPN | Maintaining an existing hosted-checkout integration while it remains in use. | IPN is asynchronous. Read and validate the notification with PayPal before fulfillment, and handle repeated events safely. |
| REST Checkout with cURL | Building a new integration or moving away from the legacy flow. | Use OAuth 2.0 and JSON. The server creates an order, the payer approves it in checkout, and the server captures it. |
| IPN versus an immediate API result | IPN for server notifications about payment or later events; an API response when the application needs an immediate result from its own request. | Do not treat an asynchronous notification as a synchronous checkout response. |
| Hand-written cURL versus a server SDK | cURL when the team wants to implement the HTTP requests directly; a maintained server SDK when it supports the REST operations the application needs. | Whichever approach you use, retain the same environment separation, error handling, and safe fulfillment behavior. |
Build a current PHP cURL flow with REST
PayPal’s current server-side sequence is to request an OAuth access token, create an order with POST /v2/checkout/orders, have the payer approve that order through checkout, and capture it with POST /v2/checkout/orders/{ORDER_ID}/capture. REST requests use JSON and a Bearer access token. The order request includes the intent and purchase-unit amount data; use the values your application actually intends to charge.
Keep the environment consistent
For development, use sandbox credentials and the sandbox API base URL https://api-m.sandbox.paypal.com. For live payments, use live credentials and https://api-m.paypal.com. The endpoint, credentials, and notification configuration must belong to the same environment. PayPal says a Business account is needed to go live.
Rank #2
- Get your money as soon as the next business day.
- Get set up quickly with no long-term commitments. Download the Square Point of Sale app for free, create an account, and start taking payments anywhere.
- Run your business all in one place with the free Square Point of Sale app. Track your sales, manage inventory, accept tips, send receipts digitally, and more.
- Works with Apple devices with a Lightning connector.
Use a shared cURL helper for JSON requests
The following helper illustrates the common request mechanics for the create-order and capture calls. Supply a valid access token, the appropriate endpoint path, and a JSON payload for the operation. It deliberately treats HTTP errors as failures rather than assuming that a completed cURL transfer means a successful payment.
<?php
function paypalRequest(string $baseUrl, string $path, string $accessToken, ?array $payload = null): array
{
$ch = curl_init(rtrim($baseUrl, '/') . $path);
$headers = [
'Authorization: Bearer ' . $accessToken,
'Content-Type: application/json',
'Accept: application/json',
];
$options = [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_SSL_VERIFYPEER => true,
];
if ($payload !== null) {
$json = json_encode($payload, JSON_THROW_ON_ERROR);
$options[CURLOPT_POST] = true;
$options[CURLOPT_POSTFIELDS] = $json;
}
curl_setopt_array($ch, $options);
$body = curl_exec($ch);
$curlError = curl_error($ch);
$status = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($body === false) {
throw new RuntimeException('PayPal request failed: ' . $curlError);
}
$decoded = json_decode($body, true);
if ($status < 200 || $status >= 300) {
throw new RuntimeException('PayPal returned HTTP ' . $status . ': ' . $body);
}
if (!is_array($decoded)) {
throw new RuntimeException('PayPal returned an unreadable JSON response.');
}
return $decoded;
}
$baseUrl = 'https://api-m.sandbox.paypal.com';
// Obtain this token through PayPal OAuth using the sandbox app credentials.
$accessToken = $tokenFromOAuth;
$order = paypalRequest($baseUrl, '/v2/checkout/orders', $accessToken, $orderPayload);
// After the payer approves the order in checkout:
$orderId = $order['id'];
$capture = paypalRequest(
$baseUrl,
'/v2/checkout/orders/' . rawurlencode($orderId) . '/capture',
$accessToken,
[]
);
$orderPayload should contain the intent and purchase-unit amount data required for the order, and $tokenFromOAuth represents the access token acquired from PayPal’s OAuth flow; neither value should be hard-coded as a secret in source control. Use the approval experience for the order before attempting capture. Check the capture response and your order state before fulfilling; make the capture/fulfillment path safe to retry so a repeated request does not cause duplicate fulfillment.
Rank #3
- With Square Terminal, you can ring up sales, accept payments, and print receipts, all with one device. Use it at the counter or ring up customers anywhere in your store.
- Accept all major credit and debit cards and pay one low rate with no hidden fees and no long-term contracts.
- Process chip cards in just two seconds.
- Get your money as soon as the next business day.
- Use it cordlessly with the built-in battery, designed to last all day.
Handle failures and operational records
- Keep certificate verification enabled and set explicit connection and total timeouts; do not disable TLS verification to work around a connection problem.
- Treat every non-2xx HTTP response as an error that needs handling. Record useful request and response identifiers for support and reconciliation, but never log client secrets or access tokens.
- Keep sandbox and live credentials separate, and switch both the credentials and base URL together only after end-to-end sandbox testing.
- Design capture and fulfillment to be idempotent. A timeout can leave the caller uncertain whether a request completed, so retry logic must not blindly create a second fulfillment.
Maintain a legacy IPN listener safely
If an existing Payments Standard integration still depends on IPN, treat the listener as a verification endpoint, not as a public form that can directly mark an order paid. PayPal’s legacy IPN guidance describes reading the incoming POST, sending the message back to PayPal for validation over HTTPS, and acting only on PayPal’s documented validation result.
- Read the raw POST body as received by the listener. Do not reconstruct the notification from selected form fields.
- Append PayPal’s validation command to the received message and POST it over HTTPS to the validation endpoint for the matching sandbox or live environment.
- Accept the notification only when PayPal returns the documented validation result. Reject invalid or unverified messages without fulfilling the order.
- Acknowledge valid notifications promptly with HTTP 200, then process fulfillment safely and idempotently. Store enough event and order state to recognize an event you have already handled.
IPN is asynchronous, so keep the buyer-facing response separate from the listener’s work. If the page must show transaction information immediately, use an appropriate immediate response such as a response from your API flow rather than waiting for IPN.
Rank #4
- Pay one transparent rate per swipe for Visa, Mastercard, Discover and American Express.
- Works in conjunction with most downloadable Square point-of-sale apps on your device. Customers can pay, tip and sign directly on your device. Track payments in cash, gift cards and more. Also lets you send receipts via e-mail or text message, makes it easy to apply discounts, keeps a data and sales history log and more.
- Accepts magstripe credit card payments, including those from Visa, Mastercard, Discover and American Express (fees apply).
- App sends deposits to your bank account within 1 to 2 business days, or enjoy instant deposits (fees apply).
Plan the migration away from deprecated PHP SDKs
The PayPal-PHP-SDK and merchant-sdk-php repositories are deprecated. Their older documentation may still help explain a legacy codebase, but those libraries should not be the foundation of a new integration. For a migration, isolate the existing listener and legacy payment handling while existing transactions are retired, then move new checkout work to the current REST Orders and Payments APIs.
Quick Recap
Best Value
- COMPATIBILITY: Custom-designed protective case specifically made to fit PayPal card reader devices securely
- PROTECTION: Durable bumper design shields against drops, scratches, and daily wear while maintaining full device functionality
- ACCESS: Precisely cut openings ensure unrestricted access to all ports, buttons, and card slot without removing the case
- GRIP ENHANCEMENT: Textured exterior surface provides improved handling and prevents slipping during transactions
- PORTABLE DESIGN: Lightweight and slim profile allows for easy storage in pockets or bags while maintaining complete protection
- Inventory where the application creates payments, handles buyer returns, processes IPN, and marks orders fulfilled.
- Keep the legacy listener in place only for the existing flow that still needs it; do not mix its notification handling into the new REST order path.
- Implement the REST order, payer-approval, and capture sequence against sandbox credentials first.
- Test successful payment, failed requests, delayed notifications where applicable, and safe retries before switching live traffic.
PayPal documentation
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




