/** * @inheritdoc */ public function consumeNotification(\Magento\Framework\App\Request\Http $request) { if (!$request->isPost()) { throw new LocalizedException(new Phrase('POST request is required.')); } $response = $this->methodCaller->call('orderConsumeNotification', [$request->getContent()]); if ($response) { return ['payuplOrderId' => $response->order->orderId, 'status' => $response->order->status, 'amount' => (double) $response->order->totalAmount / 100]; } return false; }
/** * @inheritdoc */ public function create($orderId = '', $description = '', $amount = null) { return (bool) $this->methodCaller->call('refundCreate', [$orderId, $description, $amount]); }