Advertisement
carlosalvet

api-apiclient.local-dashboard.php

Sep 27th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.85 KB | None | 0 0
  1. <?php
  2. // dashboard/home
  3.  
  4.  
  5. class DashboardController {
  6.     function home() {
  7.         $username ="001b7ec3";
  8.         $password="1234567";
  9.  
  10.         // datos del producto
  11.         //$api = new APIClient();
  12.         //$producto = $api->get("http://apiserver.local/producto/ver/15");
  13.         //print_r($producto);
  14.  
  15.         // ========================================================================
  16.         // OBTENER CRÉDITO DISPONIBLE
  17.         // ========================================================================
  18.  
  19.         // OPCION 1: autenticar con un único método ad hoc
  20.         $api = new APIClient();
  21.         //$api->auth("http://apiserver.local/usuario/autenticar", $username, $password);
  22.  
  23.         // obtener e imprimir crédito
  24.         $credito = $api->get("http://apiserver.local/card/credit");
  25.         print_r($credito);
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement