Title: process_payment() function
Last modified: September 7, 2021

---

# process_payment() function

 *  Resolved [drizla](https://wordpress.org/support/users/drizla/)
 * (@drizla)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/process_payment-function/)
 * As a new plugin developer, am trying to figure out how and when the process_payment()
   for WCMP is being triggered. I need you help please.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/process_payment-function/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/process_payment-function/page/2/?output_format=md)

 *  [Rajsekhar Chatterjee](https://wordpress.org/support/users/rajsekharchatterjee11/)
 * (@rajsekharchatterjee11)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14849242)
 * Hi [@drizla](https://wordpress.org/support/users/drizla/),
    It triggers when 
   the admin pays commission value to their vendor’s account. You can see an example
   here [https://github.com/wcmarketplace/dc-woocommerce-multi-vendor/blob/master/classes/class-wcmp-cron-job.php#L89](https://github.com/wcmarketplace/dc-woocommerce-multi-vendor/blob/master/classes/class-wcmp-cron-job.php#L89).
   We have defined this function on every payment gateway class file. So that we
   can dynamically call this. Here is one example of stripe [https://github.com/wcmarketplace/dc-woocommerce-multi-vendor/blob/master/classes/class-wcmp-cron-job.php#L89](https://github.com/wcmarketplace/dc-woocommerce-multi-vendor/blob/master/classes/class-wcmp-cron-job.php#L89)
   Thanks
 *  Thread Starter [drizla](https://wordpress.org/support/users/drizla/)
 * (@drizla)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14851143)
 * Thanks so much [@rajsekharchatterjee11](https://wordpress.org/support/users/rajsekharchatterjee11/)
   for you reply. Since am testing on a local server and I needed to make a REST
   API call in this function (process_payment). How can I make it manual so that
   I could trigger the process_payment() manually to see if the API call is working.
   since the existing way uses cron
 *  [Rajsekhar Chatterjee](https://wordpress.org/support/users/rajsekharchatterjee11/)
 * (@rajsekharchatterjee11)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14851405)
 * Hi,
    We don’t have any direct rest API support to pay a particular vendor. We
   have extends it from wc_payment_gateway class. You can check the code from here
   [https://github.com/wcmarketplace/dc-woocommerce-multi-vendor/blob/master/classes/gateways/class-wcmp-gateway-stripe-connect.php](https://github.com/wcmarketplace/dc-woocommerce-multi-vendor/blob/master/classes/gateways/class-wcmp-gateway-stripe-connect.php).
   If woocommerce has any API support for payment then that will help you out. Thanks
 *  Thread Starter [drizla](https://wordpress.org/support/users/drizla/)
 * (@drizla)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14874614)
 * I think [@rajsekharchatterjee11](https://wordpress.org/support/users/rajsekharchatterjee11/)
   you should create a simple custom payment gateway documentation for WCMP the 
   way WCFM has. This would be really helpful.
 *  Plugin Author [MultiVendorX](https://wordpress.org/support/users/wcmp/)
 * (@wcmp)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14878438)
 * [@drizla](https://wordpress.org/support/users/drizla/), we do have a plan to 
   create a document on custom payment mode creation.
    Once this will be ready, 
   we will share that link.
 *  Thread Starter [drizla](https://wordpress.org/support/users/drizla/)
 * (@drizla)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14881727)
 * Hi [@rajsekharchatterjee11](https://wordpress.org/support/users/rajsekharchatterjee11/),
   Whenever I make a payment, the commission doesn’t appear on the WCMP commission.
   However, the Number of Private Item increases(Private link above the commission
   Table), Also the wp_wcmp_vendor_orders is not populated at all. How can I resolve
   these?
 *  Plugin Author [MultiVendorX](https://wordpress.org/support/users/wcmp/)
 * (@wcmp)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14883214)
 * Hi [@drizla](https://wordpress.org/support/users/drizla/), can you share the 
   scrrenshot of the order details page from admin end, this will help use understand
   the issue.
 *  Thread Starter [drizla](https://wordpress.org/support/users/drizla/)
 * (@drizla)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14905769)
 * Can I share with you the plugin so as to get your feedback please? If it works
   I could make a copy so that you use it in WCMP documentation on how to make custom
   payments.
 *  Thread Starter [drizla](https://wordpress.org/support/users/drizla/)
 * (@drizla)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14905794)
 * I Have solved most of the issues. However, the order status on the vendor dashboard(
   Orders Tab) still remains Pending Payments even afetr the commission changes 
   to withdrawal in the Bank overview tab.
 *  Thread Starter [drizla](https://wordpress.org/support/users/drizla/)
 * (@drizla)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14905816)
 * [https://ibb.co/99F5MRL](https://ibb.co/99F5MRL)
    [https://ibb.co/nk7Pw96](https://ibb.co/nk7Pw96)
 *  Plugin Author [MultiVendorX](https://wordpress.org/support/users/wcmp/)
 * (@wcmp)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14908077)
 * [@drizla](https://wordpress.org/support/users/drizla/), the order status doesn’t
   depend on the withdrawal commission or banking overriview.
 * Let me help you out with the order status flow :
    – When an order is created 
   on the woocommerce end, we create the corresponding sub-order. – Now, we check
   the initial order status of the order from woocommerce’s main order and set same
   order status for suborders too – After that, each vendor/admin needs to change
   order status for each sub-order – Therefore, apart from initial order status,
   if you change status of an order, this will not affect the sub order’s status
 *  Thread Starter [drizla](https://wordpress.org/support/users/drizla/)
 * (@drizla)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14911958)
 * Thanks [@wcmp](https://wordpress.org/support/users/wcmp/) but my question is,
   whenever a cutomer checks out product, the order status change correctly(based
   on the transaction processing state). For example if the payment is bein processed,
   the WP admin shoud indicate the payment is being processed and also on the vendor
   dashboard, the suborder generated from the parent order should indicate “on-hold”
   status. however, in my case, the Order status in the vendor dashboard is just
   indicating “Pending payment” without changing.
 *  Plugin Author [MultiVendorX](https://wordpress.org/support/users/wcmp/)
 * (@wcmp)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14913292)
 * [@drizla](https://wordpress.org/support/users/drizla/), it will be really helpful
   if you can share a video so we can help you out better.
 *  Plugin Author [MultiVendorX](https://wordpress.org/support/users/wcmp/)
 * (@wcmp)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/process_payment-function/#post-14948087)
 * Hi [@drizla](https://wordpress.org/support/users/drizla/), we haven’t heard back
   from you so we presume this issue has been resolved.
 *  Thread Starter [drizla](https://wordpress.org/support/users/drizla/)
 * (@drizla)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/process_payment-function/#post-15113231)
 * Yes the issues were solved. I wanted to know how to setup a callback url which
   is to get some values during payment process in WCMp.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/process_payment-function/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/process_payment-function/page/2/?output_format=md)

The topic ‘process_payment() function’ is closed to new replies.

 * ![](https://ps.w.org/dc-woocommerce-multi-vendor/assets/icon-256x256.gif?rev=
   3314608)
 * [MultiVendorX - WooCommerce Multivendor Marketplace Solutions](https://wordpress.org/plugins/dc-woocommerce-multi-vendor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dc-woocommerce-multi-vendor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/)
 * [Active Topics](https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/reviews/)

## Tags

 * [custom payment gateway](https://wordpress.org/support/topic-tag/custom-payment-gateway/)

 * 16 replies
 * 3 participants
 * Last reply from: [Rajsekhar Chatterjee](https://wordpress.org/support/users/rajsekharchatterjee11/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/process_payment-function/page/2/#post-15114096)
 * Status: resolved