Implements payment gateway interop for http://integralces.net
A web service for a payment gateway, that implements OAuth 1.0 in 3-legged way by hooking services_resources in ces_interop.module
Create web service by using your drupal UI Admin interface. Here you have the steps.
- 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
- 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
Testing development server.
Drupal CES issue.
There is an existing API icesSDKv0 and a use it example.
Testing development server.
BTC @ 1DNxbBeExzv7JvXgL6Up5BSUvuY4gE8q4A