Jump to content

Tikweb

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Tikweb

  1. We are using QuickPay in our blesta site, We can pay through QuickPay but blesta not getting any response or it could not update package status.

    When we hard coded status as approved, Then its work fine, The problem is $get and $post array is empty of validate method.

        public function validate(array $get, array $post)
        {
            // validate inputs for settings page / processing etc
            // Return the payment information
            file_put_contents('valget.txt',print_r($get,true));
            file_put_contents('valpost.txt',print_r($post,true));

            $status = 'approved';
            return array(
                'client_id' => 30,
                'amount' => 1000,
                'currency' => "USD",
                'invoices' => 22,
                'status' => 'approved',
                'transaction_id' => "11223355"
            );

  2. On 6/12/2015 at 0:34 AM, AllToolKits.com said:

    I got what  i want now :)

    
          $params = $event->getParams();
          $service_id = (int) $params['service_id'];
          Loader::loadModels($this, array("Services", "Packages"));
          $details = $this->Services->get( $service_id);  
          $package_id = (int) $details->package->id;
          $p_details = $this->Packages->get($package_id);
          $meta_array = array();
          $meta_array =  $p_details->meta;

    Thank you AllToolKits.com, I have got a big solution from your code. Blesta doesn't give package id in Invoice. i go to service class then get package id.

     

  3. Can you help me what will be the correct line(that is line number 6 in my complete source code below), if i would like to show the all invoice data throughout the api,
    $response = $api->get("invoices", "get", array('user_id' => 1));

    This is my complete source code below,

    require_once "blesta_api.php";
    $user = "api_user";
    $key = "api_key";
    $url = "http://dev.cloudnordicadmin.com.tikweb.dk/api/";
    $api = new BlestaApi($url, $user, $key);
    $response = $api->get("invoices", "get", array('user_id' => 1));
    print_r($response->response());
    print_r($response->errors());

×
×
  • Create New...