public static function main() { $transactionCode = "33373E4564B94A58A0E764F07B49715C"; try { /** * @todo * #### Credentials ##### * Replace the parameters below with your credentials (e-mail and token) * You can also get your credentials from a config file. See an example: * $credentials = PagSeguroConfig::getAccountCredentials(); */ $credentials = new PagSeguroAccountCredentials("*****@*****.**", "E231B2C9BCC8474DA2E260B6C8CF60D3"); $response = PagSeguroCancelService::createRequest($credentials, $transactionCode); self::printResponse($response); } catch (PagSeguroServiceException $e) { die($e->getMessage()); } }
/** * Request a PagSeguro cancel * @param string $transactionCode * @return Ambigous <boolean, NULL, string, unknown> */ public function cancelRequest($transactionCode) { return $this->cancelService->createRequest($this->credentials, $transactionCode); }