PHP code example of randler / lib-zoop-php

1. Go to this page and download the library: Download randler/lib-zoop-php 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/ */

    

randler / lib-zoop-php example snippets



  pk = 'zpk_test........Td0';
  $marketplaceId = '43.......92b';
  $SellerId = '1a4.......499';

  $Zoop = new Zoop\Client(
    $marketplaceId, 
    $SellerId, 
    $zpk
  );



  $payment = new Transaction();
  $payment->setDescription('Teste de transação')
          ->setAmount(1035)
          ->setOnBehalfOf($SellerId); // responsavel pela venda

  $pixData = $payment->getPaymentPix();
  
  $pix = $client
      ->payment()
      ->pix($pixData);



  $webhook = $client
      ->webhook()
      ->list();



  $webhook = new Webhook();
  $webhook->setUrl("http://fomefome.loc/api/v3/order/webhook-zoop.html"); // responsavel pela venda

  $webhookData = $webhook->getWebhookData();
        
  $webhook = $client
      ->webhook()
      ->create($webhookData);


      
  $webhook = $client
      ->webhook()
      ->delete(['webhook_id' => '475476f22...97bb8ea8']);