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 Sofortüberweisung #14

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 Sofortüberweisung as his payment method

MGA-dotSource commented 8 years ago

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

  1. user selects "sofortüberweisung" as his payment method
  2. PaymentFramework creates Payment object @ CTP (success, cancel, error redirect URLs provided by the shop)
  3. shop shows input form for IBAN / BIC
  4. user inserts and clicks on buy now
  5. create the transaction with blowfish encrypted IBAN / BIC values (see https://github.com/commercetools/commercetools-payone-integration/commit/2be0daca661d89c8bda45102766fc21238e999fc BankTransferRequestFactory
  6. call the "handlePayment" method of the Payone Connector
  7. interpret the result -> get a valid payment object back
  8. possibly a redirect URL is provided -> then redirect
  9. handle callbacks after redirect accordingly
  10. create order if everything worked fine
  11. 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

the encryption secret has to be provided via configuration and has to be the same that the Payone Connector is using

butenkor commented 8 years ago

Remember to handle cancel URLs which redirects use back payment method selection page

butenkor commented 8 years ago

Looks good.

mht-dotsource commented 8 years ago

@butenkor sofortüberweisung does not need step 3 anymore.

shop shows input form for IBAN / BIC

therefore step 5 does create the transaction without IBAN and BIC

butenkor commented 8 years ago

@mht-dotsource but it still requires country code, right? Where do you get it from? Recently CTP API provided locale attribute on cart object. I would take it from cart and if locale is not supported by PSP (defined in documentation) configured fallback language is used. If fallback is not defined English is default. WDYT?

mht-dotsource commented 8 years ago

@butenkor indeed without IBAN and BIC the beahviour of the Payone-API is that it requires the parameter bankcountry (e.g. DE). It's not handled by the payone-integration-service.

The payone-integration-service uses the same value for bankcountry and country which it get from the billing address of the cart.

floriansattler commented 7 years ago

@butenkor @andrii-kovalenko-ct I think this payment method is not supported yet. Can you give me an estimation for implementing it?

butenkor commented 7 years ago

IT test with creation of transaction is missing.

andrii-kovalenko-ct commented 7 years ago

@butenkor 4836dd1

Close the issue?

butenkor commented 7 years ago

May be closed once merged to master and released.