Skip to content

Feat/add test endpoint#3

Merged
damilola-paystack merged 7 commits intomainfrom
feat/add-test-endpoint
Jan 26, 2026
Merged

Feat/add test endpoint#3
damilola-paystack merged 7 commits intomainfrom
feat/add-test-endpoint

Conversation

@Andrew-Paystack
Copy link
Collaborator

  • Updates the Paystack client request
  • Adds test secret key check

Copy link
Member

@damilola-paystack damilola-paystack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments

@@ -0,0 +1,23 @@
export interface PaystackResponse<T = any> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Andrew-Paystack, is there a reason for generic here if it defaults to any?

let pattern = r.definition.uri.replace(/\{[^}]+\}/g, '(.+)');


pattern = pattern
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Andrew-Paystack what are we trying to achieve here? It feels like we are over-engineering here

* Redact sensitive fields in card objects
* Only redacts cvv and number, keeps other fields visible
*/
function redactCardObject(card: any): any {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this function being used? If so how is it being used? There's no endpoint that allows passing card details and responses containing card details are masked already

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@damilola-paystack the function is called in the redactSensitiveData part and it just checks if someone has passed a card object.

Copy link
Member

@damilola-paystack damilola-paystack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we still need to clean up later, so let's merge and review further when the initial features are done

@damilola-paystack damilola-paystack merged commit 26d6029 into main Jan 26, 2026
@damilola-paystack damilola-paystack deleted the feat/add-test-endpoint branch January 26, 2026 09: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