Page MenuHomePhabricator

Refactor DI's response processing
Closed, ResolvedPublic4 Story Points

Description

processResponse is convoluted and tricky, and the transaction_results array holds too many things

*processResponse often duplicates a bunch of switch structure that also exists in the functions that parse out errors, data, and communications status. we can subsume those into processResponse for less duplication
*We should throw an exception with code and retry vars instead of returning an error code and mutating one of the arguments.

Related Objects

Mentioned In
T136665: Move controller code out of GatewayType#processResponse
rMEXT0014487c61d9: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…
rEDOI90212b242db6: Make do_transaction return a PaymentTransactionResponse
rMEXT1ce0aa730b3c: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…
rEDOIb31cead95876: Start chipping away at getTransactionAllResults
rEDOIaa7a052f1f87: Finish eradicating setTransactionResult
rMEXT9cd8432c4bc9: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…
rMEXTc6e3013f26ec: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…
rEDOI65ac875799fc: Get rid of more setTransactionResult calls
rMEXTef0a1f4d378e: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…
rEDOI731d44bb8ec7: Replace setTransactionResult calls in Adyen adapter
rEDOI9742cd18b075: Fold parseResponseXX calls into processResponse
rMEXT4270e7454752: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…
rEDOI3e52eb996414: Start refactoring processResponse
rMEXT505c7e5f61f3: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…
rMEXT8fe3a54a51e0: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…
rEDOIefef7965e46a: getResponseXX -> parseResponseXX
rMEXTa0f81d68f486: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…
rEDOI7be2535b4b1c: Prepare to prune $transaction_results
rMEXT0465d7e5ad67: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…
rEDOI43810890511f: Remove validation action from transaction_results
rMEXT1532fb4d9a7a: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…
rEDOId042ea85dae0: Move Final Status out of transaction_results, use consts
rMEXT941acdf2d040: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…
rEDOI7df01fc9b863: Push gateway_params down into data

Event Timeline

Ejegg created this task.May 4 2015, 7:53 PM
Ejegg claimed this task.
Ejegg raised the priority of this task from to Needs Triage.
Ejegg updated the task description. (Show Details)
Ejegg added a subscriber: Ejegg.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 4 2015, 7:53 PM

Change 208739 had a related patch set uploaded (by Ejegg):
Start refactoring processResponse

https://gerrit.wikimedia.org/r/208739

Change 208872 had a related patch set uploaded (by Ejegg):
Move Final Status out of transaction_results, use consts

https://gerrit.wikimedia.org/r/208872

Change 208275 had a related patch set uploaded (by Ejegg):
Push gateway_params down into data

https://gerrit.wikimedia.org/r/208275

Change 208295 had a related patch set uploaded (by Ejegg):
getResponseXX -> parseResponseXX

https://gerrit.wikimedia.org/r/208295

Change 208276 had a related patch set uploaded (by Ejegg):
Prepare to prune $transaction_results

https://gerrit.wikimedia.org/r/208276

Ejegg updated the task description. (Show Details)May 5 2015, 8:01 PM
Ejegg set Security to None.
Ejegg edited a custom field.

Change 208275 merged by jenkins-bot:
Push gateway_params down into data

https://gerrit.wikimedia.org/r/208275

Change 208872 merged by jenkins-bot:
Move Final Status out of transaction_results, use consts

https://gerrit.wikimedia.org/r/208872

Change 209154 had a related patch set uploaded (by Ejegg):
Fold parseResponseXX calls into processResponse

https://gerrit.wikimedia.org/r/209154

Change 209408 had a related patch set uploaded (by Ejegg):
Replace setTransactionResult calls in Adyen adapter

https://gerrit.wikimedia.org/r/209408

Change 209612 had a related patch set uploaded (by Ejegg):
Remove validation action from transaction_results

https://gerrit.wikimedia.org/r/209612

Change 209612 merged by jenkins-bot:
Remove validation action from transaction_results

https://gerrit.wikimedia.org/r/209612

Change 208276 merged by jenkins-bot:
Prepare to prune $transaction_results

https://gerrit.wikimedia.org/r/208276

Change 208295 merged by jenkins-bot:
getResponseXX -> parseResponseXX

https://gerrit.wikimedia.org/r/208295

Change 208739 merged by jenkins-bot:
Start refactoring processResponse

https://gerrit.wikimedia.org/r/208739

Change 209154 merged by jenkins-bot:
Fold parseResponseXX calls into processResponse

https://gerrit.wikimedia.org/r/209154

Change 210218 had a related patch set uploaded (by Ejegg):
Create PaymentResult from PaymentTransactionResponse

https://gerrit.wikimedia.org/r/210218

Change 209779 had a related patch set uploaded (by Ejegg):
Get rid of more setTransactionResult calls

https://gerrit.wikimedia.org/r/209779

Change 209785 had a related patch set uploaded (by Ejegg):
Finish eradicating setTransactionResult

https://gerrit.wikimedia.org/r/209785

Change 209791 had a related patch set uploaded (by Ejegg):
Start chipping away at getTransactionAllResults

https://gerrit.wikimedia.org/r/209791

Change 211046 had a related patch set uploaded (by Ejegg):
Make do_transaction return a PaymentTransactionResponse

https://gerrit.wikimedia.org/r/211046

Change 210218 abandoned by Ejegg:
Create PaymentResult from PaymentTransactionResponse

Reason:
Rolled into I5fc027cab109

https://gerrit.wikimedia.org/r/210218

Change 209408 merged by jenkins-bot:
Replace setTransactionResult calls in Adyen adapter

https://gerrit.wikimedia.org/r/209408

Change 209779 merged by jenkins-bot:
Get rid of more setTransactionResult calls

https://gerrit.wikimedia.org/r/209779

Change 209785 merged by jenkins-bot:
Finish eradicating setTransactionResult

https://gerrit.wikimedia.org/r/209785

Change 209791 merged by jenkins-bot:
Start chipping away at getTransactionAllResults

https://gerrit.wikimedia.org/r/209791

Change 211046 merged by jenkins-bot:
Make do_transaction return a PaymentTransactionResponse

https://gerrit.wikimedia.org/r/211046

Ejegg closed this task as Resolved.May 19 2015, 10:12 PM
Ejegg moved this task from Pending Deployment to Done on the Fundraising Sprint Kraftwerk board.