-1

I was looking at the web and did not find anything for magento like our solution. We are a payment gateway which receives information, process and return OK/fail to the page. (restul approach).

Is there any clue of how to do it? I know that Magento is MVC and I am familiar with that. At their website, they teach how to create a payment method only authorizing from within magento. I want to post to a URL ($STOREID, $AMOUNT, $ORDERID). After processing the payment, I will return the status to Magento and the transaction will be completed.

Any help will be very appreciated.

Regards,

Thiago

1 Answers1

0

The more correct way http://www.magentocommerce.com/api/rest/introduction.html

or create a new controller name it whatever you like and the controller should look something like this:

 <?php
    class Namespace_Module_Brand_IndexController extends Mage_Core_Controller_Front_Action
    {
    public function indexAction()
    {
    $post = $this->getRequest()->getPost();
    $params = $this->getRequest()->getParams();

    $current_checkout = Mage::getSingleton('checkout/session');

    //do whatever you want based on the information provided
    //you might also want to know about:
    $this->_redirect('path/to/redirect');
    $this->_forward('path/to/action');   
    }

    }
ajameswolf
  • 1,650
  • 4
  • 21
  • 43