
Hi Skunks, I need help with the above. Everything works well on non-https IP but gives certificate error when connected to https IP provided by the broker. Please guide if you've successfully implemented this before. Kind regards, Joseph

Hi Joseph, I believe that you were issued with a certificate and am assuming that you are connecting to the test broker. I don't know what programming language you are using but in Java you can use a trust store an a key store. In my case, I converted the certificate into a .p12 and then set the system properties as below: System.setProperty("javax.net.ssl.trustStore", "keystore_name"); System.setProperty("javax.net.ssl.trustStorePassword", "keystore_password"); System.setProperty("javax.net.ssl.keyStoreType", "pkcs12"); System.setProperty("javax.net.ssl.keyStore","mycertificate.p12"); System.setProperty("javax.net.ssl.keyStorePassword", "certificate_password"); Regards, Jesse M. On Wed, Sep 9, 2015 at 8:54 AM, Joseph Tintale via skunkworks < skunkworks@lists.my.co.ke> wrote:
Hi Skunks, I need help with the above. Everything works well on non-https IP but gives certificate error when connected to https IP provided by the broker.
Please guide if you've successfully implemented this before.
Kind regards, Joseph
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

Hi Jesse, Thank you for the quick response. I'm using PHP running on an Apache server. I was issued with a .pem certificate. I have tried extracting the .pem to multiple files using openssl but doesn't seem to work. Anyone with a working solution for Apache setup? Kind regards, Joseph On 9 Sep 2015 9:49 am, "Jesse M" <jaysie05@gmail.com> wrote:
Hi Joseph,
I believe that you were issued with a certificate and am assuming that you are connecting to the test broker. I don't know what programming language you are using but in Java you can use a trust store an a key store. In my case, I converted the certificate into a .p12 and then set the system properties as below: System.setProperty("javax.net.ssl.trustStore", "keystore_name"); System.setProperty("javax.net.ssl.trustStorePassword", "keystore_password"); System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
System.setProperty("javax.net.ssl.keyStore","mycertificate.p12"); System.setProperty("javax.net.ssl.keyStorePassword", "certificate_password");
Regards,
Jesse M.
On Wed, Sep 9, 2015 at 8:54 AM, Joseph Tintale via skunkworks < skunkworks@lists.my.co.ke> wrote:
Hi Skunks, I need help with the above. Everything works well on non-https IP but gives certificate error when connected to https IP provided by the broker.
Please guide if you've successfully implemented this before.
Kind regards, Joseph
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

If you are using curl in php then this may be usefull: $certPath = "**absolute path to your certificate on server **"; curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($this->curl, CURLOPT_SSLCERT, $certPath); curl_setopt($this->curl, CURLOPT_SSLCERTTYPE, "PEM");
Hi Jesse, Thank you for the quick response. I'm using PHP running on an Apache server. I was issued with a .pem certificate. I have tried extracting the .pem to multiple files using openssl but doesn't seem to work.
Anyone with a working solution for Apache setup?
Kind regards, Joseph
On 9 Sep 2015 9:49 am, "Jesse M" <jaysie05@gmail.com <mailto:jaysie05@gmail.com>> wrote:
Hi Joseph,
I believe that you were issued with a certificate and am assuming that you are connecting to the test broker. I don't know what programming language you are using but in Java you can use a trust store an a key store. In my case, I converted the certificate into a .p12 and then set the system properties as below: System.setProperty("javax.net.ssl.trustStore", "keystore_name"); System.setProperty("javax.net.ssl.trustStorePassword", "keystore_password"); System.setProperty("javax.net.ssl.keyStoreType", "pkcs12"); System.setProperty("javax.net.ssl.keyStore","mycertificate.p12"); System.setProperty("javax.net.ssl.keyStorePassword", "certificate_password");
Regards,
Jesse M.
On Wed, Sep 9, 2015 at 8:54 AM, Joseph Tintale via skunkworks <skunkworks@lists.my.co.ke <mailto:skunkworks@lists.my.co.ke>> wrote:
Hi Skunks, I need help with the above. Everything works well on non-https IP but gives certificate error when connected to https IP provided by the broker.
Please guide if you've successfully implemented this before.
Kind regards, Joseph
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke <mailto:skunkworks@lists.my.co.ke> ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

