Be Payment Ready

Life in Moneris as an intern

Posted by huweiyi on Thursday, July 1, 2021

TOC

overall learning

First of all, really appreciate the firm gave me the opportunity learning and working during the pandemic. It is a unique experience not only under the abnormal situation but also it is my first yearly long internship. After this, I will graduate and step into society.
What I learned from Moneris? Working for the Canada largest fintech company specialized in payment really widely opens my sight to a new area. And during my life at Moneris, I have been impacted by how e-commerce saved small and local business.
Also, daily stand up, collaborated work and demo enhanced my communication skills. One of the biggest adventage working in Moneris, specially at my team, was that if you have any idea on a new project including framework you want to try. The manager always encouraged you to do, I have been working on various projects with different frameworks. So overall, I feel fulfilled,satisfied and rewarded.

daily life

We had 9:30 AM daily stand up meeting. Each of us from the same team had to give a brief talk about what we had done yesterday, and what we would do today. Some big announcements from the company would also be shared at the meeting by Director.
Then we rested for several minutes, waited for new project, demo or called to colleagues for the collaborate projects we had been woking on. We have colleages all around Canada. So it was pretty cool talking about different news, weathers at different areas.
Then, some of us may worked alone, did parallel programming, or learned something new to make the work done.
To be honest, remote work saves commuting time. However, I felt less communicated with colleagues. I didn’t even have chance to talk with other collegues on different projects.

projects

I have done several big projects with the team or on my own including full stack web tool for 𝗱𝘆𝗻𝗮𝗺𝗶𝗰 𝗽𝗮𝗴𝗲 𝗰𝗿𝗲𝗮𝘁𝗶𝗻𝗴 with a tech stack of 𝗡𝗼𝗱𝗲𝗝𝘀, 𝗥𝗲𝗮𝗰𝘁𝗝𝗦, 𝗠𝗦𝗦𝗤𝗟, Pages are fully implemented with 𝟰 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝗣𝗮𝘆𝗺𝗲𝗻𝘁 𝗔𝗣𝗜𝘀 and 𝘀𝗶𝘁𝗲-𝘁𝗿𝗮𝗰𝗸𝗶𝗻𝗴 pixels.
Different Streaming and Processors backend tasks including 𝗺𝗲𝘀𝘀𝗮𝗴𝗲 𝗲𝗻𝗰𝗿𝘆𝗽𝘁𝗶𝗼𝗻, 𝗯𝗮𝘁𝗰𝗵 𝗲𝘃𝗲𝗻𝘁 𝗔𝗣𝗜, 𝗯𝗮𝘁𝗰𝗵 𝗹𝗼𝗮𝗱 𝗽𝗶𝗻 ..etc. to optimize existed functions or add new features with frameworks/Libs of 𝗔𝗽𝗮𝗰𝗵𝗲 𝗞𝗮𝗳𝗸𝗮/𝗔𝘃𝗿𝗼 and 𝗝𝗮𝘃𝗮 𝗦𝗽𝗿𝗶𝗻𝗴.
I will give some details of my proud projects below.

Web Generator

With the increasing need for company’s data product, Offlinx. We need some web tool that could mock much enough data for internal use. So I have been assigned this task to create a dynamic page generator. With this dynamic page creator, user can customize their own parameters and create a new site. The site is embbedded with Moneris four payments method and site-tracking pixel. Let’s start to see how I arrange the project.


test-site-backend
|
C:
|
    api.js

    config.js

    index.js

    lib.js

    tree.txt

   

No subfolders exist

 

test-site-frontend
|
C:

|

+---components

|       Header.js

|       HostedPayPage.js

|       HostedTokenization.js

|       MonerisPayment.js

|       SinglePage.js

|       SinglePageTest.js

|       SiteTrackingPixel.js

|       Tab.js

|       Tabs.js

|      

\---lib

        changeUA.js

        orderID.js

        randomNum.js

 

parameter-site-backend
|
C:

    api.js

    config.js

    index.js

    tree.txt

   

parameter-site-frontend
|
C:.


|  

+---components

|       MainPage.js

|       OfflinxParams.js

|       SiteSelect.js

|       UserAgent.js

|      

\---lib

        generateUrl.js

parameter-site

  • react class
class A extends ract.component{
    this.state={
        //initialize the variables..
        a="";
    };

    // bind event handler without bind cannot find this class, will return undefined
    // https://medium.com/shoutem/react-to-bind-or-not-to-bind-7bf58327e22a
    this.aChange=this.achange.bind(this);
    aChange(e){
        thid.setState({a:e.target.value})
    }

    async componentDidMount(){
        //see details below
        fetch get .....
        set a:......
    }

    render(){
        return (
            <select
            value={this.state.a}
            onChange={this.aChange}
            >
        )
    }
}
  • backend(api.js/router.get"/xxx"(connect sql=>return json)=>config.js/frontend.buildpath=path.join)=> frontend(offlinxParam.js/componentDidMount(fetch"api/xxx" get)=>setstate from json)\
  • frontend form action post=> backend(post/test-site(redirect to test-site))
  • cookies store information passed to test-site

test-site

  • pixel-site tracking: img url with window.href.href, document.referrer and cookies' data. put all of those into header.js
  • Link and Route Switch from “react-router-dom” create dynmic pages
  • tabs and Tab-list with three payments method portals
  • payments methods have page indirect(form+post), xml requests-cors problems(use proxy to send request ,send xml at backends,request(url,function(error, response, body){})).
  • frontend(reponse.json) fetch.post json. Backend req.parameters make xml format send.

Improvement

  • I should use react-hook to improve coding efficiency.

Processors test tool

Working on different kafka and avro projects, including message encryption batchevent API switch ..etc. I want to introduce batch event API switch. The test tool is used for testing data validation of different processors, it is a huge project. I just worked and tested on small part of this. Batch event API switch dealt with Consumer Batch message commitment. Normal message from offset commited single by single which cost lots of time batch event API can commit messgae batch by batch Which means commit the bundle of message togethrer. So that it increases the efficiency.

  • ConsumerRecord=>ConsumerRecords
  • Read my other blog for more Kafak Review.

BatchPinLoad

Been used for batch load of customer numbers and renew their pins. With filesystem(out input csv file), rest-template,HttpEntity(Spring Boot) and logger4j2.xml

BatchPinLoad
├── createrequest.java
├── createresponse.java
|──pinAuthenticationBatchLoad.java