Jump to content

smicroz

Members
  • Posts

    33
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by smicroz

  1. Update 2

    Finally the confirmation step, should be show a white page with the following text (The payment gateway invoke this page and send (_POST) to check signature and execute the payment)

    status=success&c=mail-trade&s=signature

    I think that confirmation page should be a different to 

    Configure::get("Blesta.gw_callback_url") . Configure::get("Blesta.company_id") ."/paypal_payments_standard/?client_id=" . $this->ifSet($contact_info['client_id']);
    

    Some suggestion?

  2. Hi,

     

    4. Thanks, I reinstalled and language is correctly updated :)

    2. The confirmation page is invoked by the payment gateway with the result of transaction, allowing to the trade accept or reject, if in this page the transaction it not accepted, no payment shall be made. A example code of payment gateway confirmation page (I add to success method)

    Loader::load(dirname(__FILE__) . DS . "lib" . DS . "flowAPI.php");
            $flowAPI = new flowAPI();
    
    
            try {
    			// Read data sent by payment gateway
    			$flowAPI->read_confirm();
    			
    		} catch (Exception $e) {
    			// If there an error the response is false
    			echo $flowAPI->build_response(false);
    			return;
    		}
    
    		//Retrieves the values of the Order
    		$FLOW_STATUS = $flowAPI->getStatus();  //The result of the transaction (success or failure)
    		$ORDEN_NUMERO = $flowAPI->getOrderNumber(); // Trade Order No.
    		$MONTO = $flowAPI->getAmount(); // Transaction amount
    		$ORDEN_FLOW = $flowAPI->getFlowNumber(); // If $FLOW_STATUS = "SUCCESS" the Order No. of payment gateway
    		$PAGADOR = $flowAPI->getPayer(); // Email of end-client
    
    		if($FLOW_STATUS == "SUCCESS") {
    			// The transaction was accepted by payment gateway
    			// Here you can update your information with the data received by payment gateway
    			echo $flowAPI->build_response(true); // Trade accepts the transaction
    		} else {
    			echo $flowAPI->build_response(false); // Trade rejects the transaction
    		}
    

    The response should be similar to

     

    status=SUCCESS&c=trademail&s=electronic signature

     

    But it does not work

     

    Thanks!

  3. Hi Tyson,

     

    Thanks by help!

     

    I have some doubs to create callback.

     

    1. This url should be work to success and failture?

    $this->ifSet($options['return_url']);
    

    2. As there is no a order ID, I set clientNumer-date, the problem I should save it somewhere, because the callback resend (orderid, amount, concept, mail, and ID of transaction generated by gateway [also this id should be saved in somewhere]), any suggestion to store this details? or other solution?

    $order_id = $this->ifSet($contact_info['client_id']) . "-" . time();
    

    3. When gateway is returned to client/pay/received/gatewayname/id/ dates is captured by validate function? and I should send to success function?

    4. OFFTOPIC - I change name of payment gateway from language, but this not is updated to clients? there some cache? if so, how I can clean cache?

     

    Thanks!

     

    Rgds,

    Eduardo

  4. I reread the documentation and had some mistakes, but basically do not get that error now. (I add code a little below, $parameters is a hidden input that contains order details and some requirements of payment gateway, as amount, order id, description, private_key)

     

    But I have some doubts about how it blesta works

     

    1. First, about order id, when a user is in /client/pay/confirm/ , there some order_id to identify the transaction?

    2. The payment gateway url needs three url post-payment process. I only should be use the callback with blesta? any suggestion?

     

    Confirmation page (callback): It corresponds to a page that will be called by the gateway with the outcome of the transaction. If the payment was made by credit card on this page you can confirm or reject the transaction. For this payment gateway will deliver the transaction data and you can verify if they match the data you sent.

    Success page:This page will be called by the payment gateway once the transaction is accepted and send the data of the successful transaction.

    Failure page: This page will be called by the payment gateway when the transaction was rejected.

     

    Process.pdt

    	// Disable CSRF for this form
    	$this->Form->setCsrfOptions(array('set_on_create' => false));
    	
    	$this->Form->create($post_to);
    	$this->Form->fieldHidden('parameters', $parameters);
    	
    	$this->Form->fieldSubmit("submit", $this->_("Flow.buildprocess.submit", true));
    	
    	$this->Form->end();
    

    Thanks!

  5. Hi,

     

    There some way to check if email handling is setup correctly in support departments?

     

    I setup Imap email handling, but for some reason mails not are transferred to tickets.

     

    I checked that mailparse is installed.

    # php -i | grep mailparse
    mailparse
    mailparse support => enabled
    mailparse.def_charset => us-ascii => us-ascii
    
    

    Any suggestion?

     

    Thanks

     

    Rgds,

    Eduardo

  6. Should be to url provided by payment gateway, include order number, amount, description and mail.

    {
    		
            $amount = round($amount, 2);
    
            $order_id = $this->ifSet($contact_info['client_id']) . "-" . time();
    
            //redirection URL
            $redirect_url = Configure::get("Blesta.gw_callback_url") . Configure::get("Blesta.company_id") . "/flow/" . $this->ifSet($contact_info['client_id']);
    
    
    		$fields = array(
    				'orden_compra' => $order_id,
    				'monto' => $amount,
    				'concepto' => $this->ifSet($options['description']),
    				'email_pagador' => $this->ifSet($client->email),
    				);
    
    
    		$this->view = $this->makeView("process", "default", str_replace(ROOTWEBDIR, "", dirname(__FILE__) . DS));
    		// Load the helpers required for this view
    		Loader::loadHelpers($this, array("Form", "Html"));
    
    
    		$this->view->set("post_to", $flow_url_pago);
    		$this->view->set("fields", $fields);
    		
    		return $this->view->fetch();
    	}
    
×
×
  • Create New...