PayPal Payments Add-on for HTML + PHP Shops
Take PayPal payments in the Code Craft PHP shops with PayPal Orders v2 and verified webhooks
Everything included
- PayPal Orders v2 (create, approve, capture)
- Sandbox and live modes
- Capture amount and currency checked against the order
- Webhooks verified with PayPal's verify-webhook-signature API
- A capture is never recorded twice
- Settings and licence key in Admin → Add-ons
From order to a live website
- 1
Buy the add-on
One-time price. Your download link and licence key arrive by email and in My Account.
- 2
Drop it in
Upload the folder into addons/ on your hosting.
- 3
Switch it on
Turn it on in Admin → Add-ons, add the licence key and your settings.
What it does
Adds PayPal as a payment method to the Code Craft HTML + PHP shop templates using PayPal's Orders v2 API. The customer approves the payment on PayPal; when they come back, the add-on captures it and marks the order paid only when PayPal reports a completed capture for the right amount and currency. Webhooks are accepted only after PayPal's own signature-verification API confirms them. You need your own PayPal business account. The add-on follows PayPal's Orders v2 documentation and was tested against mocked PayPal responses, not with real payments.
- PayPal Orders v2 (create, approve, capture)
- Sandbox and live modes
- Capture amount and currency checked against the order
- Webhooks verified with PayPal's verify-webhook-signature API
Works with
This add-on is for the 12 Code Craft HTML + PHP shop templates (Kora, Annapurna, Bunkar, Giftsy, Harit, Mithas, Nazar, Petal, PhoneZone, Pukka, Pustak, WoodCraft). It is sold separately and has its own licence key. Upload its folder into the website's addons/ folder and switch it on in Admin → Add-ons; no code changes.
- Site core 1.1 or later
- Drop-in folder, no code changes
- Its own settings screen and licence key
Who it is for
It is for owners of one of the 12 Code Craft HTML + PHP shop templates (Kora, Annapurna, Bunkar, Giftsy, Harit, Mithas, Nazar, Petal, PhoneZone, Pukka, Pustak and WoodCraft) who sell to customers abroad and want to accept PayPal, where buyers pay with their PayPal balance or a card through PayPal. You need a PayPal business account with a REST app on developer.paypal.com and, for the webhook, your site on HTTPS. Nothing is installed with Composer.
- One of the 12 shop templates, site core 1.1+
- PayPal business account and REST app
- HTTPS for the webhook
Setting it up
Upload the paypal folder into addons/, switch on PayPal payments in Admin → Add-ons and open its Settings. Sandbox mode is ticked by default: paste your sandbox app's Client ID and Secret from developer.paypal.com → Apps & Credentials, plus the add-on licence key. In the app's webhooks add the address shown on the settings screen, …/cc/endpoint.php?addon=paypal&action=webhook, with the event PAYMENT.CAPTURE.COMPLETED, then paste the Webhook ID PayPal shows. Change the name at checkout if you like (default: PayPal) and keep the method ticked in Admin → Shop → Payments. Untick Sandbox mode when you paste live credentials.
- Sandbox mode on by default
- Webhook ID format checked when you save
- Webhook URL printed on the settings screen
What the customer sees
After placing the order the customer is sent to PayPal to approve the payment for the order total. The add-on creates the PayPal order with the Orders v2 API (intent CAPTURE) using an OAuth token from your credentials. When they come back, it checks that the PayPal order belongs to this shop order and captures it; only a COMPLETED capture with the right currency and amount marks the order paid, and a different amount is recorded as a mismatch. If they cancel, the order stays pending and they can press Pay now on their order page. The webhook is accepted only after PayPal's verify-webhook-signature API answers SUCCESS for your Webhook ID.
- Approve on PayPal, capture on return
- Captured amount checked
- Webhooks verified by PayPal
Honest limits
It was tested only on local copies of the Kora and Pustak templates with real PHP 8.3 and every PayPal call answered by a mock server (47 checks per shop with the other gateways): the OAuth token, the order with the amount as a decimal string, a return with another PayPal order refused, a capture for a different amount not paid, an unverified webhook refused and a verified one accepted. It has not processed real money. Refunds and disputes are handled in your PayPal account. PayPal supports only some currencies; INR works only for Indian accounts paid in India.
- Mocked responses only
- Refunds are made in PayPal
- Check PayPal's currency list
After the payment: what you see in the admin
In Admin → Shop → Orders the order moves from pending to paid and the payment is recorded with PayPal's capture id. The customer gets the status email, and you get a payment email if owner notifications are on in Shop settings. A payment for the wrong amount or currency is not accepted: it is recorded as a mismatch, and a note on the order shows what was received and what was expected. A payment that arrives after you have already changed the order's status is recorded with a note asking you to check it. Problems talking to PayPal are written to the website's private log in data/.
- Payment recorded on the order
- Mismatch notes in the order history
- Errors in the private log
More ready-made websites
Built by the same team, with the same setup service and support.
Browse every ready-made website, or compare our custom website packages if you need a site designed from scratch. Want more guests to find you on Google Maps? See our local SEO service, or talk to our web design team.





