commercetools / commercetools-payment-integration-java

Module to handle payment transactions
Apache License 2.0
6 stars 4 forks source link

define and implement use case for Payone Paypal #13

Closed MGA-dotSource closed 8 years ago

MGA-dotSource commented 8 years ago

define what happens when, where and how if the users selectes Payone Paypal as his payment method

MGA-dotSource commented 8 years ago

data and user action flow needs to be implemented as following:

  1. user selects "paypal" as his payment method
  2. PaymentFramework creates Payment object @ CTP (success, cancel, error redirect URLs provided by the shop)
  3. shop shows "buy now" button, user clicks it
  4. create the transaction
  5. call the "handlePayment" method of the Payone Connector
  6. interpret the result -> get a valid payment object back
  7. possibly a redirect URL is provided -> then redirect
  8. handle callbacks after redirect accordingly
  9. create order if everything worked fine
  10. show confirmation page

cancel or error callbacks have to be handled by the shop and should probably result in the possibility to select a new payment method

butenkor commented 8 years ago

Looks good. Make sure you show some generic or specific error message to the customer if payone response is a failure (edge case). For credit card it may be that credit card is blacklisted or blocked. This information is included in interactions list of payment object.

butenkor commented 8 years ago

@mht-dotsource can it be closed?