/** * @param Payment $payment * @return Payment */ public static function addTrackingParameters(Payment $payment) { $resURL = $payment->getResURL(); $url = new Url($resURL); $url->setQueryParameter('utm_nooverride', 1); $payment->setResURL($url->getAbsoluteUrl()); return $payment; }
/** * @param string $method * @param array $args * @throws LastfmException * @return \stdClass|string */ public function call($method, array $args) { $this->callback_url->appendQuery('method=' . $method); //Assign method foreach ($args as $arg => $value) { $this->callback_url->appendQuery($arg . '=' . urlencode($value)); } //dump($this->callback_url->getAbsoluteUrl()); $content = file_get_contents($this->callback_url->getAbsoluteUrl()); if ($this->data_format == self::DATA_JSON) { $result = json_decode($content); if (isset($result->error)) { throw new LastfmException($method . ': ' . $result->message, $result->error); } return $result; } return $content; }
public static function addTrackingParameters(Payment $payment) { $redirectUrls = $payment->getRedirectUrls(); $url = new Url($redirectUrls->getReturnUrl()); $url->setQueryParameter('utm_nooverride', 1); $redirectUrls->setReturnUrl($url->getAbsoluteUrl()); $payment->setRedirectUrls($redirectUrls); return $payment; }