tranxactive / J2PAY

Multi-gateway payment processing library for java
http://j2pay.tranxactive.com
MIT License
172 stars 110 forks source link

various cleaning and removal of duplicated codes #13

Closed dwamara closed 6 years ago

dwamara commented 6 years ago
ilyasdotdev commented 6 years ago

Hey thats great help. but you should move the util package to root i.e com.tranxactive.j2pay

dwamara commented 6 years ago

The util package has to be with the codes that it changes, but it's your code, so I'll do it as soon as I make new changes to some of the code, there are still improvements to be done. I'll first clean before making improvements to the functionalities.

ilyasdotdev commented 6 years ago

I am also modifying your code a little will submit soon

ilyasdotdev commented 6 years ago

And there is one more thing why TransactionResponse extends VoidResponse it does not make any sense. and leave the util as its now thanks.

ilyasdotdev commented 6 years ago

I am fixing it too.

dwamara commented 6 years ago

it doesn't make sense from the name, but looks at the properties that they have, the VoidResponse encapsulates all the properties that the TransactionResponse has, you can make another class that is the exact copy of the VoidResponse and make both VoidResponse and TransactionResponse extend from it, but my philosophy is to have as less classes as I deem possible/necessary

ilyasdotdev commented 6 years ago

Yes i can understand that but i think code must me more readable. Also please provide your linked in link i would like to add you in special thanks section.

dwamara commented 6 years ago

http://linkedin.com/in/danielwamara/

ilyasdotdev commented 6 years ago

thanks and really great work i really appreciate your efforts.

ilyasdotdev commented 6 years ago

thanks bro i have added you profile in special thanks on readme.md

dwamara commented 6 years ago

With your last commits, you increased the duplications that I got down to 11% to 75%, this has a great impact on the code quality. See https://imgur.com/a/a1amdug

dwamara commented 6 years ago

I will make another pull request this evening and during the week I will change the code used to generate the XML requests. It is a very bad practice to create XML data via String concatenation.