Wiki Markup |
---|
{noprint} {float:right\|width=300px\|background=lightgrey\|border=solid blue 2px\|margin=10px\|padding=8px}*Contents* {toc:all=true|depth=4|excerpt=true|indent=14px} {float}\\ {noprint} *Document Logs* *Change log:* || *Date:* || *Author:* || *Version:* || *Changes:* || Completed || Ext. || Int. || Is in Core || | {page-info:created-date\|dateFormat=dd MMMM yyyy}\\ | {page-info:created-user}\\ | 0.1 | Doc. created | No | | | | *Terms and definitions:* || Terms/definitions: || Meaning: || | TBD | To be defined | | N/A | Not applicable | \---- h2. 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. h2. 2 - Introduction to Functionality Ekspres bank is a company that can help financing 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 have a 'loan' at Ekspres bank that the customer will pay back outside our system. The process is done through three steps. # The customer chooses to use ekspres bank, and an container for the purchase is created at EkspresBank thorugh a Soap call (ApplicationCreate) # The customer is the approved or rejected. To get that information Ekspres Bank is polled for a status of the purchase through Soap (ApplicationStatus) # If the customer is approved we then acknowledge the purchase and send a capture message to Ekspres bank through Soap (Capture). It is also possible to cancel the purchase through Soap (cancel) The Soap interaction is implemented and can be found at [https://svn.cdrator.com/svn/dev/integration/Financial/DK/EkspresBank/trunk|https://svn.cdrator.com/svn/dev/integration/logistics/EU/BrightPoint/trunk] Maven dependency {code} <groupId>com.cdrator.integration.financial</groupId> <artifactId>rator-financial-dk-ekspresbank</artifactId> {code} h2. 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 h4. Action h6. ApplicationCreateServiceAction *Package*: com.CDRator.billing.financial.ekspresbank.action.ApplicationCreateServiceAction This action takes in three arguments {code} public String execute(String orderNr, Map<String, String> fieldValues, String brandId) throws Exception {code} *orderNr*: An ordeNumber to be used in the future to identify this 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, .... *brandId*: The URL for 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. h6. ApplicationStatusServiceAction *Package*: com.CDRator.billing.financial.ekspresbank.action.ApplicationStatusServiceAction The action takes two arguments {code} public String execute(String orderNr, String brandId) throws Exception {code} *orderNr*: An ordeNumber used to identify the transaction *brandId*: The URL for 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 return a string which is the 'decision' on the response from Ekspres bank.This decision is mapped from a single char to a readable response. _ACCEPT, DECLINE, REFER, CANCEL, GOAHEAD, CAPTURED, ERROR_ If anything unexpected happens an exception is thrown. h6. CancelAction *Package*: com.CDRator.billing.financial.ekspresbank.action.CancelAction This action takes in three arguments {code} public String execute(String orderNr, String brandId) throws Exception {code} *orderNr*: An ordeNumber used to identify the transaction *brandId*: The URL for 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. h6. CaptureAction *Package*: com.CDRator.billing.financial.ekspresbank.action.CaptureAction This action takes in three arguments {code} public String execute(String orderNr, String brandId) throws Exception {code} *orderNr*: An ordeNumber used to identify the transaction *brandId*: The URL for 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. h4. Component h6. 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) Notice 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. h6. 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) Notice 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 h6. 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) Notice 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 h2. 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 already is 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. | h2. 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 need to be added to the parameter tree. See section 6 configuration. h2. 6 - Configuration The following parameter *Neededare forneeded. pollingAll forexcept statusthe oflogging anones order*are ENGINE.LOGISTICS.BRIGHT_POINT.USERNAME = username ENGINE.LOGISTICS.BRIGHT_POINT.PASSWORD = password ENGINE.LOGISTICS.BRIGHT_POINT.ORDER_CHECK_URL = order check end point *Needed for placing an order* ENGINE.LOGISTICS.BRIGHT_POINT.USERNAME = username ENGINE.LOGISTICS.BRIGHT_POINT.PASSWORD = password ENGINE.LOGISTICS.BRIGHT_POINT.ORDER_URL = place order end point ENGINE.LOGISTICS.BRIGHT_POINT.MESSAGE_TYPE = message type (example WEBSERVICE) ENGINE.LOGISTICS.BRIGHT_POINT.DECIMAL_DELIMETER = decimal delimeter , or . ENGINE.LOGISTICS.BRIGHT_POINT.CURRENCY_CODE = SEK, DKK, NOK ENGINE.LOGISTICS.BRIGHT_POINT.ALLOW_BACK_ORDER = (FALSE = Hold shipment until complete; TRUE =Send the order when any product is in stock) ENGINE.LOGISTICS.BRIGHT_POINT.SITE =site in the body (example SE100) ENGINE.LOGISTICS.BRIGHT_POINT.ORDER_TYPE =order type, now always set to WWW ENGINE.LOGISTICS.BRIGHT_POINT.COUNTRY_CODE =country code in the header,default is DK ENGINE.LOGISTICS.BRIGHT_POINT.SEND_SMS_NOTIFICATION =Enables/Disables sms notification regarding shop order ENGINE.LOGISTICS.BRIGHT_POINT.INSTANCE = Instance in the header (example SEPROD) h2. 6brand enabled. *Needed when 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 don't need to call applicationCreate, you don't 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 *Needed For logging* SOAP.MONITORING.ENABLE_RATOR_MONITORING_HANDLER = 'T' SOAP.MONITORING.ENABLE_XML_PERSISTENCY = 'T' h2. 7 - Version || Version \\ || Released || Changes \\ || | *1.0* | 01-05-2013 15:03:50 | First stable release | \\ |
Page Comparison
General
Content
Integrations