get_transaction_url() 공개 메소드

Get a link to the transaction on the 3rd party gateway size (if applicable).
public get_transaction_url ( WC_Order $order ) : string
$order WC_Order the order object.
리턴 string transaction URL, or empty string.
예제 #1
0
 /**
  * Get the transaction URL.
  *
  * @param  WC_Order $order
  *
  * @return string
  */
 public function get_transaction_url($order)
 {
     if ($this->testmode) {
         $this->view_transaction_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=%s';
     } else {
         $this->view_transaction_url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=%s';
     }
     return parent::get_transaction_url($order);
 }
 /**
  * Get the transaction URL.
  *
  * @TODO   Replace both 'view_transaction_url'\'s. 
  *         One for sandbox/testmode and one for live.
  * @param  WC_Order $order
  * @return string
  */
 public function get_transaction_url($order)
 {
     if ($this->sandbox == 'yes') {
         $this->view_transaction_url = 'https://www.sandbox.payment-gateway.com/?trans_id=%s';
     } else {
         $this->view_transaction_url = 'https://www.payment-gateway.com/?trans_id=%s';
     }
     return parent::get_transaction_url($order);
 }