unicodeveloper / laravel-paystack

:credit_card: :package: :moneybag: Laravel 6, 7, 8, 9, 10 and 11 Package for Paystack
https://paystack.co
MIT License
605 stars 312 forks source link

Modify payment verification logic to accept external payment reference #50

Closed codenaz closed 4 years ago

codenaz commented 6 years ago

Currently, this library only verifies payments made by it self on the server side. In a case where paystack inline is used to make a transaction on the client side using libraries like react, Angular, Vue. It should be possible to verify that the transaction is valid before storing in the database or carrying out further actions on the server side. With this PR, providing just a transaction reference will be enough, and the method can be used like so $trxref = 'ghdjkfkj34224442'; //sample refrence Paystack::isTransactionVerificationValid($trxref);