activity_diagram 2.22 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@startuml
title Ingenico Orphan Slayer

(*) --> "orphan_slayer_process_orphans()"

--> "$orphan = PendingDatabase::get_oldest()"

if "$orphan['contribution_tracking_id']?" then
  -->[yes] "$slayer->rectify($orphan)"
  --> "$adapter->rectifyOrphan($orphan)"

  if "shouldRectifyOrphan()?" then
   ->[no] "Skip pending record."
  else
   -->[yes] if "$orphan['contribution_id']?" then
            -->[no] "$adapter->processDonorReturn()"
            --> "$adapter->do_transaction('Confirm_CreditCard')"
            --> "$status = $this->getOrderStatusFromProcessor()"
            --> "$adapter->post_process_getHostedPaymentStatus()"
            --> "$adapter->post_process_get_orderstatus()"
            --> "$adapter->runAntifraudFilters()"
            --> "$fraudFilter->sendAntifraudMessage()"
            --> "pushMessage('payments-antifraud')"

              if "$status->forceCancel()?" then
                ->[Yes] "$adapter->cancelCreditCardPayment()"
                --> "PendingDatabase::deleteMessage($orphan);"
              else
                ->[No] if "$statusCode?" then
                        -->[PENDING] "Try again later. bug?"
                        --> "PendingDatabase::deleteMessage($orphan);"
                      else
                        -->[FAILED] "$adapter->cancelCreditCardPayment()"
                        --> "PendingDatabase::deleteMessage($orphan);"
                      else
                        -->[PENDING_POKE] "$adapter->finalizeCreditCardPayment()"
                        --> "$adapter->approvePayment()"
                        --> "$adapter->finalizeInternalStatus()"
                        --> "$adapter->sendFinalStatusMessage()"
                        --> "pushMessage('payments-init')"
                        --> "$adapter->postProcessDonation()"
                        --> "pushMessage('donations')"
                        --> "PendingDatabase::deleteMessage($orphan);"
                      endif
              endif
            else
            -->[yes] "$adapter->cancel($orphan)"
            --> "PendingDatabase::deleteMessage($orphan);"
            endif
  endif

else
  -->[no] "$slayer->cancel($orphan)"
  --> "$adapter->cancel($orphan)"
  --> "PendingDatabase::deleteMessage($orphan);"
endif
@enduml