diff --git a/README.md b/README.md index 0f377c9..e045d77 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,8 @@ Note that all 3 implementations produce the same results. return (
); @@ -205,7 +206,8 @@ import './App.css'; - {({initializePayment}) => } + {/* Updated usage: pass an object to initializePayment */} + {({initializePayment}) => } ); diff --git a/libs/types.ts b/libs/types.ts index 8ea3b3f..502fba7 100644 --- a/libs/types.ts +++ b/libs/types.ts @@ -21,10 +21,7 @@ interface PaystackCustomFields { } interface PaystackMetadata { - custom_fields: PaystackCustomFields[]; -} - -interface PaystackMetadata { + custom_fields?: PaystackCustomFields[]; [key: string]: any; } @@ -66,4 +63,4 @@ export type InitializePayment = (options: { }) => void; export type HookConfig = Omit, 'publicKey'> & - Pick; + Pick; \ No newline at end of file