User Tools

Site Tools


nocode:transactions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
nocode:transactions [2019/08/12 13:37]
740803864 [Response processing]
nocode:transactions [2020/03/29 11:34] (current)
77.75.78.163 ↷ Links adapted because of a move operation
Line 6: Line 6:
 See chapters below for details. See chapters below for details.
  
-===== Set up ===== +===== Setup ===== 
-At first, transaction must be prepared and sent to ADUCID Binder. ADUCID Binder accepts transaction HTTP requests at ''/aducid-binder/prepareTransactionUpload''. Before ADUCID Binder call, **unique identifier must be generated**. This identifier is neccessary to successfully pair transaction request and response. Let's see ADUCID Binder transaction interface parameters:+At first, transaction must be prepared and sent to ADUCID Binder. ADUCID Binder accepts transaction HTTP requests at ''/aducid-binder/prepareTransactionUpload''. Before ADUCID Binder call, **unique identifier (aka ''transactionId''must be generated**. This identifier is neccessary to successfully pair transaction request and response. Let's see ADUCID Binder transaction interface parameters:
 ^ Name ^ Values ^ Mandatory ^ Description ^ ^ Name ^ Values ^ Mandatory ^ Description ^
 | transactionId | String | Yes | transaction unique identifier | | transactionId | String | Yes | transaction unique identifier |
Line 16: Line 16:
 | udi | String | No | if defined, security attack check is realized | | udi | String | No | if defined, security attack check is realized |
 | peigId | String | No | if defined, mobile push notification is realized | | peigId | String | No | if defined, mobile push notification is realized |
-**It is neccessary to add ''transactionId '' parameter to ''redirectUrl'' attribute** to successfully pair transaction request and response. If ''errorPage'' is not defined, ''redirectUrl'' is used in case of error. Now we can send prepared request to ''/aducid-binder/prepareTransactionUpload'' and check successful transaction upload (HTTP code 200).+**It is neccessary to add ''transactionId'' parameter to ''redirectUrl'' attribute** to successfully pair transaction request and response. If ''errorPage'' is not defined, ''redirectUrl'' is used in case of error. Now we can send prepared request to ''/aducid-binder/prepareTransactionUpload'' and check successful transaction upload (HTTP code 200).
  
 We must also remember to provide generated transaction identifier to web view, e.g. Ajax JSON response or JSP expression language. We must also remember to provide generated transaction identifier to web view, e.g. Ajax JSON response or JSP expression language.
  
 ===== Transaction itself ===== ===== Transaction itself =====
-When transaction data are successfully uploaded, we can start transaction itself. It can be done with use of [[web-integration:client-side|Client API for Web Integration]]. We only need to specify ADUCID Binder methods to serve transaction:+When transaction data are successfully uploaded, we can start transaction itself. It can be done with use of [[web-integration:client-side|Client API for Web Integration]]. We only need to specify right ADUCID Binder methods to serve transaction:
  
 <code javascript> <code javascript>
Line 32: Line 32:
  
 ===== Response processing ===== ===== Response processing =====
-User is now redirected to ''redirectUrl'', where we must process transaction operation result. Operation result is saved in HTTP request attributes. We try to read attribute with prefix ''AAA_UTR_'' with transaction identifier at the end. When value exists, **we must invoke base64 decoding on value** to get readable JSON response. When transaction was successful, JSON response will be:+User is now redirected to ''redirectUrl'', where we must process transaction operation result. Operation result is saved in HTTP request attributes. We try to read attribute with prefix ''AAA_UTR_'' with transaction identifier at the end. When value exists, **we must invoke base64 decoding on value** to get readable JSON response. 
 + 
 +==== Positive response ==== 
 +When transaction was successful (''status = OK''), JSON response will be:
  
 <code javascript> <code javascript>
Line 41: Line 44:
 } }
 </code> </code>
 +
 +==== Negative response ====
 +Transaction can be also unsuccessful (''status = ERROR''). There are two types of failures - failure directly on AIM and second level failure. Failure on AIM can be:
 +
 +<code javascript>
 +{
 +  "status": "ERROR",
 +  "data": {
 +    "message": "Wrong personal factor.",
 +    "key": null,
 +    "arguments": null,
 +    "statusAIM": "active",
 +    "statusAuth": "OK",
 +    "statusLF": "KO"
 +  },
 +  "redirect": "https://dev-bank.demo.aducid.com:443/bank-nc/loginPage"
 +}
 +</code>
 +
 +In case of AIM failure, values ''statusAIM'' and ''statusAuth'' will be filled, ''statusLF'' only in case of personal code use. You can find ''statusAuth'' and ''statusLF'' meanings in chapter [[settings-mgmt:20-error-statuses|Error statuses of authentication process]]. Meanings of ''statusAIM'' can be found in [[settings-mgmt:11-aim-statuses|Semantics of individual statuses of the authentication session (AIMStatus)]] chapter. Attribute ''message'' is technical readable text describing error.
 +
 +Secondary level failure can look like:
 +
 +<code javascript>
 +{
 +  "status": "ERROR",
 +  "data": {
 +    "message": "Potential security attack.",
 +    "key": "web.potentialSecurityAttack",
 +    "arguments": [],
 +    "statusAIM": null,
 +    "statusAuth": null,
 +    "statusLF": null
 +  },
 +  "redirect": "https://dev-bank.demo.aducid.com:443/bank-nc/paymentCheck?transactionId\u003dac39bc24-edc8-477d-95f5-6793a452bd80"
 +}
 +</code>
 +
 +In this case, value ''key'' is filled, ''arguments'' only in situation of existing error message arguments. Possible values of ''key'' can be found at [[https://wiki.aducid.com/client-api/com/aducid/sdk/enums/ClientStatus.html|Client Status]] or [[https://wiki.aducid.com/web-platform/com/aducid/web/enums/WebStatus.html|Web Status]]. Attribute ''message'' is technical readable text describing error.
 +
nocode/transactions.1565617071.txt.gz · Last modified: 2019/08/12 13:37 by 740803864