xoops forums

wishcraft

Module Developer
Posted on: 2011/1/16 4:41
wishcraft
wishcraft (Show more)
Module Developer
Posts: 3711
Since: 2007/5/18
#1

Xpayment 1.21

Resized Image
Xpayment 1.21
Modular Gateway and Modular Modules for Payment Transactions
Sponsored by My Digital Book

Xpayment is a module that allows you to write customised payment gateways, as well as having modular hooking stratum in the module with a second plugin section for modules and responses to invoices. Complete with Gateway plugins you can easily customise this module for your payment gateway in a few files.

There is many benefits to using xpayment as the standard for intergrating payment into your modules. It has a modular plugin system for gateway invoice responses so your module will know when an items has been paid for.

This is the new standard for gateway and payment solutions with XOOPS.

Some of the current features include:
  • Plugin Gateway systems (Paypal Included)
  • Modular Plugin and Action hook
  • Easy Form Post from any module
  • Itemised invoicing
  • Multicurrency
  • Tax Itemisation
  • Paid Validation
  • Actionablility time stamped


Runs On:
  • XOOPS 2.4.x
  • XOOPS 2.5.x
  • XOOPS 3.x (Soon)


Download: xoops2.5_xpayment_1.21.zip

Demo: xoops.demo.chronolabs.coop - You will need to install it.
Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/SimonXaies
github.com/Chronolabs-Cooperative
facebook.com/SimonSXaies

mariane

Theme Designer
Posted on: 2011/1/16 16:38
mariane
mariane (Show more)
Theme Designer
Posts: 649
Since: 2008/1/11
#2

Re: Xpayment 1.20

great work Simon,does the module support many gateway systems? or only paypal?
the road of success is always under construction

wishcraft

Module Developer
Posted on: 2011/1/17 6:23
wishcraft
wishcraft (Show more)
Module Developer
Posts: 3711
Since: 2007/5/18
#3

Re: Xpayment 1.20

Quote:

mariane wrote:
great work Simon,does the module support many gateway systems? or only paypal?


Hi mariane thanks for the enquiry. It comes with the gateway for paypal but it is designed to have customised gateway plugins written for it so you can have things like worldpay, 2c0, westpac any bank with a gateway or most credit card processing services work with it.

There is the following folder classes

/modules/xpayment
  
|- class
       |- 
gateway


The gateway class plugin belongs in a folder below the gateway class folder for example currently it looks like:

/modules/xpayment
  
|- class
       |- 
gateway
            
|- paypal *4
                  
|- language
                  
|       |-english
                  
|             |- paypal.php *1
                  
|- paypal.php *2
                  
|- gateway_info.php *3


*1 paypal.php - is a language file, it must adopt the same name as the folder that contains it in the gateway class folder.

*2 paypal.php - is the main plugin file for running the gateway the class in it adopts names from the folder (*4) and the extension of the the class name in this example is a class called PaypalGatewaysPlugin.

It has 5 functions that need to be in all plugins called goInvoiceObj, goActionCancel, goActionReturn, goIPN, getPaymentHTML the rest are stratum functions in this example.

*3 gateway_info.php - is the main information file for the gateway this includes fields for the gateway and options. (required)

*4 paypal - is the containing folder for the plugin.

If you where going to make a plugin for 2c0 lets say the folder structure would looks like:

/modules/xpayment
  
|- class
       |- 
gateway
            
|- 2c0 *4
                
|- language
                
|       |-english
                
|             |- 2c0.php *1
                
|- 2c0.php *2
                
|- gateway_info.php *3


*1 2c0.php - is a language file, it must adopt the same name as the folder that contains it in the gateway class folder.

*2 2c0.php - is the main plugin file for running the gateway the class in it adopts names from the folder (*4) and the extension of the the class name in this example is a class called 2c0GatewaysPlugin.

It needs to have 5 functions that need to be in all plugins called goInvoiceObj, goActionCancel, goActionReturn, goIPN, getPaymentHTML the rest is upto the developer.

*3 gateway_info.php - is the main information file for the gateway this includes fields for the gateway and options. (required)

*4 2c0 - is the containing folder for the plugin.

If you where going to make a plugin for WorldPay lets say the folder structure would looks like:

/modules/xpayment
  
|- class
       |- 
gateway
            
|- worldpay *4
                
|- language
                
|       |-english
                
|             |- worldpay.php *1
                
|- worldpay.php *2
                
|- gateway_info.php *3


*1 worldpay.php - is a language file, it must adopt the same name as the folder that contains it in the gateway class folder.

