1. Go to this page and download the library: Download brunopazz/zoop-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$credentials = new Credentials("xxx","zpk_test_xxxx", "xxxxxx","PRODUCTION");
$transaction = new Boleto();
$transaction->setAmount(704);
$transaction->setCurrency("BRL");
$transaction->setDescription("minhaloja");
$transaction->setPaymentType("boleto");
$transaction->setOnBehalfOf("f90083c033c24bae834a41077e03ba31");
$transaction->setExpirationDate("2019-11-20");
$transaction->setPaymentLimitDate("2019-11-20");
$transaction->setBodyInstructions("teste de instrucao");
$customer = new Customer();
$customer->setFirstName("Bruno Teste");
$customer->setTaxpayerId("30628284812");
$customer->setEmail("[email protected]");
$customer->setAddressLine1("ruas de testes");
$customer->setAddressLine2("bairro teste");
$customer->setAddressNeighborhood("centro");
$customer->setAddressCity("Sao paulo");
$customer->setAddressState("SP");
$customer->setAddressPostalCode("04742350");
$customer->setAddressCountryCode("BR");
$zoop = new Zoop($credentials);
$authorize = $zoop->Boleto($transaction,$customer);
$split = new Split();
$split->setLiable(true)
->setAmount(100)
->setChargeProcessingFee(true)
//->setPercentage(50)
->setRecipient("0a4775ddea084632973fca5b384847fd");
$splitResponse = $zoop->Split($split,$authorize->getId());
if($splitResponse->hasSplitted()){
print "OK";
}else
print $splitResponse->toJSON();
$credentials = new Credentials("xxx","zpk_test_xxxx", "xxxxxx","PRODUCTION");
$seller = new Seller($credentials);
print_r($seller->getById("0c2fb87678664ce694c3ace391923f9d"));