| 开发者 |
webdados
ifthenpay ptwooplugins nakedcatplugins |
|---|---|
| 更新时间 | 2025年10月20日 20:56 |
| PHP版本: | 7.2 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv3 |
| 版权网址: | 版权信息 |
You have to sign a contract with ifthenpay in order to activate this service. Go to https://ifthenpay.com for more information.
ifthenpay only provides this service to registered businesses and equivalents (like tax-registered freelancers, for example). You should contact ifthenpay if you need additional details on this matter.
ifthenpay will send you an email each time a reference is paid, but the reference does not contain the order number. By design, our plugin does not include the order number in the reference due to the way WooCommerce/WordPress sets orders/posts IDs. Anyway, you do not need the order number in the reference, because our plugin uses a callback mechanism. ifthenpay automatically notifies WooCommerce when a specific Multibanco reference is used for payment. The order is linked to the reference in the database and, also automatically, will be set as paid. If you still need to know to which order a reference is linked to, use the search box in the WooCommerce Orders administration screen.
Edit your wp-config.php file and set WP_DEBUG to true.
Then, place a test order in the frontend using any of the plugin’s payment methods.
Go to the order edit screen and click the “Simulate callback payment” button.
Don’t forget to set WP_DEBUG to false again, as it should not be active on a production website.
Just like in any other WooCommerce payment gateway that supports refunds. Check out the instructions carefully here (Automatic refunds, step 4) and here (WooCommerce specific instructions).
Yes, but not with the same payment method keys. Ask ifthenpay for different credentials for each website, and payment method, you need the service to be available. There is no extra costs involved, and you can even route payments to distinct bank accounts.
Yes, you can, but you should know your way around WordPress filters.
There are filters to do this and you can find examples within hooks-examples.php.
There are also filters for this. See hooks-examples.php.
You shouldn’t! To our knowledge, it’s illegal under Portuguese law and a European directive to charge an extra fee based on the payment method chosen by the customer. If you don’t care about legislation, plugins are available that allow you to set extra fees per payment method. Please, don’t ask us for support on this.
The MB WAY payment requests expire after 4 minutes.
These payments need to be approved immediately after checking out. WooCommerce only sends payment instruction emails for payment methods that require later, and not immediate payment, like Multibanco, Payshop, and Bank transfer, for example. The customer will still get an email, if properly configured on WooCommerce, upon payment (just not before).
Not at this time. Apple Pay and Google Pay are processed via the ifthenpay Gateway. Everything related to payment happens there, and the customer is redirected back to the website afterward. This means the checkout addresses are the ones the user entered on the website checkout page, not the ones provided by Apple or Google, which also means any custom field will be collected, which doesn’t happen on Express Checkout.
Yes. This plugin is officially WPML compatible. You will need the WPML and WPML String Translation Plugins (alongside WooCommerce Multilingual, which is mandatory for any WooCommerce + WPML install).
Go to WPML > String Translation > Search and translate all the strings in the woocommerce and multibanco_ifthen_for_woocommerce domains containing ifthen_for_woocommerce in their name.
Go to WooCommerce > SMS Notifications and add the %multibanco_ifthen% and/or %payshop_ifthen% variables to “Order on-hold custom message”.
Go to WooCommerce > Settings > SMS and add the %multibanco_ifthen% and/or %payshop_ifthen% variables to “Customer Notifications“ > “On Hold SMS Message”.
Go to YITH Plugins > SMS Notifications > SMS Settings and add the {multibanco_ifthen} and/or {payshop_ifthen} variables to “On hold”.
Yes, you should use the multibanco_ifthen_base_ent_subent or multibanco_ifthen_base_mbkey, multibanco_ifthen_base_mbwaykey, multibanco_ifthen_base_creditcardkey or multibanco_ifthen_base_payshopkey filters. See hooks-examples.php.
You shouldn’t but… yes, you can. Just return false to the multibanco_ifthen_set_on_hold and/or payshop_ifthen_set_on_hold filter.
Be advised that no “new order” email, with payment instructions, will be sent to the customer unless you use some plugin or custom code to force it.
WooCommerce only automatically cancels “Pending” orders, not “On Hold”, because these orders are set to be paid by offline methods (like Multibanco or Payshop), and payment can occur at any time, even after the order is canceled. Still, if you want to take that risk, just return true to the multibanco_ifthen_cancel_unpaid_orders and/or payshop_ifthen_cancel_unpaid_orders filter.
You can also restore that order’s product stock by returning true to the multibanco_ifthen_cancel_unpaid_orders_restore_stock and/or payshop_ifthen_cancel_unpaid_orders_restore_stock filter, although the WooCommerce team doesn’t recommend it.
Be advised the Multibanco or Payshop reference will still be active and can be paid later on.
You can use the multibanco_ifthen_email_instructions_pending_send and/or mbway_ifthen_email_instructions_pending_send filter: return false and the payment instructions won’t be included in the “new order” email – we do not recommend you to do it, though.
You can use the multibanco_ifthen_email_instructions_payment_received_send and/or mbway_ifthen_email_instructions_payment_received_send filter: return false and the payment received message won’t be included in the “Processing” or “Completed” email.
You probably have weird permalink settings (or permalinks not set at all) in your WordPress install.
If your permalinks are set as “Plain”, tell them to change the callback URL from https://yourwebsite/wc-api/WC_Multibanco_IfThen_Webdados/?chave=[CHAVE_ANTI_PHISHING]... to https://yourwebsite/?wc-api=WC_Multibanco_IfThen_Webdados&chave=[CHAVE_ANTI_PHISHING]....
If your permalinks are set as “Custom structure”: /index.php/%postname%/ tell them to set the callback to https://yourwebsite/index.php/wc-api/WC_Multibanco_IfThen_Webdados/?chave=[CHAVE_ANTI_PHISHING]...
This plugin does not collect or send any private data of the website where it’s installed, its customers, or the orders, to Webdados (the plugin author) or ifthenpay (the payment processor). In the MB WAY module, the mobile phone number is collected to request payment authorization and it can be legitimately processed based on Article 6 (1) (b) of the GDPR. ifthenpay’s privacy policy can be found at https://ifthenpay.com/termosCondicoes
Yes. This plugin is fully compatible with HPOS since December 2022.
Yes. This plugin is compatible with the Block-Based Checkout since August 2020.
Although this is the official ifthenpay WooCommerce plugin, development and support is provided by Webdados. For free/standard support you should use the support forums here at WordPress.org For premium, urgent and experimental integrations support or custom developments you should contact Webdados. Charges will apply. Any support related to failed payments or credit card authorizations should be directed to ifthenpay.
You can report any security bugs found in the source code of this plugin through the Patchstack Vulnerability Disclosure Program. The Patchstack team will assist you with verification, CVE assignment and take care of notifying the developers of this plugin.
Sure. Go to GlotPress and help us out.
wc_get_orders calls to our internal wrappertrue to the multibanco_ifthen_hide_newmethod_notifications filter)mbway_ifthen_after_process_payment hook (action)true to multibanco_ifthen_maybe_change_email_locale filter)multibanco_ifthen_thankyou_instructions_table_html filterrefund_ifthen_api_timeout developer filter$_REQUEST if not found in $_POST for edge scenarioscreditcard_ifthen_cancel_order_on_back filtertrue to creditcard_ifthen_cancel_order_on_back.ifthen_allow_settings_woocommerce_not_euro filter to allow setting up the payment gateways even if the shop currency is not set to Euro - For multi-currency shopsRequires Plugins tag to woocommerceget_multibanco_order_details() methodorder_has_ifthenpay_method methodwc_get_log_file_path for WooCommerce 8.6 and abovewc_get_orders wrapperwc_get_orders wrapper to remove Polylang language filters when seraching for orders, for example on callback calls, and apply meta conversions for HPOS in the wrapper instead of all over the place*_ifthen_callback_payment_complete hooksprocess_payment functionsmultibanco_ifthen_base_mbkey, multibanco_ifthen_webservice_timeout, multibanco_ifthen_webservice_desc and multibanco_ifthen_webservice_expire_daystrue to the multibanco_ifthen_hide_newmethod_notifications filtermultibanco_ifthen_send_email_instructions, mbway_ifthen_send_email_instructions, creditcard_ifthen_send_email_instructions and payshop_ifthen_send_email_instructions filters to allow removing the payment gateway instructions from emailsmultibanco_ifthen_email_hook, multibanco_ifthen_email_hook_priority, mbway_ifthen_email_hook, mbway_ifthen_email_hook_priority, creditcard_ifthen_email_hook, creditcard_ifthen_email_hook_priority, payshop_ifthen_email_hook and payshop_ifthen_email_hook_prioritymbway_ifthen_pay_another_method_button_text to be able to change the “choose another method button text” on MB WAYifthen_unpaid_statuses filter to allow developers to set additional valid “unpaid” statuses for Multibanco, MB WAY and Payshop orders, besides the default ones (“on-hold”, “pending” and “partially-paid”). The statuses are used for callback validation, SMS message template, show order as unpaid on the backoffice, show “Pay” button on My Account orders list, issue new references if order value changes on the backoffice, reduce order stock rules, “Thank you” page and email payment instructions.WC requires at least tag accordinglyRequires at least tag accordinglyifthen_debug_log_extra that will allow developers to further debug the Multibanco reference generation (for now)multibanco_ifthen_hide_my_account_pay_button, mbway_ifthen_hide_my_account_pay_button, payshop_ifthen_hide_my_account_pay_buttonfalse to the ifthen_show_old_techonology_notice filter)partially-paid status to Multibanco valid pending payment status when checking the callbackmultibanco_ifthen_valid_callback_pending_status and mbway_ifthen_valid_callback_pending_status filters when checking for pending payment orders on Multibanco and MB WAY callbacks (WooCommerce >= 3.0)mbway_ifthen_webservice_timeout filtermbway_ifthen_thankyou_instructions_table_html_expired filter)WC requires at least tagWC tested up to tagTested up to tagmultibanco_ifthen_thankyou_instructions_table_html, multibanco_ifthen_set_on_hold, multibanco_ifthen_email_instructions_pending_send, multibanco_ifthen_email_instructions_table_html, multibanco_ifthen_sms_instructions, multibanco_ifthen_email_instructions_payment_received_send, multibanco_ifthen_email_instructions_payment_received, mbway_ifthen_thankyou_instructions_table_html, mbway_ifthen_enable_check_order_status_thankyou, mbway_ifthen_email_instructions_pending_send, mbway_ifthen_email_instructions_table_html, mbway_ifthen_email_instructions_payment_received_send, mbway_ifthen_email_instructions_payment_received, multibanco_ifthen_cancel_unpaid_orders_restore_stock and mbway_ifthen_cancel_unpaid_orders_restore_stock filters by passing the order id to themfilters_examples.php to hooks-examples.php and improved it with examples for all the plugin hooksmultibanco_ifthen_created_reference, mbway_ifthen_created_reference, multibanco_ifthen_unpaid_order_cancelled, mbway_ifthen_unpaid_order_cancelled, multibanco_ifthen_callback_payment_complete, multibanco_ifthen_callback_payment_failed, mbway_ifthen_callback_payment_complete and mbway_ifthen_callback_payment_failedTested up to tagRequires at least tag to reflect the fact the plugin is still compatible with WooCommerce 2.0 and aboveWC tested up to tagWC requires at least tag on the plugin main fileWC tested up to tagmultibanco_ifthen_multibanco_settings_fields and multibanco_ifthen_mbway_settings_fields filters to allow 3rd party plugins to add fields to the Multibanco and MB WAY settings screenindex.php file because “best practices”multibanco_ifthen_base_mbwaykey filter to be able to change the base MB WAY Key used to generate the payment details, based on the order, which may be useful for marketplacesWC tested up to tagWC tested up to tagWC tested up to tagWC tested up to tagmbway_ifthen_set_on_hold filter that no longer makes sense since 3.0.2mbway_ifthen_order_initial_status_pending. (Thanks for the mentoring @chrislema)WC tested up to tagmultibanco_ifthen_cancel_unpaid_orders_restore_stock filter to which true should be returned if you want the stock for the products on auto-cancelled orders (by the multibanco_ifthen_cancel_unpaid_orders filter) to be restored;multibanco_ifthen_email_instructions_pending_send filter to which you can return false so that the payment instructions are not included in the “new order” email, although we do not recommend doing itmultibanco_ifthen_email_instructions_payment_received_send filter to which you can return false so that the payment received message is not included in the “processing” emailTested up to tagwc_get_ordersmultibanco_ifthen_set_on_hold filter to be able to leave the order pending instead of on hold by returning false - use at your own riskmultibanco_ifthen_cancel_unpaid_orders filter to be able to enable order auto cancelation by WooCommerce, if “Manage stock” and “Hold stock (minutes)” are configured, by returning true - use at your own riskTested up to and WC tested up to tagWC tested up to tag on the plugin main fileTested up to taglang folder (translations are now managed width WordPress.org’s GlotPress tool and will be automatically downloaded from there)multibanco_ifthen_for_woocommerce to multibanco-ifthen-software-gateway-for-woocommerce) to make it compatible with WordPress.org translation system (Glotpress)woocommerce textdomain instead of our ownTested up to tagWC() instead of $woocommercewc_reduce_stock_levels() instead of $order->reduce_order_stock() on WooCommerce 3.0 and aboveWC()->customer->get_billing_country() instead of WC()->customer->get_country() on WooCommerce 3.0 and aboveTested up to tagTested up to tagTested up to tagmbifthen_format_ref function to format the reference with spaces after each 3 number (used by the plugin but can also be used externally)multibanco_ifthen_format_ref applied on the string to be returned from the mbifthen_format_ref functionmultibanco_ifthen_base_ent_subent filter to be able to change the base Entity and Subentity used to generate the payment details, based on the order, which may be useful for marketplacesmultibanco_ifthen_email_instructions_payment_received filter to customize the “Multibanco payment received” text on emailsreadme.txt changesfilters_examples.php on the multibanco_ifthen_email_instructions_table_html and multibanco_ifthen_sms_instructions examples (props to Jorge Fonseca)multibanco_ifthen_sms_instructions filter to customize the SMS payment instructionspayment_complete function so that orders with only downloadable items go directly to completed instead of processingget_icon() throw a noticewoocommerce_gateway_icon filter. See filters_examples.phpmultibanco_ifthen_thankyou_instructions_table_html filter example had an errorfilters_examples.phpadd_meta_box codeplugins_url function instead of WP_PLUGIN_URL constant