Skip to content

Add mock Razorpay/PhonePe UPI test flow#1

Open
Copilot wants to merge 10 commits intomainfrom
copilot/add-mock-upi-payment-system
Open

Add mock Razorpay/PhonePe UPI test flow#1
Copilot wants to merge 10 commits intomainfrom
copilot/add-mock-upi-payment-system

Conversation

Copy link

Copilot AI commented Jan 24, 2026

Adds a mock Razorpay/PhonePe UPI payment flow for testing within the existing payment screen. The UI now supports simulated UPI requests with basic validation and mock reference generation.

  • Mock UPI setup UI
    • Provider selector (Razorpay/PhonePe), UPI ID input, and mock request generation block.
  • Validation + gating
    • Basic UPI ID format check and pay button enabled only after a mock request is generated for UPI.
  • Mock reference generation
    • Uses crypto APIs when available; deterministic fallback counter for consistent mock references.

Example:

const isUpiRequestValid = (upiId: string, mockUpiRef: string | null) =>
  Boolean(isUpiIdValid(upiId) && mockUpiRef);

const isPaymentReady =
  selectedMethod === 'card' || (selectedMethod === 'upi' && isUpiRequestValid(upiId, mockUpiRef));

Screenshot
Mock UPI setup

Original prompt

please research and add a mock razorpay or phone pay upi payment system for testing


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 9 commits January 24, 2026 07:41
Co-authored-by: amazonsingh <118895106+amazonsingh@users.noreply.github.com>
Co-authored-by: amazonsingh <118895106+amazonsingh@users.noreply.github.com>
Co-authored-by: amazonsingh <118895106+amazonsingh@users.noreply.github.com>
Co-authored-by: amazonsingh <118895106+amazonsingh@users.noreply.github.com>
Co-authored-by: amazonsingh <118895106+amazonsingh@users.noreply.github.com>
Co-authored-by: amazonsingh <118895106+amazonsingh@users.noreply.github.com>
Co-authored-by: amazonsingh <118895106+amazonsingh@users.noreply.github.com>
Co-authored-by: amazonsingh <118895106+amazonsingh@users.noreply.github.com>
Co-authored-by: amazonsingh <118895106+amazonsingh@users.noreply.github.com>
Copilot AI changed the title [WIP] Add mock Razorpay or PhonePe UPI payment system for testing Add mock Razorpay/PhonePe UPI test flow Jan 24, 2026
Copilot AI requested a review from amazonsingh January 24, 2026 07:59
@amazonsingh amazonsingh marked this pull request as ready for review January 24, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants