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 Credit Card #12

Open MGA-dotSource opened 8 years ago

MGA-dotSource commented 8 years ago

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

MGA-dotSource commented 8 years ago

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

  1. user selects "credit card" as his payment method
  2. PaymentFramework creates Payment object @ CTP (success, cancel, error redirect URLs, reference number provided by the shop)
  3. Shop shows a form for the required input values (needed configuration is provided by the PaymentFramework)
  4. Form submission via JsonP (JS of Payone required)
  5. JsonP callback is handled by the shop and in success-case the provided data is used to create a payment transaction by the PaymentFramework
  6. after creating the transaction the "handlePayment" method of the Payone Connector is call
  7. the result is interpreted
  8. possibly a redirect URL is provided -> then redirect
  9. handle callbacks after redirect accordingly
  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

What are callbacks? Success and Error URLs? It looks good.

Ensure you put into success URL encrypted cart id with currency and amount. For encryption you can use blowfish and secret key from configuration.

MGA-dotSource commented 8 years ago

@butenkor @floriansattler do we really create the payment transaction before the user clicks "buy now"?

Shouldn't we: