function _query_pm($pmconfigs, $uid) { $this->_init_pm($pmconfigs); $query = new \beGateway\QueryByUid(); $query->setUid($uid); $this->_verify_request = $query->submit(); }
\beGateway\Logger::getInstance()->setLogLevel(\beGateway\Logger::DEBUG); $transaction = new \beGateway\Payment(); $amount = rand(100, 10000); $transaction->money->setAmount($amount); $transaction->money->setCurrency('EUR'); $transaction->setDescription('test'); $transaction->setTrackingId('my_custom_variable'); $transaction->card->setCardNumber('4200000000000000'); $transaction->card->setCardHolder('John Doe'); $transaction->card->setCardExpMonth(1); $transaction->card->setCardExpYear(2030); $transaction->card->setCardCvc('123'); $transaction->customer->setFirstName('John'); $transaction->customer->setLastName('Doe'); $transaction->customer->setCountry('LV'); $transaction->customer->setAddress('Demo str 12'); $transaction->customer->setCity('Riga'); $transaction->customer->setZip('LV-1082'); $transaction->customer->setIp('127.0.0.1'); $transaction->customer->setEmail('*****@*****.**'); $response = $transaction->submit(); print "Transaction message: " . $response->getMessage() . PHP_EOL; print "Transaction status: " . $response->getStatus() . PHP_EOL; if ($response->isSuccess()) { print "Transaction UID: " . $response->getUid() . PHP_EOL; print "Trying to Query by UID " . $response->getUid() . PHP_EOL; $query = new \beGateway\QueryByUid(); $query->setUid($response->getUid()); $query_response = $query->submit(); print_r($query_response); }