antarahealth / mpesa

This is a php implementation of Safaricom MPESA API(DARAJA)
MIT License
45 stars 58 forks source link

Warning: curl_setopt(): supplied resource is not a valid cURL handle resource in /Users/lily/mpesa/vendor/kabangi/mpesa/src/Mpesa/Engine/CurlRequest.php on line 15 #4

Closed danielin closed 6 years ago

danielin commented 6 years ago

This is the test code: `<?php require "vendor/autoload.php";

use Kabangi\Mpesa\Native\Mpesa;

$mpesa = new Mpesa();

$response = $mpesa->STKPush([ 'amount' => 10, 'PartyA' => '254713963186', 'PhoneNumber' => '254713963186', 'CallBackURL' => 'https://example.com/v1/payments/C2B/confirmation', 'AccountReference' => 'test', 'TransactionDesc' => 'Test' ]); header('Content-Type: application/json'); echo json_encode($response);`

This is the whole error page:

`

( ! ) Warning: curl_setopt(): supplied resource is not a valid cURL handle resource in /Users/lily/mpesa/vendor/kabangi/mpesa/src/Mpesa/Engine/CurlRequest.php on line 15

1 | 0.0178 | 400832 | {main}( ) | .../test.php:0 2 | 0.1002 | 1134120 | Kabangi\Mpesa\Native\Mpesa->STKPush( ) | .../test.php:9 3 | 0.1079 | 1195984 | Kabangi\Mpesa\LipaNaMpesaOnline\STKPush->submit( ) | .../MpesaTrait.php:18 4 | 0.1154 | 1199848 | Kabangi\Mpesa\Engine\Core->makePostRequest( ) | .../STKPush.php:75 5 | 0.9990 | 1199792 | Kabangi\Mpesa\Engine\Core->request( ) | .../Core.php:151 6 | 1.0114 | 1227976 | Kabangi\Mpesa\Engine\CurlRequest->setOption( ) | .../Core.php:164 7 | 1.0114 | 1227976 | curl_setopt ( ) | .../CurlRequest.php:15

`

Kabangi commented 6 years ago

Fixed on the latest version.

Thanks for reporting

danielin commented 6 years ago

Hi Julius, May I know which company are you working for now?

Daniel

On 5 March 2018 at 12:49, Julius Kamiri notifications@github.com wrote:

Fixed on the latest version.

Thanks for reporting

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Kabangi/mpesa/issues/4#issuecomment-370365149, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQB4gd_0AqqTtu_bI8SGlllVyrWELXQks5tbQozgaJpZM4SbStj .

Kabangi commented 6 years ago

Working for “ConnectHealth, Inc.” why if you do not mind? On Tue, 6 Mar 2018 at 00:15, danielin notifications@github.com wrote:

Hi Julius, May I know which company are you working for now?

Daniel

On 5 March 2018 at 12:49, Julius Kamiri notifications@github.com wrote:

Fixed on the latest version.

Thanks for reporting

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Kabangi/mpesa/issues/4#issuecomment-370365149, or mute the thread < https://github.com/notifications/unsubscribe-auth/ABQB4gd_0AqqTtu_bI8SGlllVyrWELXQks5tbQozgaJpZM4SbStj

.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/Kabangi/mpesa/issues/4#issuecomment-370568316, or mute the thread https://github.com/notifications/unsubscribe-auth/AIO5GJHf3m2f4_C8fe7rODs2epP2vXxVks5tbar6gaJpZM4SbStj .

danielin commented 6 years ago

Just being curious, I admired your skills. Maybe we can work out something together.

BTW, as a info exchange, I work for Tecno now.

On 6 March 2018 at 11:33, Julius Kamiri notifications@github.com wrote:

Working for “ConnectHealth, Inc.” why if you do not mind? On Tue, 6 Mar 2018 at 00:15, danielin notifications@github.com wrote:

Hi Julius, May I know which company are you working for now?

Daniel

On 5 March 2018 at 12:49, Julius Kamiri notifications@github.com wrote:

Fixed on the latest version.

Thanks for reporting

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Kabangi/mpesa/issues/4#issuecomment-370365149, or mute the thread < https://github.com/notifications/unsubscribe-auth/ABQB4gd_0AqqTtu_ bI8SGlllVyrWELXQks5tbQozgaJpZM4SbStj

.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/Kabangi/mpesa/issues/4#issuecomment-370568316, or mute the thread https://github.com/notifications/unsubscribe-auth/AIO5GJHf3m2f4_ C8fe7rODs2epP2vXxVks5tbar6gaJpZM4SbStj .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Kabangi/mpesa/issues/4#issuecomment-370703626, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQB4iByM3iSNTAl74p2Au0Dt-T9iMl_ks5tbknlgaJpZM4SbStj .