/**
  * Execute a command and return a response. Does not render
  * @param IRequest $Request
  * @return IResponse the execution response
  */
 function execute(IRequest $Request)
 {
     $TransactionEntry = TransactionEntry::get($this->getTransactionID());
     $transactionLog = $TransactionEntry->fetchLog();
     $Invoice = $TransactionEntry->getInvoice();
     $Product = $Invoice->getProduct();
     $Wallet = $Invoice->getWallet();
     $accounts = array();
     $merchantProfit = $Product->calculateProfit($TransactionEntry->getStatus(), $accounts);
     $accounts[$Product->getAccountID()] = $merchantProfit;
     $ProfitTBody = new HTMLSequenceTableBody(new CallbackSequenceMap(function (ISequenceMapper $Map) use($accounts) {
         foreach ($accounts as $accountID => $profit) {
             $Map->mapNext(array('account' => $accountID, 'profit' => $profit));
         }
     }));
     $Form = new HTMLForm(self::FORM_METHOD, $Request->getPath(), self::FORM_NAME, new HTMLMetaTag(HTMLMetaTag::META_TITLE, self::TITLE), new HTMLHeaderScript(__DIR__ . '/assets/transaction.js'), new HTMLHeaderStyleSheet(__DIR__ . '/assets/transaction.css'), new HTMLElement('fieldset', 'fieldset-transaction-info inline', new HTMLElement('legend', 'legend-transaction-info', 'Transaction Information'), new MapRenderer($TransactionEntry)), new HTMLElement('fieldset', 'fieldset-product-profit inline', new HTMLElement('legend', 'legend-product-profit', 'Profit Information'), new HTMLTable($ProfitTBody)), "<br/>", new HTMLElement('fieldset', 'fieldset-product-container inline', new HTMLElement('legend', 'legend-product', 'Order Information'), $Wallet->getFieldSet($Request)->setAttribute('disabled', 'disabled'), $Product->getOrderFieldSet($Request)->setAttribute('disabled', 'disabled'), $Product->getConfigFieldSet($Request)->setAttribute('disabled', 'disabled'), $Product->getFeesFieldSet($Request)->setAttribute('disabled', 'disabled'), "<br/><br/>", new HTMLButton('submit', 'Update', 'submit')), "<br/>", new HTMLElement('fieldset', 'fieldset-transaction-log inline', new HTMLElement('legend', 'legend-transaction-log', 'Transaction Log'), new HTMLTextAreaField(self::PARAM_LOG . '_disabled', $transactionLog, new Attributes('rows', 10, 'cols', 100), new Attributes('disabled', 'disabled')), "<br/>", new HTMLTextAreaField(self::PARAM_LOG, new Attributes('rows', 3, 'cols', 100)), "<br/>", new HTMLButton(self::PARAM_SUBMIT, 'Append', 'append-log')), new HTMLElement('fieldset', 'fieldset-transaction-manage inline', new HTMLElement('legend', 'legend-submit', self::TITLE), new HTMLInputField(self::PARAM_ID, $this->id, 'hidden', new RequiredValidation()), new HTMLElement('label', null, "Status<br/>", $SelectStatus = new HTMLSelectField(self::PARAM_TRANSACTION_STATUS, TransactionEntry::$StatusOptions, new RequiredValidation())), "<br/><br/>", new HTMLButton(self::PARAM_SUBMIT, 'Update', 'submit')), "<br/>");
     $SelectStatus->setInputValue($TransactionEntry->getStatus());
     if (!$Request instanceof IFormRequest) {
         return $Form;
     }
     switch ($Request[self::PARAM_SUBMIT]) {
         case 'submit':
             $status = $Form->validateField($Request, self::PARAM_TRANSACTION_STATUS);
             $TransactionEntry->update($Request, $status);
             ProfitEntry::update($Request, $TransactionEntry->getID());
             return new RedirectResponse(ManageTransaction::getRequestURL($TransactionEntry->getID()), "Transaction updated successfully. Redirecting...", 5);
         case 'append-log':
             $appendLog = $Request[self::PARAM_LOG];
             $TransactionEntry->appendLog($appendLog);
             return new RedirectResponse(ManageTransaction::getRequestURL($TransactionEntry->getID()), "Log appended successfully. Redirecting...", 5);
         default:
             throw new \InvalidArgumentException("Invalid Submit");
     }
 }
 function getOrderFieldSet(IRequest $Request, $title = null)
 {
     $title ?: ($title = $this->getTypeDescription());
     $FieldSet = new HTMLElement('fieldset', self::CLS_FIELDSET_PRODUCT . ' ' . self::CLS_FIELDSET_SHIPPING_PRODUCT, new HTMLHeaderScript('http://ziplookup.googlecode.com/git/zip-lookup/zip-lookup.js'), new Attributes('data-' . static::PARAM_PRODUCT_TYPE, $this->getTypeName()), new HTMLElement('legend', 'legend-shipping', $title), "<div style='display: inline-block'>", new HTMLElement('label', 'label-' . self::PARAM_SHIPPING_FULL_NAME, "Full Name<br/>", new HTMLInputField(self::PARAM_SHIPPING_FULL_NAME, $this->full_name, new Attributes('placeholder', '"Sam Bell"'), new Attributes('size', 10), new RequiredValidation())), "<br/><br/>", new HTMLElement('label', 'label-' . self::PARAM_SHIPPING_ADDRESS, "Shipping Address<br/>", new HTMLInputField(self::PARAM_SHIPPING_ADDRESS, $this->address, new Attributes('size', 12), new Attributes('placeholder', '"123 w. my street"'), new RequiredValidation())), "<br/><br/>", new HTMLElement('label', 'label-' . self::PARAM_SHIPPING_ADDRESS, "Shipping Address #2<br/>", new HTMLInputField(self::PARAM_SHIPPING_ADDRESS2, $this->address2, new Attributes('size', 12), new Attributes('placeholder', '"#101"'))), "</div>", "<div style='float: right; margin-left: 1em;'>", new HTMLElement('label', 'label-' . self::PARAM_SHIPPING_ZIPCODE, "Zip Code<br/>", new HTMLInputField(self::PARAM_SHIPPING_ZIPCODE, $this->zip, new ClassAttributes('zip-lookup-field-zipcode'), new Attributes('placeholder', '"12345"'), new Attributes('size', 5), new RequiredValidation())), "<br/><br/>", new HTMLElement('label', 'label-' . self::PARAM_SHIPPING_CITY, "City<br/>", new HTMLInputField(self::PARAM_SHIPPING_CITY, $this->city, new ClassAttributes('zip-lookup-field-city'), new Attributes('placeholder', '"Austin"'), new Attributes('size', 12), new RequiredValidation())), "<br/><br/>", new HTMLElement('label', 'label-' . self::PARAM_SHIPPING_STATE, "State<br/>", new StyleAttributes('display', 'inline-block'), $SelectStates = new HTMLSelectField(self::PARAM_SHIPPING_STATE, self::$STATES, new Attributes('placeholder', '"TX"'), new ClassAttributes('zip-lookup-field-state-short'), new StyleAttributes('width', '4.5em'), new RequiredValidation())), new HTMLElement('label', 'label-' . self::PARAM_SHIPPING_COUNTRY, "Country<br/>", new StyleAttributes('display', 'inline-block'), $SelectCountry = new HTMLSelectField(self::PARAM_SHIPPING_COUNTRY, self::$COUNTRIES, new Attributes('placeholder', '"USA"'), new StyleAttributes('width', '4.5em'), new ClassAttributes('zip-lookup-field-state-country'), new RequiredValidation())), "</div>");
     $SelectCountry->setInputValue($this->country);
     $SelectStates->setInputValue($this->state);
     return $FieldSet;
 }
