示例#1
0
 /**
  * Send request with the specified action and parameters
  *
  * @param string $action
  * @param array $parameters
  */
 private function send_request($action, array $parameters = array())
 {
     $parameters = $this->get_parameters($action, $parameters);
     // WordPress functions uses URL encoding
     // @see http://codex.wordpress.org/Function_Reference/build_query
     // @see http://codex.wordpress.org/Function_Reference/add_query_arg
     $url = Pronamic_WP_Util::build_url(self::API_URL, $parameters);
     return Pronamic_WP_Util::remote_get_body($url, 200);
 }
示例#2
0
 /**
  * Check status
  *
  * @param string $rtlo
  * @param string $transaction_id
  * @param string $once
  * @param string $test
  */
 public function check_status($rtlo, $transaction_id, $once, $test)
 {
     $result = null;
     $url = Pronamic_WP_Util::build_url(self::URL_CHECK_TRANSACTION, array('rtlo' => $rtlo, 'trxid' => $transaction_id, 'once' => Pronamic_WP_Util::to_numeric_boolean($once), 'test' => Pronamic_WP_Util::to_numeric_boolean($test)));
     $data = self::remote_get($url);
     if (false !== $data) {
         $result = Pronamic_WP_Pay_Gateways_TargetPay_StatusStringParser::parse($data);
     }
     return $result;
 }
示例#3
0
 /**
  * Start transaction
  *
  * @param Pronamic_WP_Pay_Gateways_TargetPay_Sofort_StartParameters $parameters
  */
 public function start_transaction(Pronamic_WP_Pay_Gateways_TargetPay_SofortStartParameters $parameters)
 {
     $url = Pronamic_WP_Util::build_url(self::URL_START_TRANSACTION, (array) $parameters);
     $data = self::remote_get($url);
     // @todo need work
 }