Custom Payment Gateway
Home / Topic / WCMp Vendor Membership / Custom Payment Gateway
WCMp Vendor Membership
Custom Payment Gateway Resolved
Tagged: payment gateway
- This topic has 4 replies, 3 voices, and was last updated 2 months ago by
WCMp Support Ninja.
-
AuthorPosts
-
-
July 29, 2020 at 11:29 PM #102095
Espen Kvelland
ParticipantHello,
We are Tanzania based marketplace and need to add Tanzania based payment gateway to add payments from customer and send payment to vendors after deducting admin commission. I can see there are by default 4 payment gateway listed: Paypal masspay, Paypal payout, Stripe connect and Direct bank transfer. Can you suggest me how to achieve it? -
July 30, 2020 at 2:08 AM #102107
Fantastic Kuhu
KeymasterHi @Espen,
Thank you for reaching out to us.
All the transactions is managed by WooCommerce. By default WooCommerce supports Bank Payment, Cheque Payment, COD, Credit card and PayPal. You may refer the knowledbase link for the general details
https://wc-marketplace.com/knowledgebase/payment/ .In case you want to integrate any country specific WooCommerce Payment Gateway, that can be done via customization as it needs to be made compatible at vendor end as well.
After going through the above link, please do let us know in case you want to get any specific information.
Regards,
-
July 30, 2020 at 6:39 AM #102135
Espen Kvelland
ParticipantI have gone through this document: https://docs.google.com/document/d/1WrSMzalzzc4DUWyevGfWH6ZkE9X3un3eHX2wOO4oWu0/edit
And trying to add “RazorPay” option in WCMP. I have installed “RazorPay” woo-commerce plugin and added key-id, and key-secret into woo-commerce settings, but still I am not able to see form fields in Vendors tab. I am attaching here the screenshot. please have a look in it and let me know your feedback, what I am missing here?Attachments:
-
August 5, 2020 at 5:52 AM #102600
NerdySupportExpert Moumita
KeymasterHi, there was a missing code, which will display the form-field under razorpay tab. I have updated the doc.
Here is the coding snippet for you :add_action( 'settings_page_payment_razorpay_tab_init', function ($tab, $subsection ){ new WCMp_Settings_Payment_Razor_Pay( $tab, $subsection ); }, 10, 2); class WCMp_Settings_Payment_Razor_Pay { /** * Holds the values to be used in the fields callbacks */ private $options; private $tab; private $subsection; private $razorpay_key_id; private $razorpay_key_secret; /** * Start up */ public function __construct($tab, $subsection) { $this->tab = $tab; $this->subsection = $subsection; $this->options = get_option("wcmp_{$this->tab}_{$this->subsection}_settings_name"); $razorpay_details = get_option('woocommerce_razorpay_settings'); if (isset($razorpay_details['testmode']) && !empty($razorpay_details['testmode'])) { $this->razorpay_key_id = $razorpay_details['testmode']; } if (isset($razorpay_details['key_id']) && !empty($razorpay_details['key_id'])) { $this->razorpay_key_id = $razorpay_details['key_id']; } if (isset($razorpay_details['key_secret']) && !empty($razorpay_details['key_secret'])) { $this->razorpay_key_secret = $razorpay_details['key_secret']; } $this->settings_page_init(); } /** * Register and add settings */ public function settings_page_init() { global $WCMp; $settings_tab_options = array("tab" => "{$this->tab}", "ref" => &$this, "subsection" => "{$this->subsection}", "sections" => array( "api_settings_section" => array("title" => __('API keys', 'dc-woocommerce-multi-vendor'), // Section one "fields" => array( "key_id" => array('title' => __('Key Id', 'dc-woocommerce-multi-vendor'), 'type' => 'password', 'id' => 'key_id', 'label_for' => 'key_id', 'name' => 'key_id', 'hints' => __('Key id, you will get this credential from razorpay account apikeys.', 'dc-woocommerce-multi-vendor')), // Text "key_secret" => array('title' => __('Key Secret', 'dc-woocommerce-multi-vendor'), 'type' => 'password', 'id' => 'key_secret', 'label_for' => 'key_secret', 'name' => 'key_secret', 'hints' => __('Key Secret, you will get this credential from razorpay account apikeys.', 'dc-woocommerce-multi-vendor')), // Text ), ), ) ); $WCMp->admin->settings->settings_field_withsubtab_init(apply_filters("settings_{$this->tab}_{$this->subsection}_tab_options", $settings_tab_options)); } /** * Sanitize each setting field as needed * * @param array $input Contains all settings fields as array keys */ public function wcmp_payment_razorpay_settings_sanitize_old($input) { $new_input = array(); $hasError = false; if(isset($input['key_id'])){ $new_input['key_id'] = sanitize_text_field($input['key_id']); } if(isset($input['key_secret'])){ $new_input['key_secret'] = sanitize_text_field($input['key_secret']); } if (!$hasError) { add_settings_error( "wcmp_{$this->tab}_{$this->subsection}_settings_name", esc_attr("wcmp_{$this->tab}_{$this->subsection}_settings_admin_updated"), __('Razorpay Gateway Settings Updated', 'dc-woocommerce-multi-vendor'), 'updated' ); } return apply_filters("settings_{$this->tab}_{$this->subsection}_tab_new_input", $new_input, $input); } }
Copy -
November 18, 2020 at 4:36 PM #110059
WCMp Support Ninja
ModeratorAs I can see the issue is fixed. So we are closing the ticket now. In case any issue arises kindly raise a new ticket.
-
-
AuthorPosts
The topic ‘Custom Payment Gateway’ is closed to new replies.