示例#3
0
 /**
  * Execute a command and return a response. Does not render
  * @param IRequest $Request
  * @throws RequestException
  * @throws \CPath\Request\Validation\Exceptions\ValidationException
  * @throws \Exception
  * @return IResponse the execution response
  */
 function execute(IRequest $Request)
 {
     $SessionRequest = $Request;
     if (!$SessionRequest instanceof ISessionRequest) {
         throw new \Exception("Session required");
     }
     $Account = AbstractAccountType::loadFromSession($SessionRequest);
     $AccountEntry = AccountEntry::get($Account->getID());
     $AffiliateQuery = AccountAffiliationEntry::queryAccountAffiliates($Account->getID());
     $AffiliateListTable = new HTMLPDOQueryTable($AffiliateQuery);
     $AffiliateListTable->addColumn('affiliate');
     $AffiliateListTable->addColumn('type');
     $Form = new HTMLForm(self::FORM_METHOD, $Request->getPath(), self::FORM_NAME, new HTMLMetaTag(HTMLMetaTag::META_TITLE, self::TITLE), new HTMLHeaderScript(__DIR__ . '/assets/account.js'), new HTMLHeaderStyleSheet(__DIR__ . '/assets/account.css'), new HTMLElement('fieldset', 'fieldset-info inline', new HTMLElement('legend', 'legend-info', self::TITLE), new MapRenderer($AccountEntry)), new HTMLElement('fieldset', 'fieldset-manage inline', new HTMLElement('legend', 'legend-manage', "Manage Account"), $Account->getFieldSet($Request)->addClass('inline'), "<br/><br/>", new HTMLButton(self::PARAM_SUBMIT, 'Update', 'update')), new HTMLElement('fieldset', 'fieldset-affiliates inline', new HTMLElement('legend', 'legend-affiliates', "Add affiliation"), "Account ID:<br/>", new HTMLInputField(self::PARAM_AFFILIATE_ID), "<br/><br/>Affiliation Type:<br/>", $TypeSelect = new HTMLSelectField(self::PARAM_AFFILIATE_TYPE, array("Request New Affiliate" => AccountAffiliationEntry::TYPE_REQUEST_AFFILIATE, "Request New Reseller" => AccountAffiliationEntry::TYPE_REQUEST_RESELLER, "Request New Processor" => AccountAffiliationEntry::TYPE_REQUEST_PROCESSOR)), "<br/><br/>", new HTMLButton(self::PARAM_SUBMIT, 'Request', 'request')), new HTMLElement('fieldset', 'fieldset-affiliate-list inline', new HTMLElement('legend', 'legend-affiliate-list', "Affiliates"), $AffiliateListTable), new HTMLElement('fieldset', 'fieldset-affiliate-approve inline', new HTMLElement('legend', 'legend-affiliate-approve', "Approve Affiliates"), $ApproveSelect = new HTMLSelectField(self::PARAM_APPROVE_AFFILIATE_ID, array('Pending affiliate approvals' => null)), "<br/><br/>", new HTMLButton(self::PARAM_SUBMIT, 'Approve', 'approve')));
     $AffiliateQuery->addRowCallback(function (AccountAffiliationEntry $Affiliation) use($Account, $ApproveSelect) {
         if ($Affiliation->isAwaitingApproval()) {
             $ApproveSelect->addOption($Affiliation->getAffiliateID(), "Approve '" . $Affiliation->getTypeText() . "' - " . $Affiliation->getAffiliateID());
         }
     });
     if (!$Request instanceof IFormRequest) {
         return $Form;
     }
     $submit = $Request[self::PARAM_SUBMIT];
     switch ($submit) {
         case 'update':
             $status = $Form->validateField($Request, self::PARAM_ACCOUNT_STATUS);
             $AccountEntry->update($Request, $Account, $status);
             return new RedirectResponse(AccountHome::getRequestURL(), "Account updated successfully. Redirecting...", 5);
         case 'approve':
             $affiliateID = $Form->validateField($Request, self::PARAM_APPROVE_AFFILIATE_ID);
             AccountAffiliationEntry::approveAffiliation($Request, $Account->getID(), $affiliateID);
             return new RedirectResponse(AccountHome::getRequestURL(), "Account deleted successfully. Redirecting...", 5);
         case 'request':
             $affiliateID = $Form->validateField($Request, self::PARAM_AFFILIATE_ID);
             $type = $Form->validateField($Request, self::PARAM_AFFILIATE_TYPE);
             AccountAffiliationEntry::setAffiliate($Request, $Account->getID(), $affiliateID, $type);
             return new RedirectResponse(AccountHome::getRequestURL(), "Affiliation requested successfully. Redirecting...", 5);
     }
     throw new \InvalidArgumentException($submit);
 }
 /**
  * Execute a command and return a response. Does not render
  * @param IRequest $Request
  * @return IResponse the execution response
  */
 function execute(IRequest $Request)
 {
     $Entry = PaymentSourceEntry::get($this->id);
     $Source = $Entry->getPaymentSource();
     $SourceForm = $Source->getFieldSet($Request);
     $SessionRequest = $Request;
     if (!$SessionRequest instanceof ISessionRequest) {
         throw new \Exception("Session required");
     }
     $Account = AbstractAccountType::loadFromSession($SessionRequest);
     if (!$Account instanceof AdministratorAccount) {
         throw new RequestException("Administrator account required");
     }
     $Form = new HTMLForm(self::FORM_METHOD, $Request->getPath(), self::FORM_NAME, new HTMLMetaTag(HTMLMetaTag::META_TITLE, self::TITLE), new HTMLElement('fieldset', new HTMLElement('legend', 'legend-submit', self::TITLE), new HTMLInputField(self::PARAM_ID, $this->id, 'hidden'), new HTMLElement('label', null, "Status<br/>", $Select = new HTMLSelectField(self::PARAM_SOURCE_STATUS, PaymentSourceEntry::$StatusOptions, new RequiredValidation())), "<br/><br/>", $SourceForm, "<br/>Submit:<br/>", new HTMLButton('submit', 'Submit', 'submit')), "<br/>");
     $Select->setInputValue($Entry->getStatus());
     if (!$Request instanceof IFormRequest) {
         return $Form;
     }
     $status = $Form->validateField($Request, self::PARAM_SOURCE_STATUS);
     $Source->validateRequest($Request, $Form);
     $Entry->update($Request, $Source, $status);
     return new RedirectResponse(ManagePaymentSource::getRequestURL($Entry->getID()), "Payment Source updated successfully. Redirecting...", 5);
 }
 function getFieldSet(IRequest $Request, $title = null)
 {
     list($month, $year) = explode('/', $this->exp, 2);
     $months = array($month => $month);
     for ($i = 1; $i <= 12; $i++) {
         $months[sprintf('%02d', $i) . ' - ' . date('F', strtotime('01.' . $i . '.2001'))] = sprintf('%02d', $i);
     }
     $years = array($year => $year);
     for ($i = (int) date('Y'); $i <= (int) date('Y') + self::YEARS_AHEAD; $i++) {
         $years[sprintf('%04d', $i)] = $i;
     }
     $title ?: ($title = static::TYPE_DESCRIPTION);
     $type = $this->getTypeName();
     $FieldSet = new HTMLElement('fieldset', self::CLS_FIELDSET_WALLET . ' fieldset-' . $type, new HTMLHeaderStyleSheet(__DIR__ . '/assets/wallet.css'), new HTMLHeaderScript('http://ziplookup.googlecode.com/git/zip-lookup/zip-lookup.js'), new HTMLElement('legend', 'legend-' . $type, $title), "<div style='display: inline-block'>", new HTMLElement('label', 'label-' . self::PARAM_BILLING_NAME, "Name on Address<br/>", new HTMLInputField(self::PARAM_BILLING_NAME, $this->name, new Attributes('placeholder', '"Sam Bell"'), new Attributes('size', 10), new RequiredValidation())), "<br/><br/>", new HTMLElement('label', 'label-' . self::PARAM_BILLING_ADDRESS, "Billing Address<br/>", new HTMLInputField(self::PARAM_BILLING_ADDRESS, $this->address, new Attributes('size', 12), new Attributes('placeholder', '"123 w. my street"'), new RequiredValidation()), "<br/>", new HTMLInputField(self::PARAM_BILLING_ADDRESS2, $this->address2, new Attributes('size', 12), new Attributes('placeholder', '"#101"'))), "<br/><br/>", new HTMLElement('label', 'label-' . self::PARAM_BILLING_ZIPCODE, "Zip Code<br/>", new HTMLInputField(self::PARAM_BILLING_ZIPCODE, $this->zip, new ClassAttributes('zip-lookup-field-zipcode'), new Attributes('placeholder', '"12345"'), new Attributes('size', 5), new RequiredValidation())), "<br/><br/>", new HTMLElement('label', 'label-' . self::PARAM_BILLING_CITY, "City<br/>", new HTMLInputField(self::PARAM_BILLING_CITY, $this->city, new ClassAttributes('zip-lookup-field-city'), new Attributes('placeholder', '"Austin"'), new Attributes('size', 12), new RequiredValidation())), "<br/><br/>", new HTMLElement('label', 'label-' . self::PARAM_BILLING_STATE, "State<br/>", new StyleAttributes('display', 'inline-block'), $SelectState = new HTMLSelectField(self::PARAM_BILLING_STATE, self::$STATES, new Attributes('placeholder', '"TX"'), new ClassAttributes('zip-lookup-field-state-short'), new StyleAttributes('width', '4.5em'), new RequiredValidation())), new HTMLElement('label', 'label-' . self::PARAM_BILLING_COUNTRY, "Country<br/>", new StyleAttributes('display', 'inline-block'), $SelectCountry = new HTMLSelectField(self::PARAM_BILLING_COUNTRY, self::$COUNTRIES, new Attributes('placeholder', '"USA"'), new StyleAttributes('width', '4.5em'), new RequiredValidation())), "</div>", "<div style='float: right; margin-left: 1em;'>", new HTMLElement('label', 'label-' . self::PARAM_BILLING_EMAIL, "Email Address<br/>", new HTMLInputField(self::PARAM_BILLING_EMAIL, $this->email, new Attributes('placeholder', '"*****@*****.**"'), new Attributes('size', 10), new RequiredValidation(), new EmailValidation())), "<br/><br/>", new HTMLElement('label', 'label-' . self::PARAM_CARD_NUMBER, "Card Number<br/>", new HTMLInputField(self::PARAM_CARD_NUMBER, $this->card, new Attributes('placeholder', '"1234567812345678"'), new Attributes('size', 14), new RequiredValidation(), new CreditCardValidation())), "<br/><br/>", new HTMLElement('label', 'label-' . self::PARAM_EXP_MONTH, "Month<br/>", new StyleAttributes('display', 'inline-block'), new HTMLSelectField(self::PARAM_EXP_MONTH, $months, new StyleAttributes('width', '4em'), new RequiredValidation())), new HTMLElement('label', 'label-' . self::PARAM_EXP_YEAR, "Year<br/>", new StyleAttributes('display', 'inline-block'), new HTMLSelectField(self::PARAM_EXP_YEAR, $years, new StyleAttributes('width', '5.5m'), new RequiredValidation())), "<br/><br/>", new HTMLElement('label', 'label-' . self::PARAM_CARD_CSC, "CSC/CVV2<br/>", new HTMLInputField(self::PARAM_CARD_CSC, $this->csc, new Attributes('placeholder', '"123"'), new Attributes('size', 4), new RequiredValidation())), "</div>");
     $SelectCountry->setInputValue($this->country);
     $SelectState->setInputValue($this->state);
     return $FieldSet;
 }
示例#6
0
 /**
  * Execute a command and return a response. Does not render
  * @param IRequest $Request
  * @throws RequestException
  * @return IResponse the execution response
  */
 function execute(IRequest $Request)
 {
     $SessionRequest = $Request;
     if (!$SessionRequest instanceof ISessionRequest) {
         throw new RequestException("Session required");
     }
     $ProductEntry = ProductEntry::get($this->id);
     $setRates = false;
     $Account = AbstractAccountType::loadFromSession($SessionRequest);
     if ($Account instanceof MerchantAccount) {
         if ($Account->getID() !== $ProductEntry->getAccountID()) {
             throw new RequestException("Product does not belong to merchant");
         }
     } else {
         if ($Account instanceof AdministratorAccount) {
             $setRates = true;
         } else {
             throw new RequestException("Only merchants may create a new Product");
         }
     }
     $Product = $ProductEntry->getProduct();
     $sourceOptions = array("Choose a Payment Product" => null);
     $PaymentSourceTable = new PaymentSourceTable();
     foreach ($PaymentSourceTable->fetchAll(1) as $PaymentSourceEntry) {
         $PaymentSource = $PaymentSourceEntry->getPaymentSource();
         $sourceOptions[$PaymentSource->getTitle()] = $PaymentSourceEntry->getID();
     }
     $Form = new HTMLForm(self::FORM_METHOD, $Request->getPath(), self::FORM_NAME, new HTMLMetaTag(HTMLMetaTag::META_TITLE, self::TITLE), new HTMLHeaderScript(__DIR__ . '/assets/product.js'), new HTMLHeaderStyleSheet(__DIR__ . '/assets/product.css'), new HTMLInputField(self::PARAM_ID, $this->id, 'hidden'), new HTMLInputField(self::PARAM_PRODUCT_TYPE, $Product->getTypeName(), 'hidden'), new HTMLElement('fieldset', new HTMLElement('legend', 'legend-order-page', "Try Order Page"), new HTMLAnchor(OrderForm::getRequestURL($this->getProductID()), "Order Page")), new HTMLElement('fieldset', 'fieldset-info inline', new HTMLElement('legend', 'legend-info', "Product Info"), new MapRenderer($ProductEntry)), new HTMLElement('fieldset', 'fieldset-config inline', new HTMLElement('legend', 'legend-config', self::TITLE), $Product->getConfigFieldSet($Request), $FeesFieldSet = $Product->getFeesFieldSet($Request), new HTMLElement('fieldset', 'fieldset-status inline', new HTMLElement('legend', 'legend-status', "Status"), $SelectStatus = new HTMLSelectField(self::PARAM_PRODUCT_STATUS, ProductEntry::$StatusOptions, new RequiredValidation())), "<br/><br/>", new HTMLButton(self::PARAM_SUBMIT, 'Update', 'update')), new HTMLElement('fieldset', 'inline', new HTMLElement('legend', 'legend-submit', "Delete Product"), new HTMLButton(self::PARAM_SUBMIT, 'Delete', 'delete')), "<br/>");
     if (!$setRates) {
         $FeesFieldSet->setAttribute('disabled', 'disabled');
     }
     $SelectStatus->setInputValue($ProductEntry->getStatus());
     if (!$Request instanceof IFormRequest) {
         return $Form;
     }
     $submit = $Request[self::PARAM_SUBMIT];
     switch ($submit) {
         case 'update':
             $status = $Request[self::PARAM_PRODUCT_STATUS];
             $Product->validateConfigRequest($Request, $Form);
             $Product->validateFeesRequest($Request, $Form);
             $ProductEntry->update($Request, $Product, $status);
             return new RedirectResponse(ManageProduct::getRequestURL($this->getProductID()), "Product updated successfully. Redirecting...", 2);
         case 'delete':
             ProductEntry::delete($Request, $this->getProductID());
             return new RedirectResponse(SearchProducts::getRequestURL(), "Product deleted successfully. Redirecting...", 8);
     }
     throw new \InvalidArgumentException($submit);
 }
 /**
  * @param IRequest $Request
  * @return HTMLForm
  */
 function getFieldSet(IRequest $Request)
 {
     $Fieldset = new HTMLElement('fieldset', self::CLS_FIELDSET_PAYMENT_SOURCE . ' fieldset-' . self::SOURCE_NAME, new HTMLElement('legend', 'legend-' . self::SOURCE_NAME, static::SOURCE_DESCRIPTION), new HTMLElement('label', 'label-' . self::PARAM_SOURCE_TITLE, "Title<br/>", new HTMLInputField(self::PARAM_SOURCE_TITLE, $this->title, new RequiredValidation())), "<br/><br/>", new HTMLElement('label', 'label-' . self::PARAM_SOURCE_CURRENCY, "Currency<br/>", $SelectCurrency = new HTMLSelectField(self::PARAM_SOURCE_CURRENCY, Currency::$CurrencyOptions, new RequiredValidation())));
     $SelectCurrency->setInputValue($this->currency ?: 'USD');
     return $Fieldset;
 }
 function getConfigFieldSet()
 {
     $FieldSet = new HTMLElement('fieldset', self::CLS_FIELDSET_CONFIG . ' inline', new Attributes('data-' . static::PARAM_PRODUCT_TYPE, $this->getTypeName()), new HTMLElement('legend', 'legend-shipping', "Configure Product"), new HTMLElement('label', 'label-' . self::PARAM_PRODUCT_TITLE, "Product Title<br/>", new HTMLInputField(self::PARAM_PRODUCT_TITLE, $this->title, new Attributes('placeholder', '"My Product - $9.99"'), new RequiredValidation())), "<br/><br/>", new HTMLElement('label', 'label-' . self::PARAM_PRODUCT_TOTAL_COST, "Total Cost<br/>", new HTMLInputField(self::PARAM_PRODUCT_TOTAL_COST, $this->total, new Attributes('placeholder', '"9.99"'), new RequiredValidation())), "<br/><br/>", new HTMLElement('label', null, "Choose Wallet Types(s)<br/>", $SourceSelect = new HTMLSelectField(self::PARAM_PAYMENT_WALLET_TYPES . '[]', new Attributes('multiple', 'multiple'))));
     foreach (AbstractWallet::loadAllWalletTypes() as $WalletType) {
         $SourceSelect->addOption($WalletType::ID_FLAG, $WalletType->getDescription());
         if ($WalletType::ID_FLAG & $this->wallet_flags) {
             $SourceSelect->select($WalletType::ID_FLAG);
         }
     }
     return $FieldSet;
 }