コード例 #1
0
 public function isVerified()
 {
     if (!$this->isSuccessful()) {
         return null;
     }
     $hash = Hasher::fromArray($this->asArray(), $this->paymentKey);
     return $hash === $this->getHash();
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 protected function prepareForSending($dataArray)
 {
     $dataArray['hash'] = Hasher::fromArray($dataArray, $this->getPaymentKey());
     $this->removeEmptyValues($dataArray);
     return $dataArray;
 }