Skip to content

Code overhaul and simplification - #4

Open
andyautida14 wants to merge 10 commits into
masterfrom
dev
Open

Code overhaul and simplification#4
andyautida14 wants to merge 10 commits into
masterfrom
dev

Conversation

@andyautida14

Copy link
Copy Markdown
Contributor

@jgfrancisco please review. Thanks

Comment thread README.md
currency: "PHP",
value: "69.00"
value: "69.00",
details: amountDetails

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andyautida14, mis-aligned tab/space?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jgfrancisco I aligned it on my lastest commit.

Comment thread README.md
code: "pm_belt",
description: "Medium-sv"
description: "Medium-sv",
quantity: "1",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alignments

@jgfrancisco

Copy link
Copy Markdown

no further comments for me.

@haroldcalayan Can you review the merge request?

Comment thread README.md

Information about the buyer, items inside the cart, and total amount are needed to create a new checkout. Refer to the tables below for more information.

##### Checkout object

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Comment thread index.js
module.exports.HttpConfig = require('./lib/paymaya/core/HttpConfig');
module.exports.HttpConnection = require('./lib/paymaya/core/HttpConnection');
module.exports.PaymayaApiError = require('./lib/paymaya/core/PaymayaApiError');
module.exports.Address = require('./lib/paymaya/model/checkout/Address');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haroldcalayan do you have any particular design reason for including this?

@haroldcalayan

Copy link
Copy Markdown
Contributor

Hi @jgfrancisco! We have designed this SDK to be same with our PHP SDK: https://github.com/PayMaya/PayMaya-PHP-SDK so developers can easily adapt whenever they want to port with other language. Removing of models can make a big difference. Are there any other reasons of removing them? Since, we can put constructors on models with required fields only so users are not forced to add unnecessary values.

@jgfrancisco

jgfrancisco commented Sep 28, 2016

Copy link
Copy Markdown

Hi @haroldcalayan,

Noted on this. The main issue we encountered was that when we use the models, there are optional fields that are filled up with default values (empty strings) that fails the checkout validation.

For our sample demo, we didn't want to delete fields from the models used. But if we use and pass custom object, it would look that we are bypassing the use of the models. So we were proposing the use of custom objects for the creation of the checkout object.

Anyway, yes, it would be good if the model constructors provide required fields and have the ability to add optional fields if available

cc: @andyautida14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants