Skip to content

Conversation

@andyautida14
Copy link
Contributor

@jgfrancisco please review. Thanks

currency: "PHP",
value: "69.00"
value: "69.00",
details: amountDetails

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
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.

code: "pm_belt",
description: "Medium-sv"
description: "Medium-sv",
quantity: "1",

Choose a reason for hiding this comment

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

alignments

@jgfrancisco
Copy link

no further comments for me.

@haroldcalayan Can you review the merge request?


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

Choose a reason for hiding this comment

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

nice!

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');

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
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
Copy link

jgfrancisco commented Sep 28, 2016

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.

5 participants