You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

paymentService.ts 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { PaymentType, Transaction } from "@/types/payment";
  2. const dummyPaymentTypeData: PaymentType[] = [
  3. {
  4. id: 1,
  5. type: "Card",
  6. description: "Transfer via card number",
  7. icon_id: "card"
  8. },
  9. {
  10. id: 2,
  11. type: "FPX",
  12. description: "Transfer via card number",
  13. icon_id: "bank"
  14. }
  15. ]
  16. const transactionList: Transaction[] = [
  17. {
  18. id: 1,
  19. name: "Plan Payment",
  20. created_at: "2025-07-17T10:45:23.000Z",
  21. amount: -49.99,
  22. },
  23. {
  24. id: 2,
  25. name: "Top-up Credit",
  26. created_at: "2025-07-16T08:15:10.000Z",
  27. amount: 100.00,
  28. },
  29. {
  30. id: 3,
  31. name: "Refund Processed",
  32. created_at: "2025-07-15T14:32:45.000Z",
  33. amount: -25.00,
  34. },
  35. {
  36. id: 4,
  37. name: "Monthly Subscription",
  38. created_at: "2025-07-01T00:00:00.000Z",
  39. amount: 19.99,
  40. }
  41. ];
  42. export const getPaymentType = async (): Promise<PaymentType[] | undefined> => {
  43. return dummyPaymentTypeData
  44. }
  45. export const getAllTransaction = async (): Promise<Transaction[] | undefined> => {
  46. return transactionList
  47. }