Jump to content

activa

Members
  • Posts

    737
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by activa

  1. Hello we are working in the paypal express checkout gateway , wehave almost done all the code, but when we test it we have some probleme in the callback . we pass the payment to paypal site and it show a successfull payment , and the gateway return the user to the blesta site to return url . in the log no entries for successfull or failed reponse , also no transaction are stored in the clients side . the validate function is the fallowing , is there any mistake in it ? public function validate(array $get, array $post) { print_r($get); $client_id = $this->ifSet($get['client_id']); $token = $this->ifSet($get['token']); // $payer_id = $this->ifSet($get['PayerID']); // if (!$client_id) { // $client_id = $this->clientIdFromEmail($this->ifSet($post['payer_email'])); // } $post_to = $this->getApiUrl(); $params = array( 'TOKEN' => $token, ); $response = $this->execute_request("GetExpressCheckoutDetails", $params); // Exit when we don't get a sucess request if (isset($response['ACK']) && $response['ACK'] != 'Success') { $this->Input->setErrors($this->getCommonError("invalid")); // Log error response $this->log($this->ifSet($post_to), serialize($response), "input", false); return; } // Log Success response $this->log($this->ifSet($post_to), serialize($response), "input", true); // Do the payment $request_params = array( 'TOKEN' => $response['TOKEN'], 'PAYERID' => $response['PAYERID'], 'PAYMENTREQUEST_0_AMT' => $response['PAYMENTREQUEST_0_AMT'], 'PAYMENTREQUEST_0_PAYMENTACTION' => $this->payment_action, 'PAYMENTREQUEST_0_CURRENCYCODE' => $this->currency, ); // Make the call to PayPal to finalize payment $do_response = $this->execute_request("DoExpressCheckoutPayment", $request_params); // Exit when we don't get a sucess request if (isset($do_response['ACK']) && $do_response['ACK'] != 'Success') { $this->Input->setErrors($this->getCommonError("invalid")); // Log error response $this->log($this->ifSet($post_to), serialize($do_response), "input", false); return; } $this->log($this->ifSet($post_to), serialize($do_response), "output", true); // Capture the IPN status, or reject it if invalid switch (strtolower($this->ifSet($do_response['PAYMENTINFO_0_PAYMENTSTATUS']))) { case "completed": case "processed": case "completed-funds-held": $status = "approved"; break; case "pending": case "in-progress": $status = "pending"; break; case "refunded": $status = "refunded"; break; case "voided": $status = "voided"; break; case 'denied': case 'failed': case 'expired': $status = 'declined'; break; default: // Log request received, even though not processed $this->log($this->ifSet($post_to), serialize($do_response['PAYMENTINFO_0_PAYMENTSTATUS']), "output", true); return; } return array( 'client_id' => $client_id, 'amount' => $this->ifSet($do_response['PAYMENTREQUEST_0_AMT']), 'currency' => $this->ifSet($do_response['PAYMENTREQUEST_0_CURRENCYCODE']), 'status' => $status, 'reference_id' => null, 'transaction_id' => $this->ifSet($do_response['PAYMENTINFO_0_TRANSACTIONID']), // 'parent_transaction_id' => $this->ifSet($post['parent_txn_id']), // 'invoices' => $this->unserializeInvoices($this->ifSet($post['custom'])) ); }
  2. i remember that in one day we have made a clean to our blesta 2.5 , and we have deleted about 650 service that are suspended for a long time and about 15000$ of invoiced amount . in v3 also ther are no option to delete the pending service or the unpaid suspended services .
  3. you are talking about Configurable Options , and i'm talking about the package price itself . the conditional logic was made inside the client add fields in the module . the javascripts logic is working, but no way to change the price .
  4. the same logic that was used by boss ( Naja7host) used for old work , the probleme is the price and not the javascript logic code . as the price is difined in the package term , so is not possible to override the price depending in flieds selected or not in the package . but Naja can give more details in this .
  5. Hello Keiro . i will also help just need some time , now what you can do is something to design how the module should be .. field that shouldbe in Package fields that should be in admin side fields that should be in client side which field are mandatory and wich one is obligatory . type of fields (text , selectbox , checkbox, radio ...ect ) and let the other work for me
  6. but , as i know , but wich url we should use in successfull paiement , and wich for failed paiement . normally a failed paiemnt should return to payment page with error failed operation .
  7. i'm working for a new Gateway , but i have some confusion about this urls , when used and what they are ? return_url , $options['return_url'] ? cancel_url , ?? notify_url , callback_url ? and which url should be called in a successful operation , and wish for denied operation , and wish one for canceled operation by client click ?
  8. or add a field in the service table that can store a billing contact , if not set use the default contact . this is very usable case in Europe market , a lot of companies that offer a management or service related to Dedicated server or infrastructure bill the client for their work , and the they not ads any beneficent for the hardware cost , they add beneficent in their related services .
  9. activa

    Release 3.5.0-B5

    are you using this in a production ?
  10. nice work , i don't want to minimize your efforts but this is my real opinion about this module ; this module with that functions is less usable , and is less strong than the universal module . BUT to convert this module to a unique and powerful module is to add to it the CONDITIONAL LOGIC for components . HOW ? add fields to package that let users select thier wanted : - OS (select option) - HDD 1 - HDD 2 - HDD 3 - HDD 4 - RAM (2,4,6,8,12,16,24,32, ...ect) - Ethernet Port ( 100Mp/1Gp) - RAID (0,1,5,10 ...) depend of selected HDD . - Control Panel (Cpanel , Plesk , DA, , Webmin , Inerwork...) - IPs (4,8,16,32,64,128,256 ...) We can help you in this, just we need to colobarate in this work all together , my BOSS (is a user here , AKA Naja7host) has a portfolio for this to do it , i have see a mockup logic for this in his office already . Finally , this is a first step to the real Dedicated Server Module .
×
×
  • Create New...