Page MenuHomePhabricator

Sandbox cURL requests to facilitate local testing
Closed, ResolvedPublic


From a conversation in #wikimedia-tech. We want to be able to keep cURL requests from going to payment processors and the like, so we can test locally without charging accidentally to credit cards or causing intergalactic crises.

IRC log included in part for posterity:

2013-05-08 - 11:21:31 <K4-713> We can fake it by damaging cURL in a gateway child class and just have it pull in a local form.
2013-05-08 - 11:22:31 <K4-713> So, any time it goes to contact the outside world, it just pulls in HTML from a test dir and *says* it's from the third party. Make sense?
2013-05-08 - 11:22:46 <K4-713> Well, the function that uses cURL.
2013-05-08 - 11:23:09 <K4-713> It's all contained conveniently in one place.
2013-05-08 - 11:23:33 <K4-713> Because I wanted to be able to do exactly this. :)
2013-05-08 - 11:24:33 <K4-713> There it is. "curl_transaction".
2013-05-08 - 11:25:16 <K4-713> Currently line 1284 of DonationInterface/gateway_common/gateway.adapter.php, which all payment adapter classes descend from eventually.
2013-05-08 - 11:26:13 <K4-713> Faking the $retval might be, well... impossible if you don't have some valid account with GC.

Version: master
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:22 AM
bzimport set Reference to bz48270.

Related URL: (Gerrit Change I450bb7ff97eae01996709bf720399f91c1885672)