Call-back icon  Sales: Call 800.374.8146 (N America)|757.278.0920 (International)

Magento

Open Source eCommerce Evolved

Magento Forum

   
Payment module not showing on checkout page
 
nonu
Member
 
Total Posts:  60
Joined:  2008-03-26
 

I created a new payment module following wiki guidelines.It is displaying it in admin but not on checkout page.In admin i set it to enable.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nonu
Member
 
Total Posts:  60
Joined:  2008-03-26
 

Basically i need to implement wordpay.If anybody can help me in that plz..

Before that if anybody can give me a good reference for how to create any module in magento plaese please answer both questions please rolleyes

 
Magento Community Magento Community
Magento Community
Magento Community
 
nonu
Member
 
Total Posts:  60
Joined:  2008-03-26
 

Please reply soon please.its urgent rolleyes

 
Magento Community Magento Community
Magento Community
Magento Community
 
nonu
Member
 
Total Posts:  60
Joined:  2008-03-26
 

I follow the below mentioned steps whole day but same result.It was showing in backend but not in frontend

plesae help me if i am doing some mistake

Created a xml file app/etc/modules/Mage_WorldPay
with coding

<config>
<modules>
<Mage_WorldPay>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Payment />
</depends>
</Mage_WorldPay>
</modules>
</config>

Created app/code/local/Mage/WorldPay/etc/config.xml:
with code
<config>

<global>

<!-- declare model group for new module -->

<models>

<!-- model group alias to be used in Mage::getModel(’newmodule/...’) -->

<worldpay>

<!-- base class name for the model group -->

<class>Mage_WorldPay_Model</class>

</worldpay>

</models>

<!-- declare resource setup for new module -->

<resources>

<!-- resource identifier -->

<worldpay_setup>

<!-- specify that this resource is a setup resource and used for upgrades -->

<setup>

<!-- which module to look for install/upgrade files in -->

<module>Mage_WorldPay</module>

</setup>

<!-- specify database connection for this resource -->

<connection>

<!-- do not create new connection, use predefined core setup connection -->

<use>core_setup</use>

</connection>

</worldpay_setup>

<worldpay_write>

<use>core_write</use>

</worldpay_write>

<worldpay_read>

<use>core_read</use>

</worldpay_read>

</resources>

</global>

<default>

<payment>


<worldpay>

<active>0</active>

<model>worldpay/paymentMethod</model>

<order_status>1</order_status>

<title>WorldPay</title>

</worldpay>

</payment>

</default>

</config>

Created app/code/local/Mage/WorldPay/etc/system.xml:
<config>

<sections>

<!-- payment tab -->

<payment>

<groups>

<worldpay translate="label" module="paygate">

<!-- will have title ‘New Module’ -->

<label>WorldPay</label>

<!-- position between other payment methods -->

<sort_order>670</sort_order>

<!-- do not show this configuration options in store scope -->

<show_in_default>1</show_in_default>

<show_in_website>1</show_in_website>

<show_in_store>0</show_in_store>

<fields>

<!-- is this payment method active for the website? -->

<active translate="label">

<!-- label for the field -->

<label>Enabled</label>

<!-- input type for configuration value -->

<frontend_type>select</frontend_type>

<!-- model to take the option values from -->

<source_model>adminhtml/system_config_source_yesno</source_model>

<!-- field position -->

<sort_order>1</sort_order>

<!-- do not show this field in store scope -->

<show_in_default>1</show_in_default>

<show_in_website>1</show_in_website>

<show_in_store>0</show_in_store>

</active>

<order_status translate="label">

<label>New order status</label>

<frontend_type>select</frontend_type>

<source_model>adminhtml/system_config_source_order_status_processing</source_model>

<sort_order>4</sort_order>

<show_in_default>1</show_in_default>

<show_in_website>1</show_in_website>

<show_in_store>0</show_in_store>

</order_status>

<title translate="label">

