Example #1
0
 /**
  * Cancels the specified job and optionally all it's dependents
  *
  * @param bool $dependents true if associated dependents should also be cancelled
  *
  * @return int
  */
 public function cancel($dependents = false)
 {
     if ($dependents && !empty($this->job_data['dependents'])) {
         return call_user_func_array([$this->client, 'cancel'], array_merge([$this->jid], $this->job_data['dependents']));
     }
     return $this->client->cancel($this->jid);
 }
Example #2
0
 /**
  * Cancels a job using the specified identifier
  *
  * @param $jid
  *
  * @return int
  */
 public function cancel($jid)
 {
     return $this->client->cancel($jid);
 }
<?php

require_once '../include/Helpers.php';
require_once '../include/Config.php';
require_once '../backend/Client.php';
$logOutput = 'Log will be displayed here.';
if (isset($_GET["uxBtnCancel"]) && $_GET["uxBtnCancel"] != "") {
    $transactionId = $_GET["uxTransactionId"];
    $transmissionTime = $_GET["uxTransmissionTime"] = isset($_GET["uxTransmissionTime"]) && $_GET["uxTransmissionTime"] != '' ? $_GET["uxTransmissionTime"] : gmdate("Y-m-d H:i:s");
    $client = new Client();
    $responseObject = $client->cancel($transactionId, $transmissionTime, $environment, $secretKey);
    $logOutput = print_r($responseObject, true);
}
?>
<!DOCTYPE html>
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>WyWallet-kassan Test Client</title>
    <meta charset="utf-8" />
    <link href="style.css" rel="stylesheet" />
  </head>
  <body style="width:840px">
    <br>
    <img alt="Wy-kassan Test Tool" src="../img/WyWallet_Logo_RGB_s.png">​​
    <br><br>

    <?php 
echo loadSelector(basename($_SERVER['SCRIPT_NAME']));
?>

    <form method="get" action="<?php