This repository has been archived by the owner on Dec 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 156
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
naydav
changed the title
Proposal For setPaymentMethodOnCart
Prototype: setPaymentMethodOnCart
Jan 30, 2019
pmclain
force-pushed
the
issue/293
branch
3 times, most recently
from
February 7, 2019 05:51
5b73616
to
3f72001
Compare
# Conflicts: # app/code/Magento/QuoteGraphQl/etc/schema.graphqls # composer.lock
# Conflicts: # app/code/Magento/QuoteGraphQl/etc/schema.graphqls
4 tasks
paliarush
reviewed
Feb 26, 2019
|
||
input PaymentMethodInput { | ||
code: String! @doc(description:"Payment method code") | ||
po_number: String! @doc(description:"Purchase order number") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to use full field name "purchase_order_number". Is there a reason to shorten it here?
Same on line 206
# Conflicts: # dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php
-- Fixes after merge with mainline
Hi @pmclain, thank you for your contribution! |
This was referenced Feb 27, 2019
Closed
This was referenced Feb 27, 2019
Documented as part of magento/devdocs#4502 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description (*)
Implements mutation for setting cart payment method. Additionally provides a convention for handling the dynamic
additional_data
object currently sent with REST payment information.The
input PaymentMethodInput
provides payment integrators the ability to define additional inputs for populatingadditional_data
. I've included a partial example using the Braintree integration https://github.com/magento/graphql-ce/compare/2.3-develop...pmclain:issue/293?expand=1#diff-9cca29ccf0ab73e1ac28e56811a208a8.Custom input types can converted to
additional_data
by registering aMagento\QuoteGraphQl\Model\Cart\Payment\AdditionalDataBuilderInterface
for the payment method with theMagento\QuoteGraphQl\Model\Cart\Payment\AdditionalDataBuilderPool
. The default assumption is a one-to-one match of input property to the desired array set as the payment method additional data.Payment methods like Check/MO that do not have a dependency on the
additional_data
property work as-is and do not require registering anAdditionalDataBuilderInterface
Fixed Issues (if relevant)
Add support for Payment Methods:
[Payment methods] Support of "Check / Money Order" payment method #286 - Check/Money Order
[Payment methods] Support of "Bank Transfer Payment" method #287 - Bank Transfer
[Payment methods] Support of "Cash On Delivery Payment" method #288 - Cash on Delivery
[Payment methods] Support of "Purchase Order" payment method #290 - Purchase Order
Braintree and Braintree Vault (requires test coverage)
Manual testing scenarios (*)
Contribution checklist (*)