Paynow integration with laravel


#1

is there a package for laravel that i can use or how can i integrate with laravel


#2

You can use the PHP SDK for Paynow by including into your application using Composer. Instructions on how to install and use it are here: https://developers.paynow.co.zw/docs/php_quickstart.html


#3

feel free to use this Laravel service provider package https://github.com/musonza/paynow-sdk-php-laravel


#4

the Paynow::send($payment); is not working,
Seems as if your facade only allows the createPayment method only.


#5

Hey, I will take a look. Thanks


#6

This is already working.
What error are you getting?
Are you by any chance using the actual Paynow class instead of the Facade?
You can show me your class imports otherwise remove the use Paynow\Payments\Paynow or alias it if you have it in the same class that you are using the Facade.

I have added this test https://github.com/musonza/paynow-sdk-php-laravel/blob/35441263d857c9d813b02805671f88a3822aa69b/tests/PaynowServiceProviderTest.php#L43-L56 and i can confirm it has a send method since it’s pretty much a wrapper for the Paynow\Payments\Paynow class


#7

Ok, but had to use the default PHP SDK for Paynow and it has proved to be working though when i was including the facade i was using the use Paynow statement .Thanks for responding


#8

Hi @musonza, I tried using your package but it throws error see image attached.

It says that Paynow\Core\InitResponse->fail(‘invalid id.’). I’m using the sandbox API access key.


#9

There is no pre-determined sandbox API key. You should be using the API key from your Paynow account. The API key you get is in “sandbox” so long as its in testing mode.


#10

did you later find a working laravel integration?