Extending Fraud Protection to React Native
Developing new software can be similar to constructing a puzzle. Open-source provides the pieces, and developers create the picture; choosing combinations of code that will create opportunities and limitations affecting the end product. But where do those puzzle pieces come from? The moments when there was nothing in existence that fit, and software development had to get creative.
This article is about one of those moments and the result: a custom third party module built to integrate web based fraud protection within a mobile application.
The problem with using RN to build the mobile app, was that the client’s established website was operating Riskified for fraud protection on sales. While Riskified provides SDKs for native iOS and native Android, there exists no third party modules to support the integration of Riskified with RN.
So the only options are: (a) the client will use two different fraud protection services for web and mobile sales, or (b) build a module from scratch.
This is the difference between project based software development, and consulting work. It’s one thing to have free rein over every detail of a greenfield project, and entirely different to be given an expectation that is narrowed by a set of parameters. Often, it is the experience of the developers that determines the outcome of a project: will the clients expectations be met, will the app have high functionality, will it be easy to use, easy to maintain, and integrate with other tech.
An app that allows consumer transactions must provide fraud protection (not by law) to ensure that both consumers and retailers are protected from potential losses.
Since most vendors in the anti-fraud space deal separately with native iOS, Android, and web applications, there is no expectation of vendor support for RN. This was the case with Riskified, the client’s fraud protection vendor. And since requiring a client to manage two separate fraud protection services is not a viable option, the solution for protecting purchases made on mobile was to construct a bridge extending from Riskified’s SDKs to the RN code. The bridge can interface with the native iOS and Android modules provided by the vendor, while creating a path of accessibility to the RN core code. To achieve this, developers wrote a connection in Java and Obj-C (the native languages of Android and iOS) that exposed the existing Javascript code that is responsible for Riskified’s functionality. Since Javascript traverses iOS, Android, and React Native, developers could then orchestrate the seamless flow of information from one language to another.
Having the requisite experience to construct native modules (or bridges) is an invaluable skill that creates the opportunity to interface with existing software. By bridging the communication to native functionality through plain javascript, previously inaccessible tools become options and team integration becomes seamless. Developers need to possess the requisite knowledge of writing the native counterparts, and each unique project will require research of the RCT internal methods used to interface. Once the native packages are integrated (as specified by their documentation) the final step is to expose the methods that will integrate into the right API interface.
The resulting app provides a seamless and positive experience, evidenced through the user metrics. The app maintains 60% greater engagement compared to the client’s website, and six months after release, the app had reached 125,000 users with a 4.9 star rating from 1,200 reviews.
Join
Cleverdevelopers
Want to peek into our daily work? Our coaches recount real world situations shared as learning opportunities to build soft skills. We share frameworks, podcasts and thinking tools for sr software developers.
The (remote) opportunities
We expect professionalism and client service, so we can offer a deeply caring experience for our clients. In return, you get freedom to work wherever you want. No timesheets, no big brother watching every move. We trust you to know what’s best to find the right solution.
Don't see what you're looking for? Use our general application form