Netopia Payment Gateway Support for Vanilo (Laravel)
Being a Concord Module it is intended to be used by Laravel Applications.
Refer to the markdown files in the docs folder.
The library works but there's space for improvement.
It's completely untested at the moment, thus it may or may not work
It's completely untested at the moment.
- Use the test cards from the doc to generate scenarios for various failed cases
- Catch the XML responses, add them to unit tests and check them specifically
- Successful Payment. Covered.
- Expired Card. Covered.
- Partial refund. Covered.
- Complete refund. Covered.
- Transaction Declined. Covered.
- Insufficient funds. No unit test coverage.
- Incorrect CVV2/CCV. No unit test coverage.
- Transaction not permitted (eg. card not enrolled). No unit test coverage.
- Risky card detected (eg. stolen card). No unit test coverage.
- Error at the origin Bank (eg. can't connect to the Bank). No unit test coverage.
During tests, I created a test account at Netopia and generated test keys, to establish close to real life scenarios during unit tests.
There were issues with simulating the encrypted messages generated by Netopia using the actual keys. The tests use a locally generated RSA key pair for this functionality. It seems to do the job, but if we find to cause of the issue, let's use actual Netopia keys.
Netopia returns the following data which we should record locally:
pan_masked(card number digits eg. 4****2806)
Netopia supports SMS payments. Likely won't be implemented here as it's more for micro payments, but hell, who knows 🤷