*2 worldpay.php - is the main plugin file for running the gateway the class in it adopts names from the folder (*4) and the extension of the the class name in this example is a class called WorldpayGatewaysPlugin.

It needs to have 5 functions that need to be in all plugins called goInvoiceObj, goActionCancel, goActionReturn, goIPN, getPaymentHTML the rest is upto the developer.

*3 gateway_info.php - is the main information file for the gateway this includes fields for the gateway and options. (required)

*4 worldpay - is the containing folder for the plugin

So yes it is designed for other gateways apart from paypal.
Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/SimonXaies
github.com/Chronolabs-Cooperative
facebook.com/SimonSXaies

mariane

Theme Designer
Posted on: 2011/1/18 21:14
mariane
mariane (Show more)
Theme Designer
Posts: 649
Since: 2008/1/11
#4

Re: Xpayment 1.21

many thanks Simon for this tutorial, I will try to add 2co as a swcond gateway,and if I arrive to achieve successfully this job I will put the code here.
the road of success is always under construction

wishcraft

Module Developer
Posted on: 2011/1/20 7:30
wishcraft
wishcraft (Show more)
Module Developer
Posts: 3711
Since: 2007/5/18
#5

Re: Xpayment 1.21

if you need a hand marianne with the 2co gateway please feel free to contact me, i would love to assist in generating as many gateways as possible for this title. As we know not all the XOOPS community can use paypal.
Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/SimonXaies
github.com/Chronolabs-Cooperative
facebook.com/SimonSXaies

aquaportail

Just popping in
Posted on: 2011/1/20 14:12
aquaportail
aquaportail (Show more)
Just popping in
Posts: 20
Since: 2007/7/18
#6

Re: Xpayment 1.21

It's really a good work, fine.

Thx

wishcraft

Module Developer
Posted on: 2011/1/23 9:04
wishcraft
wishcraft (Show more)
Module Developer
Posts: 3711
Since: 2007/5/18
#7

Re: Xpayment 1.21

Quote:

aquaportail wrote:
It's really a good work, fine.

Thx


Yeah I know you have to thank michael beck (mamba) for the module it was his suggestion in a comment on profile validation and user group permissioning sales in profile for a module that would take an invoice and charge on the basis of it, with email notifications.

It also has a modular plugin which is featured in the software.

/modules/xpayment/plugin/


If you where making one for profile it would start looking like:

// for /modules/xpayment/plugin/profile.php
// This would at least send the xpayment 1.21 email notifications.

function PaidProfileHook($invoice) {
        include_once 
$GLOBALS['xoops']->path('/modules/xpayment/plugin/xpayment.php');        
        return 
PaidXPaymentHook($invoice);
    }
    
    function 
UnpaidProfileHook($invoice) {
        include_once 
$GLOBALS['xoops']->path('/modules/xpayment/plugin/xpayment.php');
        return 
UnpaidXPaymentHook($invoice);        
    }
    
    function 
CancelProfileHook($invoice) {
        include_once 
$GLOBALS['xoops']->path('/modules/xpayment/plugin/xpayment.php');
        return 
CancelXPaymentHook($invoice);
    }


You can also download from http://cid-6580d2a11c091017.office.li ... /XOOPS%20Modules/Xpayment the xpayment development series.
Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/SimonXaies
github.com/Chronolabs-Cooperative
facebook.com/SimonSXaies

wishcraft

Module Developer
Posted on: 2011/2/9 6:05
wishcraft
wishcraft (Show more)
Module Developer
Posts: 3711
Since: 2007/5/18
#8

Re: Xpayment 1.22 - php 5.x?

Noticably this is working on php version 5.3, it can probably date back to 5.2 maybe 5.1 but that is about it, but it is the latest in invoicing for xoops, the new version of XPayment 1.22 comes with Zombaio and CCbill gateways.

Download xoops2.5_xpayment_1.22.zip - 6Mbs
Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/SimonXaies
github.com/Chronolabs-Cooperative
facebook.com/SimonSXaies

wishcraft

Module Developer
Posted on: 2011/2/18 17:35
wishcraft
wishcraft (Show more)
Module Developer
Posts: 3711
Since: 2007/5/18
#9

Re: Xpayment 1.23 - 2Checkout.com Gateway

I have included the 2checkout gateway for you marianne.. You can download it from:

Download xoops2.5_xpayment_1.23.zip - 6Mbs
Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/SimonXaies
github.com/Chronolabs-Cooperative
facebook.com/SimonSXaies