OrchardCore.Commerce icon indicating copy to clipboard operation
OrchardCore.Commerce copied to clipboard

Separate Stripe payment into a feature so it can be disabled if other payment provider is desired. (OCC-63)

Open sarahelsaig opened this issue 1 year ago • 0 comments

This won't be urgent until we have other payment providers. If someone needs it soon because you already have your own payment implementation, please comment on this issue.

  • Refactor the Stripe payment processor logic into a separate project, e.g. OrchardCore.Commerce.PaymentProcessors.Stripe.
  • Create the necessary abstraction to make it provider-based with Stripe being just one provider.
    • Replace the ~/cart's Checkout button with a Checkout with {providerName} button so it's locked down in the order form. Then only display the correct form for that processor.
  • Include the abstraction in the main OrchardCore.Commerce project.
  • Add a dummy payment processor provider.
    • This should be a separate feature.
    • It should be enabled in the recipe but (if possible) force-disabled in production.
    • Add a sample Order content item to the recipe, whose payment info references this provider.
  • Include which payment provider was used in the OrderPart.
    • Make it read-only if the Order is already created and this has been set.

Also create a unit test of the basic purchase flow using the dummy payment processor.

  • Buy different amounts of the two sample products.
  • Change the amount of one in the cart.
  • Fill the checkout form.
  • Go to the newly created Order item.
  • Verify that the order has the correct products an amounts, and that the correct payment provider name is displayed.

If #155 is resolved, then also set the addresses, and verify that they are valid as well.

Jira issue

sarahelsaig avatar Aug 15 '22 11:08 sarahelsaig