Difference between revisions of "Payment Processing API Documentation"

From Cloud9 Payment Processing Gateway Documentation
Jump to: navigation, search
(Elements)
 
(37 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Template:C9Header|API Documentation}}
 
{{Template:C9Header|API Documentation}}
=Step One=
+
<br>
Please, review the '''[[Payment_Processing_Developer_Guide|Developer Guide]]''' to determine the best integration approach, before diving into the API Documentation below.
+
&rarr; '''ALL API is COPYRIGHT by 911 Software, INC 2019'''
 +
<br>
  
=API Documentation=
+
=RESTful JSON & HTML API Documenation=
 
+
See [[JSON API Documentation]]
==Overview==
+
=Web Browser HTML/JavaScript Integration=
The following document will give a good idea of how to use our Payment Gateway Client API (PGCApi), which have wrappers for other languages (VB, JS, etc)
+
See [[HTML_Web_API|Web Browser Integration Samples]]
This is a simpler value pair operation library
+
=C/C++/C# & VB API documentation=
 
+
See [[C Languages API Documentation]]
==Elements==
+
=iOS API Documentation=
The library has two basic elements:
+
See [[iOS API Documentation]]
;Connection:Client can either connect directly to<br>a)Cloud9 Server Payment Web Controller (PWC) - this is a good option is local hardware payment terminals are not used<br>b)Local Payment Device Controller (PDC), which controls the payment terminal.
+
=Android API Documentation=
;Payment Processing Transaction Session:an object that holds description of the transaction and it's result. There is one transaction per session
+
See [[Android API Documentation]]
 
 
==Basic Flow==
 
#Initialize
 
#Connect <br><code>repeat as many times as necessary</code>
 
#Create New Transaction Session
 
#Set Transaction Parameters (uses simple Set String and Set Value commands)
 
#Send Transaction Request
 
#Get Transaction Response (uses simple Get String and Get Value commands)
 
#Close the Session<br><code>go back to create a new transaction session, if more transactions needed</code>
 
#Disconnect
 
 
 
==Detailed Flow with C Examples==
 
#'''Initialize the library'''<br><code>PgcInit("PgcSample");</code>
 
#'''Connect to the Payment Web Controller (PWC - direct Cloud9 Server connection) or local Payment Device Controller (PDC) Server'''
 
##Create Connection Handle<br><code>int nConn = PgcNewConn(PGC_SVC_C9PG_PDC, "Name", "Token", PGC_TIMEO_TXN_UI, "PgcSample", ""); //USE PGC_SVC_C9PG_PWE_TEST for PWE</code>
 
##Open the Connection, specified by Connection Handle<br><code>int nErr = PgcConnect(nConn);</code>
 
#'''Create New Transaction Session'''<br><code>int nSess = PgcNewSess(nConn, 1);</code>
 
#'''Set Session Parameters'''
 
##Set MID/TID/PWD<br><code>PgcSetStr(nSess, 0, PGC_GWKEY_GMID, "1001396250"); // Gateway merchant ID<br>PgcSetStr(nSess, 0, PGC_GWKEY_GTID, "GT1001396253"); // Gateway terminal ID<br>PgcSetStr(nSess, 0, PGC_GWKEY_GMPW, "123"); // Gateway merchant password</code>
 
##Set Transaction Type<br><code>PgcSetStr(nSess, 0, PGC_GWKEY_TXNACT, PGC_GWVAL_TXNACT_AUTH); // Transaction action type -> authorization</code>
 
##Set Transaction Medium (e.g. Credit Card)<br><code>PgcSetStr(nSess, 0, PGC_GWKEY_MDM, PGC_GWVAL_MDM_CREDIT); // Payment medium -> credit card</code>
 
##Set Transaction Parameters (e.g. Amount, Tax, Trace#)<br><code>PgcSetAmt(nSess, 0, PGC_GWKEY_MAINAMT, 123); // Main amount -> $1.23<br>PgcSetAmt(nSess, 0, PGC_GWKEY_INCTAXAMT, 8); // Included tax amount -> $0.08<br>PgcSetStr(nSess, 0, PGC_GWKEY_SRCTRACENUM, "123456"); // Source trace number; will be returned for matching</code>
 
#'''Send Transaction Request'''<br><code>int nErr = PgcRequest(nSess);</code>
 
#'''Get Transaction Response and Approval Code'''<br><code>PgcGetStr(nSess, 0, PGC_GWKEY_STATUS, sStatus, 256); // Transaction status, indicating if it is successful<br>...<br>PgcGetStr(nSess, 0, PGC_GWKEY_RSPCODE, sRspCode, 256); // Response code returned from the host<br>...<br>PgcGetStr(nSess, 0, PGC_GWKEY_RSPTEXT, sRspText, 256); // Response text returned from the host<br>...<br>PgcGetStr(nSess, 0, PGC_GWKEY_AUTHCODE, sAuthCode, 256); // Auth code</code>
 
#'''Close the Transaction Session'''<br><code>PgcFreeSess(nSess);</code>
 
#'''Disconnect from Server'''<br><code>PgcDisconnect(nConn); // Disconnecting from the controller; will be called automatically upon closing<br>PgcFreeConn(nConn); // Closing connection to the controller; called once per connection</code>
 
#'''Un-Initialize'''<br><code>PgcUninit("PgcSample"); // Uninitializing library; called once per application upon exit</code>
 
 
 
&rarr; '''Online Documentation:''' [http://cloud9paymentgateway.com/docs/API/ Payment Gateway Client Library ver 17.08.14 documentation]
 
 
 
=Samples=
 
{{Template:samples}}
 
  
 
{{Template:C9Footer|Integration}}
 
{{Template:C9Footer|Integration}}

Latest revision as of 19:23, 6 August 2019




Cloud9 Payment Gateway Documentation. This site can also be reached at http://docs.cloud9paymentgateway.com


ALL API is COPYRIGHT by 911 Software, INC 2019

RESTful JSON & HTML API Documenation

See JSON API Documentation

Web Browser HTML/JavaScript Integration

See Web Browser Integration Samples

C/C++/C# & VB API documentation

See C Languages API Documentation

iOS API Documentation

See iOS API Documentation

Android API Documentation

See Android API Documentation





From the makers of Cloud9 Payment Processing Gateway and Creditline Credit Card Processing Software