<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    Mage
 * @package     Mage_Paypal
 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
-->
<config>
    <modules>
        <Mage_Paypal>
            <version>1.4.0.2</version>
        </Mage_Paypal>
    </modules>
    <global>
        <models>
            <paypal>
                <class>Mage_Paypal_Model</class>
                <resourceModel>paypal_mysql4</resourceModel>
            </paypal>
            <paypal_mysql4>
                <class>Mage_Paypal_Model_Mysql4</class>
                <entities>
                    <api_debug><table>paypal_api_debug</table></api_debug>
                    <settlement_report><table>paypal_settlement_report</table></settlement_report>
                    <settlement_report_row><table>paypal_settlement_report_row</table></settlement_report_row>
                    <cert><table>paypal_cert</table></cert>
                </entities>
            </paypal_mysql4>
        </models>
        <resources>
            <paypal_setup>
                <setup>
                    <module>Mage_Paypal</module>
                    <class>Mage_Paypal_Model_Mysql4_Setup</class>
                </setup>
            </paypal_setup>
        </resources>
        <blocks>
            <paypal><class>Mage_Paypal_Block</class></paypal>
        </blocks>
        <sales>
            <order>
                <statuses>
                    <!-- retained for backwards compatibility, not used anymore -->
                    <pending_paypal translate="label"><label>Pending PayPal</label></pending_paypal>
                </statuses>
            </order>
        </sales>
        <payment>
            <cc>
                <types>
                    <SM translate="name">
                        <code>SM</code>
                        <name>Switch/Maestro</name>
                        <order>60</order>
                    </SM>
                    <SO translate="name">
                        <code>SO</code>
                        <name>Solo</name>
                        <order>61</order>
                    </SO>
                </types>
            </cc>
        </payment>
        <payment>
            <groups>
                <paypal>PayPal</paypal>
            </groups>
        </payment>
    </global>
    <frontend>
        <secure_url>
            <paypal_express>/paypal/express</paypal_express>
            <paypal_standard>/paypal/standard</paypal_standard>
        </secure_url>
        <routers>
            <paypal>
                <use>standard</use>
                <args>
                    <module>Mage_Paypal</module>
                    <frontName>paypal</frontName>
                </args>
            </paypal>
        </routers>
        <translate>
            <modules>
                <Mage_Paypal>
                    <files>
                        <default>Mage_Paypal.csv</default>
                    </files>
                </Mage_Paypal>
            </modules>
        </translate>
        <layout>
            <updates>
                <paypal>
                    <file>paypal.xml</file>
                </paypal>
            </updates>
        </layout>
        <secure_url>
            <paypal_express_callbackshippingoptions>paypal/express/callbackshippingoptions</paypal_express_callbackshippingoptions>
        </secure_url>
        <events>
            <checkout_submit_all_after>
                <observers>
                    <payflowlink_save_order_after_submit>
                        <class>paypal/observer</class>
                        <method>saveOrderAfterSubmit</method>
                    </payflowlink_save_order_after_submit>
                </observers>
            </checkout_submit_all_after>
            <controller_action_postdispatch_checkout_onepage_saveOrder>
                <observers>
                    <payflowlink_save_order_onepage>
                        <class>paypal/observer</class>
                        <method>setResponseAfterSaveOrder</method>
                    </payflowlink_save_order_onepage>
                </observers>
            </controller_action_postdispatch_checkout_onepage_saveOrder>
        </events>
    </frontend>
    <adminhtml>
        <translate>
            <modules>
                <Mage_Paypal>
                    <files>
                        <default>Mage_Paypal.csv</default>
                    </files>
                </Mage_Paypal>
            </modules>
        </translate>
    </adminhtml>
    <default>
        <paypal>
            <style>
                <logo>nowAccepting_150x60</logo>
            </style>
            <wpp>
                <api_password backend_model="adminhtml/system_config_backend_encrypted"/>
                <api_signature backend_model="adminhtml/system_config_backend_encrypted"/>
                <api_username backend_model="adminhtml/system_config_backend_encrypted"/>
                <api_authentication>0</api_authentication>
                <button_flavor>dynamic</button_flavor>
            </wpp>
            <wpuk>
                <user backend_model="adminhtml/system_config_backend_encrypted"/>
                <pwd backend_model="adminhtml/system_config_backend_encrypted"/>
            </wpuk>
            <fetch_reports>
                <ftp_login backend_model="adminhtml/system_config_backend_encrypted"/>
                <ftp_password backend_model="adminhtml/system_config_backend_encrypted"/>
                <schedule>1</schedule>
                <time>00,00,00</time>
            </fetch_reports>
        </paypal>
        <payment>
            <paypal_express>
                <model>paypal/express</model>
                <title>PayPal Express Checkout</title>
                <payment_action>Authorization</payment_action>
                <solution_type>Mark</solution_type>
                <line_items_enabled>1</line_items_enabled>
                <visible_on_cart>1</visible_on_cart>
                <visible_on_product>1</visible_on_product>
                <allow_ba_signup>never</allow_ba_signup>
                <group>paypal</group>
            </paypal_express>
            <paypal_direct>
                <model>paypal/direct</model>
                <title>PayPal Direct Payment</title>
                <payment_action>Authorization</payment_action>
                <cctypes>VI,MC</cctypes>
                <useccv>1</useccv>
                <group>paypal</group>
            </paypal_direct>
            <paypal_standard>
                <model>paypal/standard</model>
                <title>PayPal Website Payments Standard</title>
                <payment_action>Sale</payment_action>
                <line_items_enabled>1</line_items_enabled>
                <group>paypal</group>
            </paypal_standard>
            <paypaluk_express>
                <title>PayPal Express Checkout Payflow Edition</title>
                <payment_action>Authorization</payment_action>
                <line_items_enabled>1</line_items_enabled>
                <visible_on_cart>1</visible_on_cart>
                <visible_on_product>1</visible_on_product>
                <group>paypal</group>
            </paypaluk_express>
            <paypaluk_direct>
                <title>PayPal Direct Payment Payflow Edition</title>
                <payment_action>Authorization</payment_action>
                <cctypes>VI,MC</cctypes>
                <useccv>1</useccv>
                <group>paypal</group>
            </paypaluk_direct>
            <verisign>
                <model>paypal/payflowpro</model>
                <title>Payflow Pro</title>
                <payment_action>Authorization</payment_action>
                <cctypes>AE,VI</cctypes>
                <useccv>1</useccv>
                <tender>C</tender>
                <verbosity>MEDIUM</verbosity>
                <user backend_model="adminhtml/system_config_backend_encrypted"/>
                <pwd backend_model="adminhtml/system_config_backend_encrypted"/>
                <group>paypal</group>
            </verisign>
            <paypal_billing_agreement>
                <active>1</active>
                <allow_billing_agreement_wizard>1</allow_billing_agreement_wizard>
                <model>paypal/method_agreement</model>
                <title>PayPal Billing Agreement</title>
                <group>paypal</group>
            </paypal_billing_agreement>
            <payflow_link>
                <model>paypal/payflowlink</model>
                <title>Payflow Link</title>
                <payment_action>Authorization</payment_action>
                <verbosity>HIGH</verbosity>
                <pwd backend_model="adminhtml/system_config_backend_encrypted"/>
                <group>paypal</group>
            </payflow_link>
            <hosted_pro>
                <model>paypal/hostedpro</model>
                <title>Payment by cards or by PayPal account</title>
                <payment_action>Authorization</payment_action>                
                <group>paypal</group>
            </hosted_pro>
        </payment>
    </default>
    <crontab>
        <jobs>
            <paypal_fetch_settlement_reports>
                <run><model>paypal/observer::fetchReports</model></run>
            </paypal_fetch_settlement_reports>
        </jobs>
    </crontab>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <Mage_Paypal before="Mage_Adminhtml">Mage_Paypal_Adminhtml</Mage_Paypal>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>
</config>
