@param null $merchantId

@return Result\Merchant\Info
481297
public static function info($merchantId = null)
    {
        $api = new Api\Info();

        if ($merchantId !== null) {
            $api->setMerchantId($merchantId);
        }

        $result = $api->doRequest();

        return new Result\Merchant\Info($result);
    }
463245
public function getContent($packetId = null)
    {

        if (!isset($this->packetId)) {
            return $content = implode("/n", $this->content);
        }

        //Return the content with PacketId;
        return isset($this->content[$packetId]) ? $this->content[$packetId] : "";
    }
180767
public function commit($transactionId = null)
    {
        return $this->client->sendFrame($this->getProtocol()->getCommitFrame($transactionId));
    }
82918
protected function getBrokerInfo(string $brokerId)
    {
        if (!isset($this->brokers[$brokerId])) {
            return null;
        }

        return $this->brokers[$brokerId];
    }
1350413
public function cancelRefund($refundID, $paymentID)
    {
        $obj = new stdClass();

        // Must be in specific order for checksum --
        $obj->Secret = $this->getSecretCode();
        $obj->MerchantID = $this->getMerchantID();
        $obj->Timestamp = $this->getTimeStamp();
        $obj->RefundID = $refundID;
        $obj->PaymentID = $paymentID;
        // -----------------------------------------  
        // Generate Checksum
        $obj->Checksum = $this->generateChecksum($obj);

        // Ask for cancelRefunt and get response
        $result = $this->client->CancelRefund($obj);
        $result = $result->CancelRefundResult;

        $obj->Timestamp = $result->Timestamp;
        $obj->Success = $result->Success;

        // Unset properties for new Checksum
        unset($obj->RefundID, $obj->PaymentID, $obj->Checksum);

        // Verify response data by making a new Checksum
        $Checksum = $this->generateChecksum($obj);

        // Compare Checksums
        if ($result->Checksum != $Checksum)
            throw new Exception('Data could not be verified');

        return (array) $result;
    }
253292
public function getById(PaymentId $paymentId) : Payment
    {
        if (!array_key_exists((string)$paymentId, $this->payments)) {
            throw PaymentNotFoundException::byId($paymentId);
        }

        return $this->payments[(string)$paymentId];
    }
853056
public function getTerminalUri(string $transactionId): Uri
    {
        $uri = $this->getUri('terminal', ['merchantId' => $this->merchantId, 'transactionId' => $transactionId]);

        return $uri;
    }
1105289
public function getTranslation($languageId = null)
    {
        $languageId = request()->get('language_id');
        if (null === $languageId) {
            return $this;
        } else {
            return $this->translations()->whereLanguageId($languageId)->first();
        }  
    }
1042454
public function getPaymentStatus($merchantToken) {
    if ($merchantToken != null && strlen(trim($merchantToken)) > 0) {
      $url = $this->url . str_replace(":merchantToken", $merchantToken, Connect2PayClient::$API_ROUTES['PAYMENT_STATUS']);
      $url .= '?apiVersion=' . $this->apiVersion;

      $result = $this->doGet($url, array(), false);

      if ($result !== null && is_object($result)) {
        $this->initStatus($result);

        if (isset($this->status)) {
          return $this->status;
        }
      }
    }

    return null;
  }
1084283
public function find($merchant_id, $args = array())
    {
        $url = 'merchants/' . $merchant_id . '/transactions';
        if (!isset($args['limit'])) {
            $args['limit'] = 10;
        }
        $api_response = $this->paylike->client->request('GET', $url, $args);
        $transactions = $api_response->json;
        return new Cursor($url, $args, $transactions, $this->paylike);
    }
1351569
public function closeOrder($paymentId)
    {
        $params = [
            'appid' => $this->appId,
            'mch_id' => $this->mchId,
            'out_trade_no' => $paymentId,
            'nonce_str' => bin2hex(openssl_random_pseudo_bytes(8)),
        ];
        $params['sign'] = $this->createSign($params);
        $response = $this->api('https://api.mch.weixin.qq.com/pay/closeorder', 'POST', $params);
        if ($response->data['trade_state'] == 'SUCCESS') {
            return true;
        }
        return false;
    }
34776
public function create($payment, $paymentId = null)
    {
        if (isset($paymentId)) {
            return $this->client()->put($payment, 'payments/{paymentId}', ['paymentId' => $paymentId]);
        }

        return $this->client()->post($payment, 'payments');
    }
569007
public function loadByTransactionId($transactionId)
    {
        $db = $this->getDb();
        $data = $db->getRow('SELECT * FROM `oepaypal_orderpayments` WHERE `oepaypal_transactionid` = ' . $db->quote($transactionId));

        return $data;
    }
341994
public function status($transactionId)
    {
        $xml = new DOMDocument();
        $transaction = $xml->createElement('hps:Transaction');
        $status = $xml->createElement('hps:GetTransactionStatus');

        $status->appendChild($xml->createElement('hps:GatewayTxnId', $transactionId));

        $transaction->appendChild($status);
        return $this->_submitTransaction($transaction, 'GetTransactionStatus');
    }
152714
public function execute($paymentId)
    {
        $url = $this->environment->getApiQueryURL() . '1/sales/' . $paymentId;

        return $this->sendRequest('GET', $url);
    }
510982
function GetTransactionDetails($txnID) {
    if ($this->_mode == 'payflow') {
      $values['ORIGID'] = $txnID;
      $values['TENDER'] = 'C';
      $values['TRXTYPE'] = 'I';
      $values['VERBOSITY'] = 'MEDIUM';
    } elseif ($this->_mode == 'nvp') {
      $values['TRANSACTIONID'] = $txnID;
    }
    return $this->_request($values, 'GetTransactionDetails');
  }
132593
public function getPdt($transactionID)
    {
        $this->transactionID = $transactionID;
        
        // Now we need to ask PayPal to tell us if it sent this notification
        $pdtResponse = $this->_postData($this->pdtURL, array('cmd' => '_notify-synch', 'tx' => $transactionID, 'at' => $this->pdtToken));
        if ($pdtResponse === FALSE) { // Bail out if we have an error.
            return FALSE;
        }

        // Phew! We have a valid PDT transaction, log it.
        $this->_logTransaction('PDT', 'SUCCESS', 'Parsing complete', $pdtResponse);
        return $pdtResponse;
    }