commercetools / commercetools-payment-integration-java

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

Provide Shopaction "continue" for all paymentModes #31

Open ahalberkamp opened 7 years ago

ahalberkamp commented 7 years ago

Hi,

When I`am creating a Payment using the Paymentadapter using Soforüberweisung, I get the ShopAction "Redirect" back, when the creation was successful. I think this is a misbehaviour , because I expected the Shopaction "continue" in that case.

Can you please check it?

regards Andi

butenkor commented 7 years ago

It seem correct that on SÜ payment you get redirect as you need to redirect customer. Can you be more specific on the "creation" issue?

andrii-kovalenko-ct commented 7 years ago

i know what he means: for instance, in Paypal we have CONTINUE action: https://github.com/commercetools/project-payment/commit/947e5694dc4569caecda7f6c1901e224c029445f#diff-062bb9eca5da4f24aadc228019290f6dR35

Looks like we mix ShopAction and Transactions. I discussed with @mht-dotsource and he also has this doubt:

akovalenko [11:22 AM]
i'm curious (actually, not me, but a guy from new Carhat project, which applies the payment adapter now) why it has ShopAction.REDIRECT. What is differense, for instance, comparing to Paypal method (see https://github.com/commercetools/project-payment/commit/947e5694dc4569caecda7f6c1901e224c029445f#diff-062bb9eca5da4f24aadc228019290f6dR35), which used CONTINUE?

basically, looks like REDIRECT action should be applied only to Transactions, but not to Methods. So, it looks like this "action" for PaymentMethod is colliding with "action" for PaymentTransaction....

[11:31]
it looks like you are right. redirect should apply on transaction not on method. not 100% sure because I don't have my pc with me and cannot verify it.

I'll ask him again to verify it now.

mht-dotsource commented 7 years ago

@andrii-kovalenko-ct the redirect handling should be same as paypal.

butenkor commented 7 years ago

@mht-dotsource @andrii-kovalenko-ct so why is it continue and not redirect in both cases? This seems correct too: redirect should apply on transaction not on method as adapter does things on transactions only.

andrii-kovalenko-ct commented 7 years ago

honestly, i'm confused on these method-provider workflow. Do we have any documentation about these types?