Skip to content

Instantly share code, notes, and snippets.

@rsanchez
Created April 17, 2012 17:25
Show Gist options
  • Save rsanchez/2407622 to your computer and use it in GitHub Desktop.
Save rsanchez/2407622 to your computer and use it in GitHub Desktop.
Cartthrob config to set curl proxy if Charles is open, for debugging payment gateway request/response
<?php
if (trim(shell_exec('osascript -e \'tell app "System Events" to count processes whose name is "Charles"\'')))
{
$config['cartthrob:curl_proxy'] = '127.0.0.1';
$config['cartthrob:curl_proxy_port'] = 8888;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment