00001 <?php
00002
00016
00017
00018 import('payment.QueuedPayment');
00019
00020 class OCSQueuedPayment extends QueuedPayment {
00021 var $conferenceId;
00022 var $schedConfId;
00023 var $type;
00024 var $requestUrl;
00025
00026 function setConferenceId($conferenceId) {
00027 $this->conferenceId = $conferenceId;
00028 }
00029
00030 function getConferenceId() {
00031 return $this->conferenceId;
00032 }
00033
00034 function setSchedConfId($schedConfId) {
00035 $this->schedConfId = $schedConfId;
00036 }
00037
00038 function getSchedConfId() {
00039 return $this->schedConfId;
00040 }
00041
00042 function setType($type) {
00043 $this->type = $type;
00044 }
00045
00046 function getType() {
00047 return $this->type;
00048 }
00049
00054 function getName() {
00055 switch ($this->type) {
00056 case QUEUED_PAYMENT_TYPE_REGISTRATION:
00057 return __('schedConf.registration');
00058 }
00059 }
00060
00065 function getDescription() {
00066 switch ($this->type) {
00067 case QUEUED_PAYMENT_TYPE_REGISTRATION:
00068 $registrationDao =& DAORegistry::getDAO('RegistrationDAO');
00069 $registration =& $registrationDao->getRegistration($this->getAssocId());
00070
00071 $registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');
00072 $registrationType =& $registrationTypeDao->getRegistrationType(
00073 $registration?$registration->getTypeId():0
00074 );
00075
00076 $registrationOptionDao =& DAORegistry::getDAO('RegistrationOptionDAO');
00077 $registrationOptions =& $registrationOptionDao->getRegistrationOptions($this->getAssocId());
00078
00079 $options = '';
00080 foreach ($registrationOptions as $optionId) {
00081 $options .= ';' . $registrationOptionDao->getRegistrationOptionName($optionId);
00082 }
00083
00084 $schedConfDao =& DAORegistry::getDAO('SchedConfDAO');
00085 $schedConf =& $schedConfDao->getSchedConf(
00086 $registrationType?$registrationType->getSchedConfId():0
00087 );
00088
00089 return __('payment.type.conferenceRegistration', array(
00090 'schedConfTitle' => ($schedConf?$schedConf->getFullTitle():__('common.none')),
00091 'registrationTypeName' => ($registrationType?$registrationType->getRegistrationTypeName():__('common.none')),
00092 )) . $options;
00093 }
00094 }
00095
00096 function setRequestUrl($url) {
00097 $this->requestUrl = $url;
00098 }
00099
00100 function getRequestUrl() {
00101 return $this->requestUrl;
00102 }
00103 }
00104
00105 ?>