How to change the commission status based on the order status

The commission status is directly bond to the status of the order it’s linked to, and it’s handle in different ways according to whether you are using manual payment or automatic payment through MassPay and PayPal Adaptive Payments.

Please note that since PayPal does no longer support MassPay and Adaptive Payments services, they cannot be activated on new users’ accounts.
Yet, users who had previously activated either PayPal MassPay or Adaptive Payments services can keep using them to manage payments automatically and can refer to the following information for the configuration.

Manual payment

Order statusCommission status
on-holdpending
processingpending
completedunpaid

Automatic Payment using MassPay

Once an order is created, its commission is automatically generated on unpaid status, this status will later change into processing.

As soon as your system receives the IPN code from PayPal, the commission status will turn into Paid.

Order statusCommission status
refundedrefunded
cancelledcancelled

Automatic Payment using PayPal Adaptive Payments

PayPal statusOrder statusCommission status
CancelledCancelledCancelled
CreatedOn-HoldProcessing
CompletedCompletedPaid
IncompletePayment Method Parallel: On Hold
Payment Method Chained Delay: Completed
Completed
ErrorFailedUnpaid
ReversalerrorFailedUnpaid
ProcessingOn-HoldProcessing
PendingPendingProcessing