blob: 2ef426f9ad091d96af84c99d875607382c51b208 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd">
<simple-method method-name="deletePaymentMethod" short-description="Delete Payment Method">
<call-map-processor xml-resource="component://accounting/script/org/ofbiz/accounting/payment/PaymentMapProcs.xml"
processor-name="deletePaymentMethod" in-map-name="parameters" out-map-name="context"/>
<check-errors/>
<call-service service-name="deletePaymentMethod" in-map-name="context">
<default-message resource="AccountingUiLabels" property="AccountingPaymentMethodDeletedSuccessfully"/>
</call-service>
</simple-method>
<!-- CreditCard events -->
<simple-method method-name="createCreditCard" short-description="Create Credit Card">
<call-map-processor xml-resource="component://accounting/script/org/ofbiz/accounting/payment/PaymentMapProcs.xml"
processor-name="createCreditCard" in-map-name="parameters" out-map-name="context"/>
<check-errors/>
<call-service service-name="createCreditCard" in-map-name="context">
<default-message resource="AccountingUiLabels" property="AccountingCreditCardCreatedSuccessfully"/>
<result-to-request result-name="paymentMethodId"/>
</call-service>
<if-compare field="parameters.contactMechId" operator="equals" value="_NEW_">
<set value="address" field="_response_code_"/>
<set value="POSTAL_ADDRESS" field="preContactMechTypeId"/>
<set value="BILLING_LOCATION" field="contactMechPurposeTypeId"/>
<field-to-request field="DONE_PAGE"/>
<field-to-request field="preContactMechTypeId"/>
<field-to-request field="contactMechPurposeTypeId"/>
</if-compare>
</simple-method>
<simple-method method-name="updateCreditCard" short-description="Update Credit Card">
<call-map-processor xml-resource="component://accounting/script/org/ofbiz/accounting/payment/PaymentMapProcs.xml"
processor-name="updateCreditCard" in-map-name="parameters" out-map-name="context"/>
<!-- before check-errors also call createCreditCard, which completes the checking, etc for updateCreditCard -->
<!-- FIXME Commented out because of OFBIZ-6920, a better solution would be do encrypt the card number when showing screen and decrypt when validating data -->
<!-- <call-map-processor xml-resource="component://accounting/script/org/ofbiz/accounting/payment/PaymentMapProcs.xml"
processor-name="createCreditCard" in-map-name="parameters" out-map-name="context"/>
<check-errors/> -->
<call-service service-name="updateCreditCard" in-map-name="context">
<default-message resource="AccountingUiLabels" property="AccountingCreditCardUpdatedSuccessfully"/>
<result-to-request result-name="paymentMethodId" request-name="paymentMethodId"/>
</call-service>
<if-compare field="parameters.contactMechId" operator="equals" value="_NEW_">
<set value="address" field="_response_code_"/>
<set value="POSTAL_ADDRESS" field="preContactMechTypeId"/>
<set value="BILLING_LOCATION" field="contactMechPurposeTypeId"/>
<field-to-request field="DONE_PAGE"/>
<field-to-request field="preContactMechTypeId"/>
<field-to-request field="contactMechPurposeTypeId"/>
</if-compare>
</simple-method>
<!-- EftAccount events -->
<simple-method method-name="createEftAccount" short-description="Create EFT Account">
<call-map-processor xml-resource="component://accounting/script/org/ofbiz/accounting/payment/PaymentMapProcs.xml"
processor-name="createEftAccount" in-map-name="parameters" out-map-name="context"/>
<check-errors/>
<call-service service-name="createEftAccount" in-map-name="context">
<default-message resource="AccountingUiLabels" property="AccountingEFTAccountCreatedSuccessfully"/>
<result-to-request result-name="paymentMethodId"/></call-service>
</simple-method>
<simple-method method-name="updateEftAccount" short-description="Update EFT Account">
<call-map-processor xml-resource="component://accounting/script/org/ofbiz/accounting/payment/PaymentMapProcs.xml"
processor-name="updateEftAccount" in-map-name="parameters" out-map-name="context"/>
<!-- before check-errors also call createEftAccount, which completes the checking, etc for updateEftAccount -->
<call-map-processor xml-resource="component://accounting/script/org/ofbiz/accounting/payment/PaymentMapProcs.xml"
processor-name="createEftAccount" in-map-name="parameters" out-map-name="context"/>
<check-errors/>
<call-service service-name="updateEftAccount" in-map-name="context">
<default-message resource="AccountingUiLabels" property="AccountingEFTAccountUpdatedSuccessfully"/>
<result-to-request result-name="paymentMethodId" request-name="paymentMethodId"/>
</call-service>
</simple-method>
</simple-methods>