Example #1
0
 protected function runChargeUserBillingProfile()
 {
     $client = new SoapClient($this->cim_test_url);
     $params = $this->returnSoapAuth();
     $params['transaction'] = array("profileTransAuthCapture" => array("amount" => $this->get("transaction.amount"), "customerProfileId" => $this->get("transaction.acc_op1"), "customerPaymentProfileId" => $this->get("transaction.acc_op2"), "order" => array("invoiceNumber" => $this->get("transaction.foreign_key"), "description" => $this->get("transaction.model") . ":" . $this->get("transaction.foreign_key"))));
     $resObj = $client->CreateCustomerProfileTransaction($params);
     $res = $resObj->CreateCustomerProfileTransactionResult->directResponse;
     $this->response_data = $this->parseResponse($res, ",");
     $this->formatTransactionResponse("charge");
     switch ($this->response_data['response_code']) {
         case 1:
             return true;
             break;
         default:
             return false;
             break;
     }
 }