Skip to content

Using the same library to process payment with 2 paymongo account #50

Open
@davidnjuko

Description

@davidnjuko

Describe the bug
We are using this library to process payment with different paymongo account in the same application runtime. Cause of the Singleton design pattern we sometime don't have the ref to the expected Paymongo instance.

To Reproduce
paymongo1 = new Paymongo("secretKey1");
...
paymongo2 = new Paymongo("another_secretKey");
...

Expected behavior
The constructor should double check the existing instance API Key to avoid this

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions