...
Date: | Author: | Version: | Changes: | Completed | Ext. | Int. | Is in Core |
---|---|---|---|---|---|---|---|
|
| 1.0 | Doc. created | Yes | X |
|
|
Doc updated: EkspresBank integration upgraded to use new API | In-progress |
Terms and definitions:
Terms/definitions: | Meaning: |
---|---|
TBD | To be defined |
N/A | Not applicable |
...
1 - Purpose of Document
This document provides the overall technical details and design of implementing and using the functionality as specified in section 2 - Introduction. This document will not cover implementation details – for this the code base should be inspected.
...
- The customer chooses to use Ekspres bank, and a container for the purchase is created at Ekspres bank thorugh to Initiate the Application through a SOAP call (ApplicationCreate)to PrefillingService. Note: CDRator integration to Ekspres Bank API does not support this part, since it has been agreed that an external web service hosted by customer will take care of this.
- The customer application is the approved or rejected by Ekspres Bank. To get that the application status information, Ekspres Bank is polled for a status of the purchase through SOAP (ApplicationStatus)a call to SOAP service: FeedbackService. The method called is getApplicationStatus.
- If the customer is approved, Rator acknowledges the purchase and sends a capture message to Ekspres bank through SOAP (Capture). service FeedbackService. To achieve this, putEventRecord method from FeedbackService is called with parameter EventType="282"
- It is also possible to cancel the purchase through SOAP service FeedbackService. To cancel the application, the method putEventRecord should be invoked with parameter EventType="401". Note: It is possible to cancel the application via FeedbackService only if the Application is not yet marked as Shipped (cancel).
...
- capture signal not yet sent). Once the application has been marked as shipped, the FeedbackService can no longer be used to cancel the application. In that case, the cancellation can be requested manually via Ekspres Bank Sales support and should be initiated by the partner. CDRator is not involved in/responsible for such manual cancellations.
The Ekspres Bank API integration is implemented and can be found at:
https://svn.cdrator.com/svn/dev/integration/Financial/DK/EkspresBank/trunk
Maven dependency:
Code Block |
---|
<groupId>com.cdrator.integration.financial</groupId>grocom.CDRator.billing.financial.ekspresbank.actionupId> <artifactId>rator-financial-dk-ekspresbank</artifactId> |
3 - API
There are two ways to use the implementation, either through actions or if you are running on an older version of core components.
Action
...
ApplicationCreateServiceAction
...
The Ekspres bank API can be accessed through the workflow actions developed in CDRator integration project.
Action
GetApplicationStatusAction
Package: com.CDRator.billing.financial.ekspresbank.action.ApplicationCreateServiceActionGetApplicationStatusAction
This The action takes in three arguments:
Code Block | ||
---|---|---|
| ||
public StringApplicationStatusResult execute(String orderNrapplicationGUID, Map<String, String> fieldValuesString applicationId, String brandId) throws Exception |
orderNrapplicationGUID: An order number to be used in the future to identify this the transaction.fieldValues: This is used to
specify additional key value pairs to be used in the call to Ekspres bank. Those additional values could be channelId, duration, PrimaryAmount etc. The map contains key/values pairs channelid=1, ...These values are optional.applicationId:
brandId: The URL of the webservice at Ekspres bank and some additional required arguments that are needed are specified in the parameter tree. This brand Id is used on a branded environment.
The action returns a string , see section 4 for return values.
If anything unexpected happens an exception is thrown.
...
ApplicationStatusServiceAction
...
Package: com.CDRator.billing.financial.ekspresbank.action.ApplicationStatusServiceAction
The action takes two arguments:
Code Block |
---|
public String execute(String orderNr, String brandId) throws Exception
|
orderNr: An order number used to identify the transaction.
brandId: The URL of the webservice at Ekspres bank and some additional required arguments that are needed are specified in the parameter tree. This brand Id is used on a branded environment.
The action returns a string which is the 'decision' on the response from Ekspres bank. This decision is mapped from a single character to a readable response.
...
This action takes in three arguments:
Code Block | ||
---|---|---|
| ||
public StringCancelResult execute(String orderNrapplicationGUID, Date eventDate, String brandId) throws Exception |
orderNrapplicationGUID: An order number used to identify the transaction.
eventDate:
brandId: The URL of the webservice at Ekspres bank and some additional required arguments that are needed are specified in the parameter tree. This brand Id is used on a branded environment.
...
This action takes in three arguments:
Code Block | |||
---|---|---|---|
|
| ||
public StringCaptureResult execute(String orderNrapplicationGUID, Date eventDate, String brandId) throws Exception |
orderNrapplicationGUID: An order number used to identify the transaction.
eventDate:
brandId: The URL of the webservice at Ekspres bank and some additional required arguments that are needed are specified in the parameter tree. This brand Id is used on a branded environment.
...
If anything unexpected happens, an exception is thrown.
Component
...
ApplicationStatusServiceComponent
...
Package: com.CDRator.billing.financial.ekspresbank.component.ApplicationStatusServiceComponent
This component will poll for the status of the order number at Ekspres bank.
A shop order(SHOP_ORDER) is required on the context with a CDR parameter called EKSPRES_BANK_ORDER_ID.
It will return one of the following statuses: ACCEPT, DECLINE, REFER, CANCEL, GOAHEAD, CAPTURED, ERROR.
In case of error the component will attach a string to the context with a description of the error (ERROR).
Note that the component will look for a brand (BRAND) on the context, if one is found it will use the brandId to look for parameters in the parameter tree.
...
CancelComponent
...
Package: com.CDRator.billing.financial.ekspresbank.component.CancelComponent
This component will cancel the order at Ekspres bank with that orderNr.
A shop order(SHOP_ORDER) is required on the context with a CDR parameter called EKSPRES_BANK_ORDER_ID.
It will return one of the following statuses: OK, CANCEL_ERROR.
In case of error the component will attach a string to the context with a description of the error (ERROR).
Note that the component will look for a brand (BRAND) on the context, if one is found it will use the brandId to look for parameters in the parameter tree.
...
CaptureComponent
...
Package: com.CDRator.billing.financial.ekspresbank.component.CaptureComponent
This component will capture the order at ekspres bank with that orderNr.
A shop order(SHOP_ORDER) is required on the context with a CDR parameter called EKSPRES_BANK_ORDER_ID.
If will return one of the following statuses: OK, CAPTURE_ERROR.
In case of error the component will attach a string to the context with a description of the error (ERROR).
Note that the component will look for a brand (BRAND) on the context, if one is found it will use the brandId to look for parameters in the parameter tree.
4 - Return Codes
ReturnCode | Description |
---|---|
OK | Everything is ok, no errors. |
ERROR_LOGIN_ERROR | Something is wrong with the RetailerId/Password combination. |
ERROR_APPLICATION_NOTFOUND | Application identified by RetailerId/OrderNr not found. |
ERROR_UNKNOWN_ERROR | Unexpected error occurred. |
ERROR_APPLICATION_ALREADY_SUBMITTED | There is already a submitted application with the given OrderNr. |
ERROR_MANDATORY_FIELDS_MISSING | Not all mandatory fields were provided for the requested operation. |
ERROR_SITE_DISABLED | The site is disabled. |
ERROR_INVALID_PREFILLABLE_FIELDS | There are either non-prefillable fields available, or the value of some |
ERROR_INVALID_HASH | The hash of the fields is invalid. |
...
- SOAP.MONITORING.ENABLE_RATOR_MONITORING_HANDLER = 'T'
- SOAP.MONITORING.ENABLE_XML_PERSISTENCY = 'T'
7 - Version
Version | Released | Changes |
---|---|---|
1.1 | 12-09-2013 15:51:13 | Fixed an issue where request response was stored in soap_monitoring. It will now store it in soap_client_log |
1.0 | First stable release |