public function pay(SimplePay_Pay $spay) { $parameters = array(); $parameters['amount'] = $spay->getAmount(); $parameters['description'] = $spay->getDescription(); $parameters['referenceId'] = $spay->getReferenceId(); $paymentHash = md5($this->_awsAccessKeyId . $this->_awsSecretAccessKey . $spay->getReferenceId() . $_COOKIE['SHOP_ORDER_TOKEN'] . $spay->getAmount()); $parameters['accessKey'] = $this->_awsAccessKeyId; $parameters['immediateReturn'] = 1; $parameters['returnUrl'] = $GLOBALS['ShopPathSSL'] . '/finishorder.php?sessionId=' . $_COOKIE['SHOP_ORDER_TOKEN'] . '&hash=' . $paymentHash; $parameters['abandonUrl'] = 'http://www.google.com'; $parameters['signature'] = $this->_signParameters($parameters, $this->_awsSecretAccessKey); $query = $this->_convertToString($parameters); header('Location: ' . $this->_url . '?' . $query); }
public function pay(SimplePay_Pay $spay) { $parameters = array(); $parameters['amount'] = $spay->getAmount(); $parameters['description'] = $spay->getDescription(); $parameters['referenceId'] = $spay->getReferenceId(); $paymentHash = md5($this->_awsAccessKeyId.$this->_awsSecretAccessKey.$spay->getReferenceId().$_COOKIE['SHOP_ORDER_TOKEN'].$spay->getAmount()); $parameters['accessKey'] = $this->_awsAccessKeyId; $parameters['immediateReturn'] = 1; $parameters['returnUrl'] = $GLOBALS['ShopPathSSL'] . '/finishorder.php?sessionId='.$_COOKIE['SHOP_ORDER_TOKEN'].'&hash='.$paymentHash; $parameters['abandonUrl'] = $GLOBALS['ShopPathSSL'] . '/cart.php'; $query = self::getSignedParamString($this->_url, $parameters, $this->_awsSecretAccessKey, 'GET'); header('Location: '.$this->_url.'?'.$query); }