Closed patrys closed 4 years ago
Hello! I'm coming here from the hacktober '17 website. I realize this issue is a year old. Is this still an issue that needs working on? Can I work on this feature ?
@motatoes If the issue is still open, I dare say it's worth working on still :) Worst that can happen is that the PR doesn't get merged!
@motatoes Adding Payment Request API is on our roadmap. I can't assure you that we'll merge your PR since in the near future we're going to rebuild the checkout and payment modules. Then we could maybe reuse your code if it fits the new approach.
Cool! I'll start reading about the Payment Request API, then familiarize myself with the codebase and then get back here with my plan for this.
I went through this article about how the Payment Request API works and I came with an idea of how we can integrate it with Saleor. The flow would be as follow:
What I'm not sure is how to deal with vouchers - we allow to apply them in one of the checkout steps, but with Payment Request, we should have the total cost already calculated before starting the checkout. If we moved the voucher input to the cart page, it should solve this problem.
I'm still experimenting with this API, but generally, it looks very promising. After adding it we could redesign our current checkout to make it one-step and to have a similar interface to the Payment Request API.
Overall sounds good only one concern to having a discount field in the cart. With that concept user can't go directly to the checkout from the product page :/.
So interface like: won't work.
Another concern, what we show user if payment gateway returns an error? We will redirect to the normal checkout? Or the payment request API checkout view will return some 400 error with json message and we show some message on cart?
Errors from payment gateway should be handled in the same way as with the default checkout. Payment Request UI only collects data, we handle the payment ourselves. In case of any error, we would have to simply allow the user to pay again.
@elwoodxblues We also need to reload available delivery methods (and payment methods?) when address data changes (there are callbacks for this).
Vouchers are indeed not supported, this item was added to the FAQ over a year ago: https://developers.google.com/web/updates/2016/07/payment-request#do_you_plan_on_offering_a_coupon_code
Here's an example with shipping method callbacks: https://emerald-eon.appspot.com/
Dealing with addresses and shipping shouldn't be a problem at all. Vouchers are the only missing piece and I'm afraid we don't have many possibilities, except for moving them to the cart view.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still valid issue but I think it should be moved to saleor-storefront repo. Backend should be ready for implementing this since we expose the checkout API.
It's planned to implement voucher functionality on checkout process in https://pwa.saleor.io/? Thank you!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This will allow us to bypass most of the checkout process at least for devices.
Details: https://developers.google.com/web/fundamentals/getting-started/primers/payment-request/