Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Payment Gateway is most important section of any eCommerce or Shopping website. Where user can purchase and pay by using Credit Cards online. Magento base code developed in Zend Framewor Module structure. !ere developer can developed modules and e"tensions as per there re#uirement and use or re$use. % payment gateway system mostly do & %. valid and accept credit card detail '. autherise payment detail when submit order detail C. Save (ransaction )* along with user detail in +rder So lets create a Custom Payment Gateway Module in Magento in below steps, here our module name is -.eePayment & 1. Create "ml file in app/etc/modules/Company0ame1-.eePayment."ml for Module declarate&
2config3 2modules3 2Company0ame1-.eePayment3 2active3true2/active3 2codePool3local2/codePool3 2depends3
2/setup3 2connection3 2use3core1setup2/use3 2/connection3 2/e.eepayment1setup3 2e.eepayment1write3 2connection3 2use3core1write2/use3 2/connection3 2/e.eepayment1write3 2e.eepayment1read3 2connection3 2use3core1read2/use3 2/connection3 2/e.eepayment1read3 2/resources3 2/global3 29$$ default configuration values for this module $$3 2default3 29$$ :payment: configuration section $$3 2payment3 29$$ :e.eepayment: configuration group $$3 2e.eepayment3 29$$ by default this payment method is inactive $$3 2active382/active3 29$$ model to handle logic for this payment method $$3 2model3e.eepayment/paymentMethod2/model3 29$$ order status for new orders paid by this payment method $$3 2order1status3pending2/order1status3 29$$ default title for payment chec out page and order view page $$3 2title3Credit Card ;%uthori.e.net<2/title3
2cctypes3%-,=),MC,*)2/cctypes3
//Can use payment method internal in admin panel4 protected ?1canBse)nternal 5 true@
//Can show payment method as an option on chec out payment page4 protected ?1canBseChec out 5 true@
//)s this payment method for multiple shipping chec out4 protected ?1canBseForMultishipping 5 true@
//Save credit card detail for future processing4 protected ?1canSaveCc 5 false@
//!ere you will need to code for authori.e, capture and void public methods payment gateway C 43
)n this above class now we have to do actual code for communicating payment gateway. )f in admin panel you have selected D%uthori.e +nlyE, then authori.e method will be called. )f you have chosen D%uthori.e and Capture then only the capture method will be called 4. 0ow create system "ml file app/code/local/Company0ame/-.eePayment/etc/system."ml for *eclare configuration options in magento admin panel &
24"ml version567.8643 2config3 2sections3 29$$ payment tab $$3 2payment3 2groups3 29$$ e.eepayment fieldset $$3 2e.eepayment translate56label6 module56paygate63 29$$ For title :-.ee Payment: $$3 2label3-.ee Payment2/label3 2sort1order3FG82/sort1order3 29$$ not to show configuration options in store scope $$3
2show1in1default372/show1in1default3 2show1in1website372/show1in1website3 2show1in1store382/show1in1store3 2fields3 29$$ active for website4 $$3 2active translate56label63 2label3-nabled2/label3 2frontend1type3select2/frontend1type3 2source1model3adminhtml/system1config1source1yesno2/source1model3 2sort1order372/sort1order3 2show1in1default372/show1in1default3 2show1in1website372/show1in1website3 2show1in1store382/show1in1store3 2/active3 2order1status translate56label63 2label30ew order status2/label3 2frontend1type3select2/frontend1type3 2source1model3adminhtml/system1config1source1order1status1processing2/source1model3 2sort1order3H2/sort1order3 2show1in1default372/show1in1default3 2show1in1website372/show1in1website3 2show1in1store382/show1in1store3 2/order1status3 2title translate56label63 2label3(itle2/label3 2frontend1type3te"t2/frontend1type3 2sort1order3I2/sort1order3 2show1in1default372/show1in1default3 2show1in1website372/show1in1website3 2show1in1store382/show1in1store3 2/title3 2/fields3 2/e.eepayment3
Note : 7. Ma e sure in your system app/code/local is in include1path. I. *ont put your module in Aoot Mage folder L. Mour module first letter should be capitali.ed ;eg. -.eePayment<. H. )f your module is not showing in admin congiguration section then chec and config."ml file. N. Clear your system cache.
!ope above e"ample will help you to create custom module in magento. )f you face any problem in e"isting code or any magento related please fill free to contact or comment us. We will feel proud to help you. Ezeelive Technologies ;Magento *evelopment Company in )ndia <has e"pert team in custom magento theme design, reponsive magento ecommerce portal development and magento customization india. We developed and implement custom module, e"tension and plugin as per proOect or client re#uirement. Written 'y & -.eelive (echnologies