Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 27 Next »

Document Logs
Change log:

Date:

Author:

Version:

Changes:

Completed

Ext.

Int.

Is in Core

 


 

 


 

1.0

Doc. created

Yes

X

 

 

 Doc updated: EkspresBank integration upgraded to use new APIIn-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.

2 - Introduction to Functionality

Ekspres bank is a company that can help finance a purchase by supplying a 'loan' during the purchase phase.

This means that the customer buys a phone during sign up. The customer chooses to buy through Ekspres bank who then pays for the phone.

The customer now has a 'loan' at Ekspres bank that the customer will pay back outside our system.

The process is done through three steps.

  1. The customer chooses to use Ekspres bank, and a container for the purchase is created at Ekspres bank to Initiate the Application through a SOAP call 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.
  2. The customer application is the approved or rejected by Ekspres Bank. To get the application status information, Ekspres Bank is polled for a status of the purchase through a call to SOAP service: FeedbackService. The method called is getApplicationStatus.
  3. If the customer is approved, Rator acknowledges the purchase and sends a capture message to Ekspres bank through SOAP service FeedbackService. To achieve this, putEventRecord  method from FeedbackService is called with parameter EventType="282"
  4. 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 (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:

<groupId>com.cdrator.integration.financial</groupId>
<artifactId>rator-financial-dk-ekspresbank</artifactId>

3 - API

The Ekspres bank API can be accessed through the workflow actions developed in CDRator integration project. 

Workflow Actions

GetApplicationStatusAction

Package: com.CDRator.billing.financial.ekspresbank.action.GetApplicationStatusAction

The action takes three arguments:

public ApplicationStatusResult execute(String applicationGUID, String applicationId, String brandId) throws Exception

applicationGUID:  The unique ID that is used to reference an application.

applicationId: Application Id. 

brandId:  Used to read the Branded parameters. The URL of the webservice at Ekspres bank and some additional required arguments are specified in the parameter tree. So brand Id is used on a branded environment.

Important NoteWhen using the GetApplicationStatusAction, do not supply both ApplicationGuid and ApplicationId. Only supply ApplicationGuid.

Return value: This action returns an object of type ApplicationStatusResult. Helper methods exposed by this object can be used to map the result to relevant outcomes based on business requirements. The table below describes all helper methods that can be invoked on this result object with a description of the return value for each of these methods. 

If anything unexpected happens, an exception is thrown. It is possible to map an Exception to an outcome on the Action GUI on the workflow builder. 

CancelAction

Package: com.CDRator.billing.financial.ekspresbank.action.CancelAction

This action takes in three arguments:

public CancelResult execute(String applicationGUID, Date eventDate, String brandId) throws Exception

applicationGUID:The unique ID that is used to reference an application.

eventDate: Time of cancellation of the Application

brandId: Used to read the Branded parameters. The URL of the webservice at Ekspres bank and some additional required arguments are specified in the parameter tree. So brand Id is used on a branded environment.

Return value: This action returns an object of type CancelResult. Helper methods exposed by this object can be used to map the result to relevant outcomes based on business requirements. The table below describes all helper methods that can be invoked on this result object with a description of the return value for each of these methods. 

If anything unexpected happens, an exception is thrown. It is possible to map an Exception to an outcome on the Action GUI on the workflow builder. 

CaptureAction

Package: com.CDRator.billing.financial.ekspresbank.action.CaptureAction

This action takes in three arguments:

public CaptureResult execute(String applicationGUID, Date eventDate, String brandId) throws Exception

applicationGUID: The unique ID that is used to reference an application.

eventDate: Time of physical shipment of the goods

brandId:  Used to read the Branded parameters. The URL of the webservice at Ekspres bank and some additional required arguments are specified in the parameter tree. So brand Id is used on a branded environment.

Return value: This action returns an object of type CaptureResult. Helper methods exposed by this object can be used to map the result to relevant outcomes based on business requirements. The table below describes all helper methods that can be invoked on this result object with a description of the return value for each of these methods. 

If anything unexpected happens, an exception is thrown. It is possible to map an Exception to an outcome on the Action GUI on the workflow builder. 

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
prefillable fields are invalid.

ERROR_INVALID_HASH

The hash of the fields is invalid.

5 - Logging

The project uses the rator-soap-monitoring to log request and response to the soap_client_log table. In order for this tool to work, two parameters must be added to the parameter tree. See section 6 - Configuration.

6 - Configuration

The following parameters are required. All except the logging parameters are brand-enabled.

Required for communicating with Ekspres bank

  • FINANCIAL.EKSPRESBANK.SITE = site name
  • FINANCIAL.EKSPRESBANK.RETAILER_ID = retailer id
  • FINANCIAL.EKSPRESBANK.PASSWORD = password

The webservice URLs, only the webservice what are used are needed. So if you do not need to call applicationCreate, you do not need to specify the parameter

  • FINANCIAL.EKSPRESBANK.APPLICATION_CREATE_WSDL = webservice at ekspres bank for application create
  • FINANCIAL.EKSPRESBANK.APPLICATION_STATUS_WSDL = webservice at ekspres bank for application status
  • FINANCIAL.EKSPRESBANK.CANCEL_SIGNAL_WSDL = webservice at ekspres bank for cancel signal
  • FINANCIAL.EKSPRESBANK.CAPTURE_SIGNAL_WSDL = webservice at ekspres bank for capture signal

Required for Logging

  • 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

11-09-2013 14:40:03

First stable release

  • No labels