<label>Title</label>

<frontend_type>text</frontend_type>

<sort_order>2</sort_order>

<show_in_default>1</show_in_default>

<show_in_website>1</show_in_website>

<show_in_store>0</show_in_store>

</title>

</fields>

</worldpay>

</groups>

</payment>

</sections>

</config>

 
Magento Community Magento Community
Magento Community
Magento Community
 
nonu
Member
 
Total Posts:  60
Joined:  2008-03-26
 

Also Created app/code/local/Mage/WorldPay/Model/PaymentMethod.php:
<?php

class Mage_WorldPay_Model_PaymentMethod extends Mage_Payment_Model_Method_Cc

{

/**

* unique internal payment method identifier

*

* @var string [a-z0-9_]

*/

protected $_code = ‘worldpay’;

/**

* Here are examples of flags that will determine functionality availability

* of this module to be used by frontend and backend.

*

* @see all flags and their defaults in Mage_Payment_Model_Method_Abstract

*

* It is possible to have a custom dynamic logic by overloading

* public function can* for each flag respectively

*/


/**

* Is this payment method a gateway (online auth/charge) ?

*/

protected $_isGateway = true;

/**

* Can authorize online?

*/

protected $_canAuthorize = true;



/**

* Can capture funds online?

*/

protected $_canCapture = true;

/**

* Can capture partial amounts online?

*/

protected $_canCapturePartial = true;

/**

* Can refund online?

*/

protected $_canRefund = true;

/**

* Can void transactions online?

*/

protected $_canVoid = true;

/**

* Can use this payment method in administration panel?

*/

protected $_canUseInternal = true;

/**

* Can show this payment method as an option on checkout payment page?

*/

protected $_canUseCheckout = true;

/**

* Is this payment method suitable for multi-shipping checkout?

*/

protected $_canUseForMultishipping = true;

/**

* Can save credit card information for future processing?

*/

protected $_canSaveCc = false;

/**

* Here you will need to implement authorize, capture and void public methods

*

* @see examples of transaction specific public methods such as

* authorize, capture and void in Mage_Paygate_Model_Authorizenet

*/





/**
* Possible result statuses
*/
const RESPONSE_CODE_APPROVED = 1;
const RESPONSE_CODE_DECLINED = 2;
const RESPONSE_CODE_ERROR = 3;
const RESPONSE_CODE_HELD = 4;


public function createFormBlock($name)
{
// create block instance
$block = $this->getLayout()->createBlock(’payment/form_cc’, $name);

// set internal method name (should be simple [a-z0-9_] string)
$block->setMethod($this->_code);

// assign payment instance to the block to get saved information for form representation
$block->setPayment($this->getPayment());
return $block;
}

public function createInfoBlock($name)
{
// create block instance
$block = $this->getLayout()->createBlock(’payment/info_cc’, $name);

// assign payment instance to the block to get saved information
$block->setPayment($this->getPayment());
return $block;
}

public function onOrderValidate(Mage_Sales_Model_Order_Payment $payment)
{

// run CC authorization procedure
$result = $this->_authorize($payment);

// process response
switch ($result->getResponseCode()) {
case self::RESPONSE_CODE_APPROVED:


$payment->setStatus(’APPROVED’)
->setCcApproval($result->getApprovalCode())
->setCcTransId($result->getTransactionId())
->setCcAvsStatus($result->getAvsResultCode())
->setCcCidStatus($result->getCardCodeResponseCode());


$statusId = Mage::getStoreConfig(’payment/’.$this->_code.’/order_status’);

$payment->getOrder()->addStatus($statusId);
break;

case self::RESPONSE_CODE_DECLINED:

// do necessary operations on DECLINED status
$payment->setStatus(’DECLINED’)
->setStatusDescription($result->getResponseReasonText());
break;

// can add here other result options such as self::RESPONSE_CODE_ERROR

}
return $this;
}

protected function _authorize($payment)
{
$request = array(
‘x_card_num’ => $payment->getCcNumber(),
‘x_exp_date’ => sprintf(’&#x02;d-&#x04;d’, $payment->getCcExpMonth(), $payment->getCcExpYear())
);

$response = array(
0 => self::RESPONSE_CODE_APPROVED,
4 => ‘000000’,
6 => ‘1234567689’,
5 => ‘Y’,
);

// create result object
$result = Mage::getModel(’payment/paygate_result’);

// fill it with transaction data from $response
// example array from authorize.net
$result->setResponseCode($response[0]);
$result->setApprovalCode($response[4]);
$result->setTransactionId($response[6]);
$result->setAvsResultCode($response[5]);

return $result;
}
}

Plesae help me plaese

 
Magento Community Magento Community
Magento Community
Magento Community
 
nonu
Member
 
Total Posts:  60
Joined:  2008-03-26
 

Plesae Please Plaese Please Please replyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy needed urgently.

I even don’ know how to create a module and i have to implement worldpay

i follow guidelines for creating payment module,that is also not working showing in admin but not in frontend.....plzzzzzzzzzzzzzzzzzzzz help me . rolleyes

 
Magento Community Magento Community
Magento Community
Magento Community
 
pristine
Jr. Member
 
Total Posts:  4
Joined:  2008-04-18
 

Hi Nonu,

I’m working on a worldpay invisible module.  Check your messages here.  Maybe we can work on this together.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nonu
Member
 
Total Posts:  60
Joined:  2008-03-26
 

Thanks for replying.you are working on it but you must have started creating with a basic payment module.Its not showing
even my basic payment module on checkout.But its showing it in admin. Please help me at least on this in beginning rolleyes .

 
Magento Community Magento Community
Magento Community
Magento Community
 
pristine
Jr. Member
 
Total Posts:  4
Joined:  2008-04-18
 

Hi nonu,

Keep in mind, I’m trying to figure this out just as much as you are.  I am also new to this system so don’t expect miracles smile Whatever I come up with or you come up with, let’s share for our mutual benefit.  I also need to get this done quickly so if I cannot figure it out I may end up hiring a developer.

Just to let you know, I am using Worldpay Select Junior Invisible (HTTP method) without callback.
If it helps, here are some links to the worldpay invisible payment method implementation guide.  It should give you enough information to code the module.

Link to Worldpay Invisible Guide
http://www.worldpay.com/support/integrations/invisible/help/invisible_guide.htm

Worldpay Invisible Test Page Submission Form
http://www.worldpay.com/support/integrations/invisible/example.html

Purchase Parameters / Variables
http://www.worldpay.com/support/integrations/invisible/help/invig_12.html

rawAuthmessage error codes
http://www.worldpay.com/support/integrations/invisible/help/invisible_guide.htm

So far, I have gotten the module to appear in the admin section, but when I enable it, the checkout on the frontend shows up blank.  I’m assuming that once I get the proper code in it will display properly.  I’ll keep you posted.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Eminent Style
Jr. Member
 
Avatar
Total Posts:  27
Joined:  2008-02-17
Peterborough, United Kingdom
 

Has anyone successfully set up Worldpay yet? I don’t really want to move my client to another processor unless I have to. I am eager to hear more about your progress nonu / pristine. Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Phoenix
Sr. Member
 
Avatar
Total Posts:  86
Joined:  2007-12-20
Stuttgart, Germany
 

We just released a free WorldPay extension:

http://www.magentocommerce.com/extension/302/worldpay-extension

 Signature 

Björn Kraus

Phoenix Medien GmbH & Co. KG
Magento Silver-Partner in Stuttgart & Wien
Magento hosting - Magento Cluster

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 800.374.8146 (North America) 757.278.0920 (International)
© Copyright 2008 Varien. Magento is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
33271 users|398 users currently online|73928 forum posts