killbill / killbill-adyen-plugin

Kill Bill plugin for Adyen
https://killbill.io
Apache License 2.0
10 stars 31 forks source link

Proposal #99

Closed Ecsiral closed 5 years ago

Ecsiral commented 5 years ago

Related docs are

pierre commented 5 years ago

I'm confused: is SECOND_CHARGEBACK always sent after CHARGEBACK_REVERSED? The Adyen documentation isn't clear.

Regardless, we'll need some tests to verify this (probably in TestKillbillAdyenNotificationHandler).

Ecsiral commented 5 years ago

@pierre I think according to the aritcle, the whole process is composed of 3 stages:

  1. the first dispute is filed by the customer (CHARGEBACK)
  2. the first dispute is defended by the merchant (CHARGEBACK_REVERSED)
  3. the defense is disagreed by the cardholder/issuer and a second dispute is filed which is the final one (SECOND_CHARGEBACK)

So to your question, yes SECOND_CHARGEBACK is always sent after CHARGEBACK_REVERSED if the cardholder/issuer disagrees the defense. The only risky case is, those two notifications are sent at close times and arrive KB in the wrong order. I'll talk to Adyen about that case and update here.

pierre commented 5 years ago

So the main change is that Adyen now sends SECOND_CHARGEBACK instead of CHARGEBACK the second time? Just trying to make sure I fully understand, because the flow you describe (second chargeback, i.e. CHARGEBACK_REVERSED being reversed) was already supported.

I'll talk to Adyen about that case and update here.

👍 And tests please! 😉

Ecsiral commented 5 years ago

Yes, after Nov. 5th, 2018, Adyen uses the SECOND_CHARGEBACK instead of CHARGEBACK the second time.

Ecsiral commented 5 years ago

@pierre talked with our strategy and finance teams, it seems like an individual transaction type SECOND_CHARGEBACK is required for further usage. Any concern or idea from your perspective to add it?

According to killbill/killbill#477, I think to have the new type, we need to change the state machine in the core lib.

pierre commented 5 years ago

@pierre talked with our strategy and finance teams, it seems like an individual transaction type SECOND_CHARGEBACK is required for further usage. Any concern or idea from your perspective to add it?

CHARGEBACK_SUCCESS represents both first and second chargebacks today. Adding SECOND_CHARGEBACK_SUCCESS is an API change, so you would need to upgrade to 0.21.x to make such changes.

According to killbill/killbill#477, I think to have the new type, we need to change the state machine in the core lib.

Kill Bill doesn't have a SECOND_CHARGEBACK transaction type (see https://github.com/killbill/killbill-api/blob/master/src/main/java/org/killbill/billing/payment/api/TransactionType.java).

/cc @daliwei

Ecsiral commented 5 years ago

@pierre please review killbill/killbill-api#56

pierre commented 5 years ago

Closing for lack of activity.