-
Notifications
You must be signed in to change notification settings - Fork 0
Payment integration of SSLCommerz #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
syed-reza98
wants to merge
25
commits into
main
Choose a base branch
from
susmoypayment-intigation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added comprehensive documentation for payment API, dashboard UI, and integration plan. Introduced new payment-related API routes, components, and service files for SSLCommerz and payment orchestration. Updated Prisma schema for payment gateways and configurations. Initial UI pages for payment success/failure and dashboard settings are included.
Introduces a toast notification system using @radix-ui/react-toast with new UI components (toast, toaster, use-toast). Updates SSLCommerz webhook routes to improve metadata handling and standardize payment status values to 'SUCCEEDED' instead of 'PAID'. Adds @radix-ui/react-toast to dependencies.
Updated DATABASE_URL with new connection string.
Deleted the initial PostgreSQL migration SQL file. Updated prisma schema to add directUrl for Prisma Accelerate. Fixed organization store relation in setup-payment-configs API route. Added a test-connection script to verify Prisma database connectivity.
This reverts commit 1db9b61.
This reverts commit 3b03b3c.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
| */ | ||
|
|
||
| import { NextResponse } from 'next/server'; | ||
| import { getServerSession } from 'next-auth'; |
|
|
||
| import { NextResponse } from 'next/server'; | ||
| import { getServerSession } from 'next-auth'; | ||
| import { authOptions } from '@/lib/auth'; |
| if (validation.status === 'VALID' || validation.status === 'VALIDATED') { | ||
| const orderId = data.value_a; | ||
| const organizationId = data.value_b; | ||
| const storeId = data.value_c; |
|
|
||
| function SuccessContent() { | ||
| const searchParams = useSearchParams(); | ||
| const router = useRouter(); |
| DialogHeader, | ||
| DialogTitle, | ||
| } from '@/components/ui/dialog'; | ||
| import { CreditCard, Wallet, DollarSign, CheckCircle2, XCircle, Loader2, ArrowRight, History } from 'lucide-react'; |
| ]; | ||
|
|
||
| export default function PaymentSettingsPage() { | ||
| const { data: session } = useSession(); |
| * Shared type definitions for payment processing | ||
| */ | ||
|
|
||
| import { PaymentGateway, PaymentMethod, PaymentStatus as PrismaPaymentStatus } from '@prisma/client'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
Phase 1
Priority 1
question
Further information is requested
type:story
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces comprehensive support for the SSLCommerz payment gateway, including environment configuration, database setup, utility scripts for payment configuration management, and documentation updates. The changes ensure that organizations and stores are correctly linked to payment configurations, and provide tools to verify and automate the setup process for multi-tenant environments.
SSLCommerz Payment Gateway Integration
.env.examplefor store ID, password, sandbox mode, and API endpoints, enabling secure and configurable payment gateway integration.add-demo-payment-config.sqlto create a demo SSLCommerz payment configuration for an organization in the database.Utility Scripts for Payment Configuration
create-payment-config.mjs,create-all-payment-configs.mjs, andcheck-payment-config.mjsscripts to automate creation, verification, and listing of SSLCommerz payment configurations for organizations and stores. These scripts check for existing configs, create new ones as needed, and validate environment variables. [1] [2] [3]check-payment-setup.mjsto verify that all stores have matching payment configurations and report any mismatches, improving reliability for multi-tenant setups.Documentation and Developer Experience
.github/copilot-instructions.mdto clarify thatmiddleware.tsnow handles subdomain routing and authentication protection, and that protected routes are managed via aprotectedPathsarray. Instructions for adding protected routes and payment setup have been improved for clarity. [1] [2] [3] [4].vscode/mcp.jsonto support shadcn CLI in VSCode, streamlining component management for developers.These changes collectively improve payment gateway setup, multi-tenant support, and developer onboarding for the project.