
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
@djangocfg/ext-payments
Advanced tools
Payment processing and subscription management extension for DjangoCFG.
Part of DjangoCFG — modern Django framework for production-ready SaaS applications.
pnpm add @djangocfg/ext-payments
import { PaymentsExtensionProvider } from '@djangocfg/ext-payments/hooks';
export default function RootLayout({ children }) {
return (
<PaymentsExtensionProvider>
{children}
</PaymentsExtensionProvider>
);
}
import { usePaymentsContext } from '@djangocfg/ext-payments/hooks';
function CheckoutPage() {
const { createPayment, isCreatingPayment } = usePaymentsContext();
const handleCheckout = async () => {
const payment = await createPayment({
amount: 99.99,
currency: 'USD',
description: 'Premium subscription',
success_url: '/success',
cancel_url: '/cancel',
});
// Redirect to payment URL
window.location.href = payment.payment_url;
};
return (
<button onClick={handleCheckout} disabled={isCreatingPayment}>
{isCreatingPayment ? 'Processing...' : 'Pay $99.99'}
</button>
);
}
import { useBalancesContext } from '@djangocfg/ext-payments/hooks';
function WalletPage() {
const { balances, isLoadingBalances, refreshBalances } = useBalancesContext();
return (
<div>
<h2>Your Balances</h2>
<button onClick={refreshBalances}>Refresh</button>
{balances?.map(balance => (
<div key={balance.currency}>
<strong>{balance.currency}:</strong> {balance.amount}
</div>
))}
</div>
);
}
import { useCurrenciesContext } from '@djangocfg/ext-payments/hooks';
function CurrencySelector() {
const { currencies, selectedCurrency, setCurrency } = useCurrenciesContext();
return (
<select
value={selectedCurrency?.code}
onChange={(e) => {
const currency = currencies.find(c => c.code === e.target.value);
if (currency) setCurrency(currency);
}}
>
{currencies.map(currency => (
<option key={currency.code} value={currency.code}>
{currency.name} ({currency.symbol})
</option>
))}
</select>
);
}
import { usePaymentsContext } from '@djangocfg/ext-payments/hooks';
function TransactionsPage() {
const { payments, isLoadingPayments } = usePaymentsContext();
return (
<div>
<h2>Transaction History</h2>
{payments.map(payment => (
<div key={payment.id}>
<span>{payment.description}</span>
<span>{payment.amount} {payment.currency}</span>
<span>Status: {payment.status}</span>
<span>{new Date(payment.created_at).toLocaleDateString()}</span>
</div>
))}
</div>
);
}
import { useOverviewContext } from '@djangocfg/ext-payments/hooks';
function DashboardPage() {
const { overview, isLoadingOverview } = useOverviewContext();
if (isLoadingOverview) return <div>Loading...</div>;
return (
<div>
<h2>Payment Overview</h2>
<div>
<p>Total Revenue: ${overview.total_revenue}</p>
<p>Pending Payments: {overview.pending_count}</p>
<p>Completed Payments: {overview.completed_count}</p>
<p>This Month: ${overview.current_month_revenue}</p>
</div>
</div>
);
}
payments - List of all paymentscreatePayment(data) - Create new paymentgetPaymentById(id) - Get payment detailscancelPayment(id) - Cancel paymentisLoadingPayments - Loading statebalances - User's cryptocurrency balancesrefreshBalances() - Refresh balance dataisLoadingBalances - Loading statecurrencies - Available cryptocurrenciesselectedCurrency - Currently selected currencysetCurrency(currency) - Set active currencygetCurrencyByCode(code) - Get currency detailsoverview - Payment statistics and analyticsrefreshOverview() - Refresh overview dataisLoadingOverview - Loading statecurrencies - Global currencies listrefreshCurrencies() - Refresh currency dataisLoadingCurrencies - Loading stateMIT
FAQs
Payments system extension for DjangoCFG
We found that @djangocfg/ext-payments demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.