• Main Page
  • Modules
  • Classes
  • Files
  • File List

classes/payment/omp/OMPQueuedPayment.inc.php

00001 <?php
00002 
00016 import('lib.pkp.classes.payment.QueuedPayment');
00017 
00018 class OMPQueuedPayment extends QueuedPayment {
00020    var $pressId;
00021 
00023    var $type;
00024 
00026    var $requestUrl;
00027 
00032    function getPressId() {
00033       return $this->pressId;
00034    }
00035 
00041    function setPressId($pressId) {
00042       return $this->pressId = $pressId;
00043    }
00044 
00050    function setType($type) {
00051       return $this->type = $type;
00052    }
00053 
00058    function getType() {
00059       return $this->type;
00060    }
00061 
00066    function getName() {
00067       switch ($this->type) {
00068          case PAYMENT_TYPE_PURCHASE_FILE:
00069             list($fileId, $revision) = explode('-', $this->getAssocId());
00070             assert($fileId && $revision);
00071             $submissionFileDao =& DAORegistry::getDAO('SubmissionFileDAO');
00072             $submissionFile =& $submissionFileDao->getRevision($fileId, $revision, MONOGRAPH_FILE_PROOF);
00073             if (!$submissionFile || $submissionFile->getAssocType() !== ASSOC_TYPE_PUBLICATION_FORMAT) return false;
00074 
00075             return $submissionFile->getLocalizedName();
00076          default:
00077             // Invalid payment type
00078             assert(false);
00079       }
00080    }
00081 
00086    function getDescription() {
00087       switch ($this->type) {
00088          case PAYMENT_TYPE_PURCHASE_FILE:
00089             return __('payment.directSales.monograph.description');
00090          default:
00091             // Invalid payment ID
00092             assert(false);
00093       }
00094    }
00095 
00101    function setRequestUrl($url) {
00102       return $this->requestUrl = $url;
00103    }
00104 
00109    function getRequestUrl() {
00110       return $this->requestUrl;
00111    }
00112 }
00113 
00114 ?>

Generated on Mon Sep 17 2012 13:58:55 for Open Monograph Press by  doxygen 1.7.1