Let's say you already purchased an order and now you want to refund it.
<?phpusePayum\Core\Request\Refund;usePayum\Core\Request\GetHumanStatus;$gateway =$this->get('payum')->getGateway('offline');$gateway->execute(newRefund($payment));$gateway->execute($status =newGetHumanStatus($payment));if ($status->isRefunded()) {// Refund went well} else {// Something went wrong. Lets check details to find out whyvar_dump($payment->getDetails());}
Supporting Payum
Payum is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider: