Skip to content

aleph1888/integralCES_interop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

integralCES_interop

Implements payment gateway interop for http://integralces.net

Whats this for

A web service for a payment gateway, that implements OAuth 1.0 in 3-legged way by hooking services_resources in ces_interop.module

Server configuracion

Create web service by using your drupal UI Admin interface. Here you have the steps.

Using info

  1. Http consuming:

A common service can be consumed by http://yourCES_Server/entrypoint/resource, if you have configured your REST server named as it is named on tutorial gateway, then your url will be:

  • http://yourCES_Server/gateway/interop
  1. Available methods:

2.1) GET, with params:

IN:

  • string type { 'client', 'logged', 'user', 'paymen' }

    	"client" 	-> TRUE if a existing a valid consumer_key related to a context in request. TODO: Check CES Interop exact context! 
    
    	"logged"	-> TRUE if an existing logged in user found inside request token.
    			--> Meaning: A user authorization has been performed so exists a valid access_token.
    			
    	"account"  -> Same as client
    			--> Meaning: Client wants to retrieve a user.
    
    	 "user"   	-> Same as client
    			--> Meaning: Client wants to retrieve a user.
    
    	"payment"	-> Same as client.
    			--> Meaning: Client wants to retrieve a payment.
    
  • string id Identifies the retrieved entity

OUT:

  • array wether....

    $type == 'client' 	[ (string)context ]
    $type == 'logged' 	[ (int)id, (string)name, (array of arrays[ (int)id, (string)name, (int)balance) ] accounts ]
    $type == 'user'     [ (int)id, (string)name, (array of arrays[ (int)id, (string)name, (int)balance) ] accounts ]
    $type == 'account'  [ (int)id, (string)name, (int)balance) ]
    $type == 'payment' 	[ (int)id, (int)buyer, (int)seller, (int)(amount), (string)concept, (int)state ]
    

2.2) POST (creates new payment), with params:

IN:

  • array params

    	string **buyer** Buyer account name.
    	string **seller** Buyer account name.
    	int **amount** Amount in cents.
    	string **concept** Any description for transaction.
    

OUT:

  • array [ (int)id, (bool)result, (int)state ]

NOTE: (int)state is a valid TransactionInterface::STATE

Info

Testing development server.

Drupal CES issue.

API

There is an existing API icesSDKv0 and a use it example.

Testing development server.

Doc

Documentation.

Developer.

Contribute

BTC @ 1DNxbBeExzv7JvXgL6Up5BSUvuY4gE8q4A

About

Implements gateway interop for http://integralces.net

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages