Archive for the ‘Payment Processors’ category

WooCommerce VoguePay, CashEnvoy and Eyowo plugins now written

February 10th, 2013

gatewaysSome background perhaps.. Nigeria, as a nation, has a huge amount of stigma around it after various different online scams and a general feel of corruption about it. In fact I am sorry to say that the people of Nigeria have it incredibly hard on the internet and to make money is especially difficult because the big reputable payment processors like PayPal are not available to them. This is rather frustrating because over the last few weeks I have met and worked with (even outsourced work to) various Nigerian people and I have not got a bad thing to say about any of them. It’s sad, in my opinion, that the lack of PayPal hinders international business the way it does.

Anyway, soap box aside, I have to say that, despite this hinderance, I have taken on and completed 5 or 6 different projects and am happy to tell you about three of them right now.

Ever since I wrote the WooCommerce Interswitch WebPay plugin a couple of months ago I have had a stream of communications with various Nigerian business people who are interested in having a variety of different gateways integrated for them. I am pleased to announce that I have now completed work on the following three plugins

  • WooCommerce VoguePay plugin
  • WooCommerce CashEnvoy plugin
  • WooCommerce Eyowo plugin

That’s the good news. The bad news is that they were written on commission and the source is not mine to distribute unlike with the Interswitch WebPay module. However, in the name of vanity, I am very pleased with my work on all of these plugins and am hoping that my name being attached to them will give the work a certain level of credibility. I will release the URLs where more information can be gathered about these modules when I receive work back from my clients.

If anyone has an interest in these or any other payment gateway integrations for WordPress or any platform then please do get in touch with me and I will gladly work with/for you to find the integration that is right for you.

Voguepay payment gateway for Exp:resso Store for ExpressionEngine

November 8th, 2012

I have just written a little extension for the Exp:resso Store extension for ExpressionEngine. It’s not a lot of code but, once again, opens the door for people in Nigeria to actually take payments via their website. This time it’s for EspressionEngine and not for WordPress, my CMS of choice.

It’s fairly simple to add but does require you FTP the flies up to the site. Now for the rest of this I am going to assume that you know how to use FTP and know where your ‘store’ directory is. ExpressionEngine isn’t something I use regularly so I shall stick to the  integration instructions for the moment.

Download

ExpressionEngine VoguePay module for Exp:resso Store (824 bytes)

Upload it to the following path:

expressionengine/third_party/store/ci-merchant/libraries/merchant/merchant_voguepay.php

File Changes

You need to edit the language file (I shall assume english in this case) to kind of register the gateway. Only two line additions for you to be aware of.

expressionengine/third_party/store/ci-merchant/language/english/merchant_lang.php

Add the following into the main array:

‘merchant_voguepay’ => ‘VoguePay’,
‘merchant_id’ => ‘VoguePay Merchant ID’,

The Code

For those interested this is the module itself.

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Merchant_voguepay extends Merchant_driver {
 public function default_settings() {
 return array(
 'merchant_id' => '',
 );
 }
public function purchase() {
 $request = array();
 $request['v_merchant_id'] = $this->setting('merchant_id');
 $request['merchant_ref'] = $this->param('order_id');
 $request['memo'] = $this->param('description');
 $request['total'] = $this->amount_cents();
 $request['success_url'] = $this->param('return_url');
 $request['fail_url'] = $this->param('return_url');
$this->post_redirect($this->_process_url(), $request, 'Redirecting.. please wait.');
 }
public function purchase_return() {
 if ($transaction_id = $this->CI->input->post('transaction_id')){
 if (@$_SERVER['HTTP_USER_AGENT'] == 'VoguePay server to server') {
 die();
 }

 $json = file_get_contents('https://voguepay.com/?v_transaction_id=' . $transaction_id . '&type=json');
 $transaction = json_decode($json, true);

 if ($transaction['transaction_id'] == '') {
 return new Merchant_response(Merchant_response::FAILED, lang('merchant_invalid_response'));
 } else if ($transaction['status'] != 'Approved') {
 return new Merchant_response(Merchant_response::FAILED, lang('merchant_payment_failed'));
 } else {
 $amount = $this->CI->input->post('total');
 return new Merchant_response(Merchant_response::COMPLETE, NULL, $transaction_id, $amount);
 }
 } 
 }
private function _process_url() {
 return 'https://voguepay.com/pay/';
 }
}
?>

This plugin was sponsored by Lagos Labs, a web design company based in Nigeria. You can demo their example implementation at http://www.lagoslabs.com/store/

WooCommerce Interswitch WebPay WordPress Plugin

October 24th, 2012

I have recently integrated the Interswitch WebPay payment gateway into the popular WooCommerce plugin for WordPress. It sends the user off to Interswitch to enter their payment information as normal. Then they return to the site with their information in POST it sends a CURL request to the Interswitch server which returns the payment status. If the status is positive then the order is set to Processed and the purchase process completed pending dispatch of the item(s). Id the CURL request returns an error then the message is presented to the user in conjunction with a ‘try again’ link which sends them off to Interswitch to enter their information again as per the requirements set out by Interswitch.

I opted to use the CURL method (relatively undocumented) of sale authentication because the SOAP Web service method (equally badly documented) wasn’t functioning on the client server at the time due to SOAP not being enabled. I presume that SOAP might not be available to a number of site owners and to avoid having them jump hoops in order to use the gateway CURL seemed sensible.

Any suggestiona for this plugin are welcome. A download link is below although I shall also be hosting it on the WordPress Plugin Directory and hopefully listed on the Woothemes.com site in their third party plugins section.

Download

Download available via the WordPress Repository by clicking here