in eCommerce platforms/Adobe Magento/src/code/local/Microsoft/Dfp/Model/Observer.php [57:89]
private function UpdateStatusToDFP($observer)
{
$this->dfp->log(" ----------- UpdateStatusToDFP Observer Event START -------------- ");
$order = $observer->getEvent()->getOrder();
if ($order) {
if (!empty($order->getData()['status'])) {
$status = $order->getData()['status'];
if (!empty($status)) {
$this->dfp->log(" UpdateStatusToDFP Observer Event Status : " . $status);
switch (strtolower($status)) {
case 'order_approved':
case 'canceled':
$this->dfp->log(" ----------- Invoking PurchaseStatus API - START -------------- ");
$this->invokePurchaseStatusDFP($order);
$this->dfp->log(" ----------- Invoking PurchaseStatus API - END -------------- ");
break;
case 'refunded':
$this->dfp->log(" ----------- Invoking Refund API - START -------------- ");
$this->invokeRefundDFP($order);
$this->dfp->log(" ----------- Invoking Refund API - END -------------- ");
break;
case 'chargeback':
$this->dfp->log(" ----------- Invoking Chargeback API - START -------------- ");
$this->invokeChargebackDFP($order);
$this->dfp->log(" ----------- Invoking Chargeback API - END -------------- ");
break;
}
}
}
}
$this->dfp->log(" ----------- UpdateStatusToDFP Observer Event END -------------- ");
}