*/ require_once $this->pluginDir . '/extlib/WP_RecurlyClient.php'; $__index__ = 'recurly'; $__sc_options__[$__index__] = 'Recurly'; $__sc_videotutorial__[$__index__] = wlm_video_tutorial('integration', 'sc', $__index__); if (wlm_arrval($_GET, 'cart') == $__index__) { if (!$__INTERFACE__) { // BEGIN Initialization $recurlythankyou = $this->GetOption('recurlythankyou'); $recurlyapikey = $this->GetOption('recurlyapikey'); $recurlyconnections = $this->GetOption('recurlyconnections'); $client = new WP_RecurlyClient($recurlyapikey); //cache me maybe? $plans = get_transient('recurlyconnections'); if (empty($plans)) { $plans = $client->get_plans(); set_transient('recurlyconnections', $plans, 60 * 10); } if (!$recurlythankyou) { $this->SaveOption('recurlythankyou', $recurlythankyou = $this->MakeRegURL()); } $recurlythankyou_url = $wpm_scregister . $recurlythankyou; // save POST URL if (wlm_arrval($_POST, 'recurlyapikey')) { $recurlyapikey = $_POST['recurlyapikey']; $this->SaveOption('recurlyapikey', $recurlyapikey); } if (wlm_arrval($_POST, 'connections')) { $connections = $_POST['connections']; foreach ($connections as $i => $k) { if (!empty($k) && $recurlyconnections[$i] != $k) {