Feature module

Architecture

The general architecture of the Web checkout screen
The general architecture of the Web checkout screen

  • WebCheckoutActivity is the entry point to the WebCheckout screen.
  • WebCheckoutFragment creates WebCheckoutView.
  • WebCheckoutView controls the visibility of the elements in the screen. It also initialises WebCheckoutViewModel.
  • WebCheckoutWebViewController controls the WebView: injecting the Cookies, CSS, Javascript, and setting the Javascript bridge.
  • WebViewLayout is the View that displays the WebView.
  • WebCheckoutViewModel is the main ViewModel that coordinates the rest of the ViewModels.
  • GetWebCheckoutViewModel executes GetWebCheckout interactor and exposes WebCheckout model.
  • WebCheckoutEventsViewModel handles the events from the JavascriptBridgeInterface bridge and executes CompleteWebCheckout interactor.
  • JavascriptBridgeInterface is the interface that the web page calls.

Views Breakdown

ViewXMLAlias
WebCheckoutActivityactivity_webcheckout.xml-
WebCheckoutFragmentfragment_webcheckout.xml-
WebCheckoutViewweb_checkout_modular_view.xmlwebCheckoutViewLayout