chore: update iyzico integration and enhance payment processing logic
All checks were successful
Deploy / deploy (push) Successful in 7m0s
All checks were successful
Deploy / deploy (push) Successful in 7m0s
Refactored the iyzico payment integration to improve the handling of payment callbacks and order status updates. Added signature validation for responses to ensure data integrity. Enhanced the `initializeCheckoutForm` function to include buyer's name and surname, and updated the order schema to enforce unique constraints on iyzico tokens. Improved error handling and logging for payment processing, ensuring better tracking of payment states and issues. Updated the app database to reflect these changes.
This commit is contained in:
@@ -94,7 +94,13 @@ export const orders = sqliteTable(
|
||||
createdAt: integer("created_at", { mode: "timestamp" }).notNull(),
|
||||
paidAt: integer("paid_at", { mode: "timestamp" }),
|
||||
},
|
||||
(t) => [index("orders_user").on(t.userId)],
|
||||
(t) => [
|
||||
index("orders_user").on(t.userId),
|
||||
// Callback ve webhook siparişi token'dan bulur; UNIQUE aynı zamanda bir
|
||||
// token'ın iki siparişe bağlanmasını da imkânsız kılar (SQLite'ta çoklu
|
||||
// NULL serbesttir, token'sız pending siparişler etkilenmez).
|
||||
uniqueIndex("orders_iyzico_token").on(t.iyzicoToken),
|
||||
],
|
||||
);
|
||||
|
||||
export const creditLedger = sqliteTable(
|
||||
|
||||
Reference in New Issue
Block a user