예제 #1
0
 public function isVerified()
 {
     if (!$this->isSuccessful()) {
         return null;
     }
     $hash = Hasher::fromArray($this->asArray(), $this->paymentKey);
     return $hash === $this->getHash();
 }
 public function testSend()
 {
     $this->setMockHttpResponse('ResendEmailSuccess.txt');
     $response = $this->request->send();
     $this->assertTrue($response->isSuccessful());
     $this->assertTrue($response->isVerified());
     $this->assertSame('68206013', $response->getTransactionReference());
     $this->assertNull($response->getMessage());
     $expectedHash = Hasher::fromArray($response->asArray(), $this->options['paymentKey']);
     $this->assertSame($response->getHash(), $expectedHash);
 }
 protected function prepareForSending($dataArray)
 {
     $dataArray['hash'] = Hasher::fromArray($dataArray, $this->getPaymentKey());
     $this->removeEmptyValues($dataArray);
     return $dataArray;
 }