-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(targets): Add Payment target #2817
feat(targets): Add Payment target #2817
Conversation
|
packages/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentMethodByCode.js
Outdated
Show resolved
Hide resolved
packages/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentMethods.js
Outdated
Show resolved
Hide resolved
I'm unable to view the deployment, but it says it passed. Not sure why. |
…io into payment-targetables
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.
Beautiful, love the way this small piece of code opens up payment methods for extensions. I have a couple of suggestions for you, I'll leave it up to you if you wanna handle them.
Thanks for the contribution @larsroettig.
@@ -11,7 +11,7 @@ test('normalizes JSX without brackets or closing elements', () => { | |||
['wat', '<wat />'], | |||
[' oh no="crap"', '<oh no="crap" />'] |
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.
Can we change this 🤣 ?
* This file is augmented at build time using the @magento/venia-ui build | ||
* target "payments", which allows third-party modules to add new payment component mappings. | ||
*/ | ||
export default {}; |
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.
I would add to the docs the potential type of the default object.
{
[paymentCode]: paymentCodeComponent
}
Or the post build representation of this file:
import braintree from '@magento/venia-ui/lib/components/CheckoutPage/paymentMethods/braintree`;
import paypal from '@third_party_package/path/to/the/component';
export default {
braintree: braintree,
paypal: paypal
}
const paymentMethodList = new PaymentMethodList(venia); | ||
paymentMethodList.add({ | ||
paymentCode: 'braintree', | ||
importPath: './creditCard' |
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 would be clear if you can either mention in a comment here that the path reference is from the paymentMetodCollection.js
file or just change this to '@magento/venia-ui/lib/components/CheckoutPage/PaymentInformation/creditCard`.
@dpatil-magento did you mean to close this? Maybe the base just needs to be updated now that the original base was merged. |
@sirugh I will resubmit in new PR today because I don't want to rebase from a force rebased branch i saved as diff. |
Description
As developer, we want to build our own Payment methods as Extension for that reasons.
Payments should be extendable via Targetables
Related Issue
Closes #2816
Acceptance
Verification Stakeholders
Specification
Verification Steps
payment-test-1/local-intercept.js
Screenshots / Screen Captures (if appropriate)
Checklist