Exemplo n.º 1
0
 public function testQueryInvoiceError()
 {
     $this->setExpectedException('MyPay\\Core\\MyPayException');
     $checkout = new Checkout("QzNBNjkyRkNFOUJFNTRBMTdCNTBDOTRGRjE4ODAwRjFDNkY0QTE3QQ==", false, true);
     $checkout->ckeckInvoice("88129721893712937");
     //Invoice Unique Id
 }
Exemplo n.º 2
0
<?php

require_once __DIR__ . '/../src/autoload.php';
use MyPay\Checkout\Checkout;
try {
    $checkout = new Checkout("NjQ1MzVDNUE2M0Y0QUI0NzU4NTQwMEFGNkU1QUZGQTdDMTZDOTJFNw==");
    $dados = $checkout->ckeckInvoice("ff520c91fd6f01d5ba757cb9b71dc58c");
    //Invoice Unique Id
    $status = $checkout->getInvoiceStatus();
} catch (\MyPay\Core\MyPayException $e) {
    echo $e->getMessage();
}