We are working on an dutch payment module (iDEAL) based on the current payment module Authorize.net.
Currently we’re stuck and we have the following questions.
1) What happens after the PLACE ORDER button is pressed?
The javascript on the button opens up the url ‘<?=$this->getUrl('checkout/onepage/saveOrder')?>’ which refers to the OnepageController I think?
But I can’t figurer what happens next.
2) How to debug Http_Client?
In the Authorize.net payment module the function onOrderValidate calls the function postRequest to post some data to Authorize.net cgi url.
I changed the url to the url of the dutch payment provider and posted some data, but this doesn’t work.
My problem is how can I debug the information posted and returned in the Varien_Http_Client?
@bluemotion: you are right the url goes to Mage_Checkout_OnepageController :: saveOrderAction method.
in the configuration there’s a “Enable Debug Log” flag which tells to the module to log all the requests and responses to `paygate_authorizenet_debug` table - will this help?
@bluemotion: you are right the url goes to Mage_Checkout_OnepageController :: saveOrderAction method.
in the configuration there’s a “Enable Debug Log” flag which tells to the module to log all the requests and responses to `paygate_authorizenet_debug` table - will this help?
Can you tell me where the flag is located? Does it has to be in one of the Authorize.net files?
Or do you mean the Mage_Log in the admin/configuration/advanced page? This is enabled by default.
You can see the field in Admin / System / Configuration / Payment Methods / Authorize.Net / Enable Debug Log
In the code it is retrieved by Mage::getStoreConfig(’payment/authorizenet/debug’)
The definition of this flag field is in table core_config_field where path=’payment/authorizenet/debug’
Configuration fields are added by sql/resource_setup/mysql4-(install|upgrade) files, you can see an example in Mage/Paypal/sql/paypal_setup/mysql4-upgrade-01.0-0.1.1.php
1) What happens after the PLACE ORDER button is pressed?
The javascript on the button opens up the url ‘<?=$this->getUrl('checkout/onepage/saveOrder')?>’ which refers to the OnepageController I think?
Moshe (or others), does this mean that orders in Magento get saved to the database before payment processing is done? That would be great news for an iDEAL implementation, since this payment system does not provide transaction feedback to the store (the store owner is expected to independently poll transaction status daily). This relatively unique setup (most payment providers do provide automated feedback to the store independent of the customer returning) required significant hacking in another eCommerce system that didn’t store orders until after payment processing. (In that case, if your customer pays but doesn’t return to the store upon completion, you have a payment but no order to match it to.)
2) How to debug Http_Client?
In the Authorize.net payment module the function onOrderValidate calls the function postRequest to post some data to Authorize.net cgi url.
I changed the url to the url of the dutch payment provider and posted some data, but this doesn’t work.
My problem is how can I debug the information posted and returned in the Varien_Http_Client?
I did some work on having iDEAL work within the Zend Framework: Zend_Service_Ideal. Maybe this can be of additional support. I have not investigated the Varien application in detail, but since it extends the Zend Framework it should be usable in someway. Whenever your interested I can provide you with the source.
2) How to debug Http_Client?
In the Authorize.net payment module the function onOrderValidate calls the function postRequest to post some data to Authorize.net cgi url.
I changed the url to the url of the dutch payment provider and posted some data, but this doesn’t work.
My problem is how can I debug the information posted and returned in the Varien_Http_Client?
I did some work on having iDEAL work within the Zend Framework: Zend_Service_Ideal. Maybe this can be of additional support. I have not investigated the Varien application in detail, but since it extends the Zend Framework it should be usable in someway. Whenever your interested I can provide you with the source.
I’m very interested in the source, I havent had the time to take a look at it again.
I was waiting for the final version. Maybe your source could help me some how.
I’m very interested in the source, I havent had the time to take a look at it again.
I was waiting for the final version. Maybe your source could help me some how.
Ok, well the code is currently working fine in another Zend Framework project, but there is still some work to do. Some logic has to be put in a kind of ‘IdealController’, or ‘TransactionController’, have a look at the manual for details.
Globally the idea is:
//Create service object and appropriate request object $idealConfigArray = array(); $idealConfigArray['privatecert'] = '/securePath/certificate.cer' $idealConfigArray['privatekey'] = '/securePath/privateKey.pem' $idealConfigArray['bankCertDir'] = '/securePath/ideal.cer'; $ideal = new Zend_Service_Ideal($idealConfigArray, false); $request = new Zend_Service_Ideal_AcquirerTrxRequest();
//Set parameters for TransactionRequest $request->setIssuerId( $issuerId ); //Make sure your ideal controller has a idealAcquirerStatusAction which processes the incoming user,process transaction status etc $request->setMerchantReturnURL( 'yourserver/idealAcquirerStatus/' ); $request->setPurchaseId( $orderId ); $amount *= 100;//Multiply amount by 100 to remove decimals as required by iDEAL $request->setAmount($amount ); $request->setCurrency( 'EUR' ); $request->setExpirationPeriod( 'PT1H' ); //One hour $request->setLanguage( 'nl' ); $request->setDescription('OrderDescription here'); //Calculate entrancecode $entranceCode = md5(time().'MySecret'.microtime()); $entranceCode = str_pad($entranceCode, 40, md5(time()-12345), STR_PAD_LEFT); $request->setEntranceCode( $entranceCode );