/** * Will run all the actions that are loaded (from the 'actions' configuration * node) and that are applicable to this message type. Will return true * if all actions returned true. Otherwise will return false. This implicitly * means that the message will be re-queued if any action fails. Therefore * all actions need to be idempotent. * * @returns bool True if all actions were successful. False otherwise. */ public function runActionChain() { $action = new PaymentCaptureAction(); $result = $action->execute($this); if ($result === true) { return parent::runActionChain(); } else { return false; } }
/** * Will run all the actions that are loaded (from the 'actions' configuration * node) and that are applicable to this message type. Will return true * if all actions returned true. Otherwise will return false. This implicitly * means that the message will be re-queued if any action fails. Therefore * all actions need to be idempotent. * * @returns bool True if all actions were successful. False otherwise. */ public function runActionChain() { $action = new RefundInitiatedAction(); $result = $action->execute($this); if ($result === true) { return parent::runActionChain(); } else { return false; } }
/** * Will run all the actions that are loaded (from the 'actions' configuration * node) and that are applicable to this message type. Will return true * if all actions returned true. Otherwise will return false. This implicitly * means that the message will be re-queued if any action fails. Therefore * all actions need to be idempotent. * * @returns bool True if all actions were successful. False otherwise. */ public function runActionChain() { Logger::info("Received new report from Adyen: {$this->pspReference}. Generated: {$this->eventDate}.", $this->reason); $jobQueue = BaseQueueConsumer::getQueue('jobs-adyen'); if (strpos($this->pspReference, 'settlement_detail_report') === 0) { $jobObject = DownloadReportJob::factory($this->merchantAccountCode, $this->reason); // FIXME: write queue wrapper to do these next two steps SourceFields::addToMessage($jobObject); $jobArray = json_decode($jobObject->toJson(), true); $jobQueue->push($jobArray); } else { // We don't know how to handle this report yet Logger::notice("Do not know how to handle report with name '{$this->pspReference}'"); } return parent::runActionChain(); }
protected function createAdyenMsgObjFromItem(WSDL\NotificationRequestItem $item) { Logger::info('Creating Adyen message object from data.'); $msg = AdyenMessage::getInstanceFromWSDL($item); if ($msg === false) { Logger::error('Listener message object could not be created. Unknown type!', $item); return false; } else { $className = get_class($msg); Logger::info("Listener message of type {$className} created."); } return $msg; }