Exemplo n.º 1
0
 /**
  * @test
  * /// <summary>Batch close cert test.</summary>
  */
 public function testBatchShouldCloseOk()
 {
     try {
         /*
                     $batchSvc = new HpsBatchService(TestServicesConfig::validMultiUseConfig());
                     $response = batchSvc.CloseBatch();
         */
         $batchSvc = new HpsBatchService(TestServicesConfig::validMultiUseConfig());
         $response = $batchSvc->closeBatch();
         if ($response == null) {
             $this->fail("Response is null.");
         }
     } catch (HpsException $e) {
         if ($e->code != HpsExceptionCodes::NO_OPEN_BATCH) {
             $this->fail("Something failed other than 'no open batch'.");
         }
     }
 }
Exemplo n.º 2
0
 public function test999CloseBatch()
 {
     try {
         $response = $this->batchService->closeBatch();
         if ($response == null) {
             $this->fail("Response == null");
         }
         printf('batch id: %s', $response->id);
         printf('sequence number: %s', $response->sequenceNumber);
     } catch (HpsException $e) {
         $this->fail($e->message);
     }
 }
Exemplo n.º 3
0
 public function test999CloseBatch()
 {
     try {
         $response = $this->batchService->closeBatch();
         if ($response == null) {
             $this->fail("Response is null");
         }
         // printf("\nbatch id: %s", $response->id);
         // printf("\nsequence number: %s", $response->sequenceNumber);
         # print self::$customerPersonKey;
         # print self::$customerCompanyKey;
         # print self::$paymentMethodKeyVisa;
         # print self::$paymentMethodKeyMastercard;
         # print self::$paymentMethodKeyCheckPpd;
         # print self::$paymentMethodKeyCheckCcd;
         # print self::$scheduleKeyVisa;
         # print self::$scheduleKeyMastercard;
         # print self::$scheduleKeyCheckPpd;
         # print self::$scheduleKeyCheckCcd;
     } catch (HpsException $e) {
         $this->fail($e->getMessage());
     }
 }