Example #1
0
 private function getPaymentHandler()
 {
     $payment = new GoogleCheckout($this->details);
     $payment->setApplication(CustomerOrder::getApplication());
     $payment->setConfigValue('sandbox', '1');
     $payment->setConfigValue('merchant_id', '952173450848810');
     $payment->setConfigValue('merchant_key', '7fUUEkKof9OD-6u6cUNX8g');
     $payment->setOrder($this->createOrder());
     return $payment;
 }
 function saveSettings()
 {
     global $Shopp;
     // Build the Google Checkout API URL if Google Checkout is enabled
     if (!empty($_POST['settings']['GoogleCheckout']['id']) && !empty($_POST['settings']['GoogleCheckout']['key'])) {
         $GoogleCheckout = new GoogleCheckout();
         $url = add_query_arg(array('shopp_xorder' => 'GoogleCheckout', 'merc' => $GoogleCheckout->authcode($_POST['settings']['GoogleCheckout']['id'], $_POST['settings']['GoogleCheckout']['key'])), $Shopp->link('catalog', true));
         $_POST['settings']['GoogleCheckout']['apiurl'] = $url;
     }
 }
Example #3
0
	function apiurl () {
		global $Ecart;
		// Build the Google Checkout API URL if Google Checkout is enabled
		if (!empty($_POST['settings']['GoogleCheckout']['id']) && !empty($_POST['settings']['GoogleCheckout']['key'])) {
			$GoogleCheckout = new GoogleCheckout();
			$url = add_query_arg(array(
				'_txnupdate' => 'gc',
				'merc' => $GoogleCheckout->authcode(
										$_POST['settings']['GoogleCheckout']['id'],
										$_POST['settings']['GoogleCheckout']['key'])
				),ecarturl(false,'checkout',true));
			$_POST['settings']['GoogleCheckout']['apiurl'] = $url;
		}
	}