Advertisement
Guest User

Untitled

a guest
Jun 13th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <?php
  2. if ( !defined( 'ABSPATH' ) ) exit;
  3.  
  4. if ( !class_exists( 'CHN' ) ) :
  5.  
  6. class CHN extends Base {
  7. // URL Path CNH
  8. protected $url_path = '/v1/path';
  9.  
  10. // Array campos
  11. public $doador = array();
  12.  
  13. // Array campos - cartão
  14. public $dados = array();
  15. public $credito = array();
  16.  
  17. public $cpf;
  18. public $nome;
  19. public $data_nascimento;
  20. public $email;
  21. public $celular;
  22.  
  23.  
  24. public function __construct() {
  25. }
  26.  
  27. public function generate_json() {
  28. $json_array = array(
  29. $this->doador
  30. );
  31. return json_encode($json_array);
  32. }
  33.  
  34. public function finish_order() {
  35. $return = $this->CallAPI("POST", $url_base, $this->generate_json);
  36. }
  37. }
  38.  
  39. $newDados = new Dados_CHN();
  40.  
  41. $newDados->doador = array(
  42. "cpf" => $cpf,
  43. "nome" => $nome,
  44. "data_nascimento" => $data_nascimento,
  45. "email" => $email,
  46. "celular" => $celular,
  47. );
  48.  
  49. endif;
  50.  
  51. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement