Skip to content

Commit c22424b

Browse files
committed
✨ feat(payment): add Coinbase provider across API and storefront
Changes made in this commit: - Modified: README.md, docs/payment-customization.md, go.mod, go.sum, internal/app.go, internal/handlers/private/*.go, internal/handlers/public/*.go, internal/middleware/*.go, internal/models/setting.go, internal/queries/*.go, internal/routes/*.go, internal/testutil/testdir.go, pkg/errors/errors.go, pkg/jwtutil/parser.go, pkg/litepay/{example_test.go,helper.go,helper_test.go,provider.go,provider_paypal.go,provider_spectrocoin.go,provider_stripe.go}, pkg/webutil/webutil.go, web/admin/{package.json,bun.lockb,src/lib/components/payment/{Paypal.svelte,Spectrocoin.svelte,Stripe.svelte},src/lib/composables/usePaymentSettings.ts,src/lib/constants/validation.ts,src/lib/types/models.ts,src/routes/settings/payment/+page.svelte}, web/site/{package.json,bun.lockb,src/lib/i18n/locales/{en.json,zh.json},src/lib/types/models.ts,src/lib/utils/payment.ts,src/routes/cart/+page.svelte} - Added: docs/api.md, internal/handlers/private/{install_test.go,setting_test.go}, internal/handlers/public/{cart_test.go,page_test.go,product_test.go,setting_test.go}, internal/testutil/testdb.go, migrations/20260127120000_coinbase.sql, pkg/litepay/{provider_coinbase.go,provider_coinbase_test.go}, web/admin/src/lib/components/payment/Coinbase.svelte - Deleted: none Key changes: - Add Coinbase as a first-class payment provider in backend litepay layer and settings model - Add migration and query updates for Coinbase configuration persistence - Expand private/public handlers and middleware behavior with broader test coverage - Add admin payment settings UI for Coinbase and update storefront checkout/cart payment mapping - Refresh API documentation and payment customization docs for the new provider
1 parent 1b9db0a commit c22424b

72 files changed

Lines changed: 3573 additions & 786 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,20 @@ To obtain a "Merchant ID", "Project (API) ID" and "Private key" in <a href="http
326326
> Please note that the "Private key" is confidential information that should be kept secure.
327327
328328

329+
#### Coinbase
330+
Coinbase Commerce is a cryptocurrency payment platform that allows businesses to accept payments in various cryptocurrencies including Bitcoin, Ethereum, Litecoin, and many others. It provides a simple and secure way to integrate crypto payments into your store.
331+
332+
To obtain an API Key for using the Coinbase Commerce API, follow these steps:
333+
334+
1. Create or log in to your <a href="https://commerce.coinbase.com" target="_blank">Coinbase Commerce</a> account.
335+
2. Navigate to the **Settings** section.
336+
3. Under the **API Keys** tab, click **Create an API Key**.
337+
4. Copy the generated API Key and save it securely.
338+
339+
> [!WARNING]
340+
> Please note that the "API Key" is confidential information that should be kept secure.
341+
342+
329343
#### Dummy Payment
330344
Dummy Payment is a built-in payment provider that comes pre-configured with litecart. It is designed for processing free products (products with a price of $0) and does not require any external payment system integration or API keys.
331345

@@ -429,7 +443,8 @@ For detailed information on how to customize the site design and deploy it on a
429443
- [ ] Payment Adyen
430444
- [ ] Payment Checkout
431445
- [ ] Payment via Webhook
432-
- [x] <a href="#spectrocoin">Support for payment using crypto</a>
446+
- [x] <a href="#spectrocoin">Support for payment using crypto (SpectroCoin)</a>
447+
- [x] <a href="#coinbase">Coinbase Commerce crypto payments</a>
433448
- [x] Support WebHook (<a href="https://github.com/msalbrain" target="_blank">@nicksnyder</a> in <a href="https://github.com/shurco/litecart/pull/61" target="_blank">#61</a>)
434449
- [x] <a href="#dummy-payment">Dummy Payment</a> (<a href="https://github.com/majiayu000" target="_blank">@majiayu000</a> in <a href="https://github.com/shurco/litecart/pull/261" target="_blank">#261</a>)
435450

0 commit comments

Comments
 (0)