Jump to content

activa

Members
  • Posts

    737
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by activa

  1. Hello i want to return response data in json to the IPN notification send from the gateway . something like // Send a response to mark this transaction as notified $response = array("status" => "OK", "message" => "Status recorded"); header("Content-type: application/json"); echo json_encode($response); is this not possible with the actual code ? as i see the only return is the transaction data . the probleme here, if i don't return a notice to the gateway , it will not stop from sending the IPN every X minute .
  2. this should be done via the solus_vm class, but i tink the solus_vm hasn't any function that can retieve this . you can create your own plugin to achieve this .
  3. is already done via omnipay gateway from our friend MAX . you can check and test it
  4. regardiong the thread subject again . the gateway has no notification function . only return_url . i have used callbacl url as the redirecturl for the gateway , but we have a probleme here . when the client redirect to the callback url , the transaction well recorded in the client dashboad , but we have a probleme in the client received page , as it return no response or message to the client . if we use the return_url as the callback url , the received page show the order is proccessing message, but no transaction are stored in the client side . we have search a multiple solution but no one has what we need . we have tested this code , whith redirecturl set to return_url . public function success(array $get, array $post) { return $this->validate($get, $post); } the paiment validation is done via validate() function , and is well returning the data response, but is not storing any transaction in database . what we need is to store the transaction in database , and set the output transaction as response . we have set callbackurl , but the callback url is redireting to the recieved page and the recieved page call the success function , and no data are set via get or post . i hope if someone has well understand this situation and give me some idea or tips to do .
  5. what you have in modules logs . i have not tested the module . by the way replace it with and test public function renewService($package, $service, $parent_package=null, $parent_service=null) { $row = $this->getModuleRow($package->module_row); $api = $this->getApi($row->meta->reseller_id, $row->meta->key, $row->meta->sandbox == "true"); // Renew domain if ($package->meta->type == "domain") { $fields = $this->serviceFieldsToObject($service->fields); // Load the API $api->loadCommand("logicboxes_domains"); $domains = new LogicboxesDomains($api); $response = $domains->details(array('order-id' => $fields->{'order-id'}, 'options' => array("OrderDetails"))); $this->processResponse($api, $response); $order = $response->response(); $vars = array( 'years' => 1, 'order-id' => $fields->{'order-id'}, 'exp-date' => $order->endtime, 'invoice-option' => "NoInvoice" ); foreach ($package->pricing as $pricing) { if ($pricing->id == $service->pricing_id) { $vars['years'] = $pricing->term; break; } } // Only process renewal if adding years today will add time to the expiry date if (strtotime("+" . $vars['years'] . " years") > $order->endtime) { $response = $domains->renew($vars); $this->processResponse($api, $response); } } else { # # TODO: SSL Cert: Set cancelation date of service? # } return null; }
  6. from the code i don't see any renewal function . so i don't think is working .
  7. i have implemented a way lika you have . now when is safe to deleted the row from database ? after validated response ?
  8. keep the goad work, i live to see some realisation beetwen releases .)
  9. the probleme is how to identify the transaction and the token , let say this example . client A order service A and has paid . client A order service B and has paid . client B order service A and has paid . we have here 3 token , when we store this in database , how to identify the token that match the gateway response ? the only solution is to make a loop for all the token until we get a valid response .
  10. also for me, if we put activation instantly in our website , it should instantly my request goes for activating order and sending email . is a pain wait 5 minute or less to do it .
  11. as menstioned before ... add is not possible with the actual blesta mysql schema . you can vote here . http://www.blesta.com/forums/index.php?/topic/4968-navigation-links-refactor/
  12. you should load it with components loader::loadComponents .
  13. Thanks , max , your idea is brillant , unless this stupid gateway is sending all the response crypted , even if the custom data . look my code //redirection URL $redirect_url = Configure::get("Blesta.gw_callback_url") . Configure::get("Blesta.company_id") . "/payzone/".$this->ifSet($contact_info['client_id']); $merchant_id = $this->ifSet($this->merchant_id); // Filling the request parameters $fields = array( // Client Info 'apiVersion' => $this->apiVersion, 'shopperID' => $this->ifSet($client->id), 'shopperEmail' => $this->ifSet($client->email), 'shopperFirstName' => $this->ifSet($client->first_name), 'shopperLastName' => $this->ifSet($client->last_name), 'shopperPhone' => $this->getContact($client), 'shopperAddress' => $this->ifSet($client->address1) . ' ' . $this->ifSet($client->address2), 'shopperState' => $this->ifSet($client->state), 'shopperCity' => $this->ifSet($client->city), 'shopperZipcode' => $this->ifSet($client->zip), 'shopperCountryCode' => $this->ifSet($client->country), // Global Orders 'orderID' => $order_id, 'currency' => $this->currency, 'amount' => ($amount * 100) , 'shippingType' => $this->shipping_type , 'paymentType' => $this->payment_type , 'paymentMode' => $this->payment_mode , 'customerIP' => $_SERVER['REMOTE_ADDR'] , 'orderDescription' => $this->ifSet($options['description']), 'ctrlRedirectURL' => $redirect_url, 'ctrlCallbackURL' => $redirect_url, 'merchantNotification' => true , 'merchantNotificationTo' => $this->ifSet($this->merchant_notification_to) , 'merchantNotificationLang' => "fr" , 'ctrlCustomData' => $this->serializeInvoices($invoice_amounts) ); $response = $this->execute_request("/transaction/prepare", json_encode($fields)); if (!isset($this->Session)) Loader::loadComponents($this, array("Session")); $this->Session->write("merchantToken", $response['merchantToken']); // print_r($response); Loader::loadHelpers($this, array("Form", "Html")); $this->view = $this->makeView("process", "default", str_replace(ROOTWEBDIR, "", dirname(__FILE__) . DS)); $this->view->set("post_to", $this->payzone_url . "/transaction/". $response['customerToken']."/dopay" ); after the payment the gateway return a reponse all are creypted , and i should decrypt it with // Decrypting $json = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $merchantToken, $Data, MCRYPT_MODE_ECB); if ($json) { // Remove PKCS#5 padding $json = $this->pkcs5_unpad($json); $response = json_decode($json, true); } else { $this->Input->setErrors($this->getCommonError("invalid")); // Log error response $this->log($this->ifSet($_SERVER['REQUEST_URI']), serialize($response), "output", false); return; } then i should work with $response . my probleme and obstacle that the gateway is not returing any thing in plain , that i will use it to identify the transaction in my database . and the big obstacle are in the notifification , because ican't use iether the sessions or the database to identify the transaction . the gateway is payxpert .
  14. more and more , client request navigation link in multi-languages . and also this discussion , Please vote for it if you want to see navigation links in multi-language . http://www.blesta.com/forums/index.php?/topic/4968-navigation-links-refactor/
  15. note , attachment can be anything , and type like zip, rar , can't be loaded in the browser . also note loading in the browser can generate a exploit in somehow , like client upload a malicious file php and he can access it in browser . this case has nothing to compare with the PDF download . Finnaly , yes you can force the output to the browser , it need some core file hack another time .
  16. i send the client and order data to the marchent , it return me a token_id , marchent_url and crypted data of order . then i should send the client to pay with a url that use this toekn as a complete link , like ; https://gateway.com/pay/marchent_url . after the payment , it return me a transaction data without the token_id , this transaction shoulb decrypted by the token_id sended first time . the same way , just paypal return the transaction data in plain . we can't do it , because we should send the callback_url before we get the token . so i think the only way is storing the token in 1 - sessions 2 - cokies 3 - database
  17. interesting . is blesta detect this without a core file modification ?
  18. i have used as najahost say . and it work . but the return_url and the callback_url was confusing for me . i have thinked the callback_url is was used just for notification's gateways . also the success() method is not storing any data as naja7host mentioned by the processReceived() , and i ask why it return all the transaction data if not stoed or showed to the client . so i think it should be at least in the thank_you message display a something like Thank you for your orders ..... Transaction ID ; XXXXXX Amount Paid ; 0000USD Invoice PAID N ; 1451 , 1452 ; 1453 ; What do you think Tyson ?
  19. check the invoice delivery has it do it . it use the tcpdf class .
×
×
  • Create New...