Thanks guys this helped. Problem was with the issued cert, someone else can tampered with. The curl option worked fine. @Stephen Njoroge, I'm doing the integration for someone, I think to get access to the API you'll have to contact safcom. Regards, Joseph On 9 Sep 2015 12:58 pm, "Michael Pedersen via skunkworks" < skunkworks@lists.my.co.ke> wrote:
If you are using curl in php then this may be usefull:
$certPath = "**absolute path to your certificate on server **"; curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($this->curl, CURLOPT_SSLCERT, $certPath); curl_setopt($this->curl, CURLOPT_SSLCERTTYPE, "PEM");
Hi Jesse, Thank you for the quick response. I'm using PHP running on an Apache server. I was issued with a .pem certificate. I have tried extracting the .pem to multiple files using openssl but doesn't seem to work.
Anyone with a working solution for Apache setup?
Kind regards, Joseph On 9 Sep 2015 9:49 am, "Jesse M" <jaysie05@gmail.com> wrote:
Hi Joseph,
I believe that you were issued with a certificate and am assuming that you are connecting to the test broker. I don't know what programming language you are using but in Java you can use a trust store an a key store. In my case, I converted the certificate into a .p12 and then set the system properties as below: System.setProperty("javax.net.ssl.trustStore", "keystore_name"); System.setProperty("javax.net.ssl.trustStorePassword", "keystore_password"); System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
System.setProperty("javax.net.ssl.keyStore","mycertificate.p12"); System.setProperty("javax.net.ssl.keyStorePassword", "certificate_password");
Regards,
Jesse M.
On Wed, Sep 9, 2015 at 8:54 AM, Joseph Tintale via skunkworks < skunkworks@lists.my.co.ke> wrote:
Hi Skunks, I need help with the above. Everything works well on non-https IP but gives certificate error when connected to https IP provided by the broker.
Please guide if you've successfully implemented this before.
Kind regards, Joseph
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
_______________________________________________ skunkworks mailing listskunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribehttp://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Ruleshttp://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

Hi Skunks, I'm getting the below response from m-pesa through the callback url i specified. I have tried parse it to an array but without success. Anyone using PHP who has already managed? TIA. <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body><res:ResultMsg xmlns:res=" http://api-v1.gen.mm.vodafone.com/mminterface/result"> <![CDATA[<?xml version="1.0" encoding="UTF-8"?><Result xmlns=" http://api-v1.gen.mm.vodafone.com/mminterface/result"> <ResultType>0</ResultType> <ResultCode>2001</ResultCode> <ResultDesc>The initiator information is invalid.</ResultDesc> <OriginatorConversationID>100250_xxxxxxx_162958</OriginatorConversationID> <ConversationID>FM_20150915_00004dsd817138aa771</ConversationID> <TransactionID>JIF000000</TransactionID> <ReferenceData> <ReferenceItem> <Key>QueueTimeoutURL</Key> <Value>http://IPADDRESS/mpesa_response.php</Value> </ReferenceItem> </ReferenceData> </Result>]]> </res:ResultMsg></soapenv:Body></soapenv:Envelope> On Wed, Sep 9, 2015 at 2:00 PM, Joseph Tintale via skunkworks < skunkworks@lists.my.co.ke> wrote:
Thanks guys this helped. Problem was with the issued cert, someone else can tampered with.
The curl option worked fine.
@Stephen Njoroge, I'm doing the integration for someone, I think to get access to the API you'll have to contact safcom.
Regards, Joseph On 9 Sep 2015 12:58 pm, "Michael Pedersen via skunkworks" < skunkworks@lists.my.co.ke> wrote:
If you are using curl in php then this may be usefull:
$certPath = "**absolute path to your certificate on server **"; curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($this->curl, CURLOPT_SSLCERT, $certPath); curl_setopt($this->curl, CURLOPT_SSLCERTTYPE, "PEM");
Hi Jesse, Thank you for the quick response. I'm using PHP running on an Apache server. I was issued with a .pem certificate. I have tried extracting the .pem to multiple files using openssl but doesn't seem to work.
Anyone with a working solution for Apache setup?
Kind regards, Joseph On 9 Sep 2015 9:49 am, "Jesse M" <jaysie05@gmail.com> wrote:
Hi Joseph,
I believe that you were issued with a certificate and am assuming that you are connecting to the test broker. I don't know what programming language you are using but in Java you can use a trust store an a key store. In my case, I converted the certificate into a .p12 and then set the system properties as below: System.setProperty("javax.net.ssl.trustStore", "keystore_name"); System.setProperty("javax.net.ssl.trustStorePassword", "keystore_password"); System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
System.setProperty("javax.net.ssl.keyStore","mycertificate.p12"); System.setProperty("javax.net.ssl.keyStorePassword", "certificate_password");
Regards,
Jesse M.
On Wed, Sep 9, 2015 at 8:54 AM, Joseph Tintale via skunkworks < skunkworks@lists.my.co.ke> wrote:
Hi Skunks, I need help with the above. Everything works well on non-https IP but gives certificate error when connected to https IP provided by the broker.
Please guide if you've successfully implemented this before.
Kind regards, Joseph
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
_______________________________________________ skunkworks mailing listskunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribehttp://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Ruleshttp://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
participants (4)
-
Jesse M
-
Joseph Koech
-
Joseph Tintale
-
Michael Pedersen