diff --git "a/datasets/chameleon_shop_dataset20230605-2051.csv" "b/datasets/chameleon_shop_dataset20230605-2051.csv" new file mode 100644--- /dev/null +++ "b/datasets/chameleon_shop_dataset20230605-2051.csv" @@ -0,0 +1,28421 @@ +classname,method_name,description,method_code,explanation +maps,convertLocalToOrderAddress,* util class maps amazon data to local representations.,"$prefix = (self::ORDER_ADDRESS_TYPE_BILLING === $targetAddressType) ? 'adr_billing_' : 'adr_shipping_'; + $orderAdr = array( + $prefix.'company' => '', + $prefix.'salutation_id' => '', + $prefix.'firstname' => '', + $prefix.'lastname' => '', + $prefix.'street' => '', + $prefix.'streetnr' => '', + $prefix.'city' => '', + $prefix.'postalcode' => '', + $prefix.'country_id' => '', + $prefix.'telefon' => '', + $prefix.'fax' => '', + $prefix.'additional_info' => '', + ); + foreach ($localAddress as $field => $value) { + if ('data_country_id' === $field) { + $field = 'country_id';",- +maps,convertAddressFromAmazonToLocal,"* @param int $targetAddressType - one of ORDER_ADDRESS_TYPE_* + * @param array $localAddress + * + * @return array","$mapping = array( + 'Name' => 'lastname', + 'AddressLine1' => 'company', + 'AddressLine2' => 'street', + 'AddressLine3' => 'address_additional_info', + 'County' => null, + 'District' => null, + 'StateOrRegion' => null, + 'City' => 'city', + 'PostalCode' => 'postalcode', + 'Phone' => 'telefon', + 'CountryCode' => 'data_country_id', + ); + + foreach (array_keys($address) as $field) { + if (false === array_key_exists($field, $mapping)) { + throw new InvalidArgumentException( + 'invalid field '.$field.' (valid fields are: ""'.implode( + '"", ""', + array_keys($mapping) + ).'"")' + );",- +maps,convertAddressFromAmazonObjectToLocal,"* @param array $address + * @param int $targetAddressType + * + * @return array + * + * @throws InvalidArgumentException","return $this->convertAddressFromAmazonToLocal( + array( + 'Name' => $address->getName(), + 'AddressLine1' => $address->getAddressLine1(), + 'AddressLine2' => $address->getAddressLine2(), + 'AddressLine3' => $address->getAddressLine3(), + 'County' => $address->getCounty(), + 'District' => $address->getDistrict(), + 'StateOrRegion' => $address->getStateOrRegion(), + 'City' => $address->getCity(), + 'PostalCode' => $address->getPostalCode(), + 'Phone' => $address->getPhone(), + 'CountryCode' => $address->getCountryCode(), + ), + $targetAddressType + );",- +maps,getCountryIdFromAmazonCountryCode,"* code from amazon to convert address lines to company postbox and street + * for countries AT nad DE only. + * + * @param array $localAddressData + * @param array $address + * + * @return array","$countryObject = TdbDataCountry::GetInstanceForIsoCode($amazonCountryCode); + if (null === $countryObject || false === $this->isCountryForAddressTypeActive($countryObject, $targetAddressType)) { + throw new InvalidArgumentException('country code '.$amazonCountryCode.' is not supported');",- +AmazonOrderReferenceObject,"__construct( + AmazonPaymentGroupConfig $config, + $amazonOrderReferenceId, + LoggerInterface $logger = null + )",* Class AmazonOrderReference.,"$this->config = $config; + $this->amazonOrderReferenceId = $amazonOrderReferenceId; + $this->converter = new AmazonDataConverter(); + $this->logger = $logger;",- +AmazonOrderReferenceObject,setOrderReferenceOrderValue,* @var AmazonPaymentGroupConfig,"$request = new \OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest(); + $request->setSellerId($this->config->getMerchantId()); + $request->setAmazonOrderReferenceId($this->amazonOrderReferenceId); + + $request->setOrderReferenceAttributes(new \OffAmazonPaymentsService_Model_OrderReferenceAttributes()); + $request->getOrderReferenceAttributes()->setPlatformId($this->config->getPlatformId()); + $request->getOrderReferenceAttributes()->setOrderTotal(new \OffAmazonPaymentsService_Model_OrderTotal()); + + $request->getOrderReferenceAttributes()->getOrderTotal()->setCurrencyCode('EUR'); + + $request->getOrderReferenceAttributes()->getOrderTotal()->setAmount($orderValue); + + $orderReferenceDetails = null; + + // set order reference details + try { + $response = $this->config->getAmazonAPI()->setOrderReferenceDetails($request); + /** @var \OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult $result */ + $result = $response->getSetOrderReferenceDetailsResult(); + /** @var \OffAmazonPaymentsService_Model_OrderReferenceDetails $orderReferenceDetails */ + $orderReferenceDetails = $result->getOrderReferenceDetails(); + $this->logApiCall($request, $response);",- +AmazonOrderReferenceObject,setOrderReferenceDetails,* @var string,"if ($order->getAmazonOrderReferenceId() !== $this->amazonOrderReferenceId) { + throw new \TPkgCmsException_Log(""amazonOrderReferenceId passed via order ({$order->getAmazonOrderReferenceId( + )",- +AmazonOrderReferenceObject,confirmOrderReference,* @var AmazonDataConverter|null,"$request = new \OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest(); + $request->setAmazonOrderReferenceId($this->amazonOrderReferenceId); + $request->setSellerId($this->config->getMerchantId()); + + try { + $response = $this->config->getAmazonAPI()->confirmOrderReference($request); + $this->logApiCall($request, $response);",- +AmazonOrderReferenceObject,authorize,* @var LoggerInterface|null,"$request = new \OffAmazonPaymentsService_Model_AuthorizeRequest(); + $request->setAuthorizationReferenceId($localAuthorizationReferenceId); + $request->setAmazonOrderReferenceId($this->amazonOrderReferenceId); + $request->setAuthorizationAmount(new \OffAmazonPaymentsService_Model_Price()); + $request->getAuthorizationAmount()->setAmount($amount); + + if (method_exists($order, 'GetFieldPkgShopCurrency')) { + $currency = $order->GetFieldPkgShopCurrency(); + $request->getAuthorizationAmount()->setCurrencyCode($currency->fieldIso4217);",- +AmazonOrderReferenceObject,"authorizeAndCapture( + \TdbShopOrder $order, + $localAuthorizationReferenceId, + $amount, + $synchronous, + $invoiceNumber = null + )",* {@inheritdoc},"$request = new \OffAmazonPaymentsService_Model_AuthorizeRequest(); + $request->setAuthorizationReferenceId($localAuthorizationReferenceId); + $request->setAmazonOrderReferenceId($this->amazonOrderReferenceId); + $request->setAuthorizationAmount(new \OffAmazonPaymentsService_Model_Price()); + $request->getAuthorizationAmount()->setAmount($amount); + + if (method_exists($order, 'GetFieldPkgShopCurrency')) { + $currency = $order->GetFieldPkgShopCurrency(); + $request->getAuthorizationAmount()->setCurrencyCode($currency->fieldIso4217);",- +AmazonOrderReferenceObject,"captureExistingAuthorization( + \TdbShopOrder $order, + $amazonAuthorizationId, + $localCaptureReferenceId, + $amount, + $invoiceNumber = null + )","* @param float $orderValue + * + * @return \OffAmazonPaymentsService_Model_OrderReferenceDetails|null + * + * @throws TPkgCmsException_LogAndMessage","$request = new \OffAmazonPaymentsService_Model_CaptureRequest(); + $request->setCaptureAmount(new \OffAmazonPaymentsService_Model_Price()); + $request->getCaptureAmount()->setAmount($amount); + $request->getCaptureAmount()->setCurrencyCode('EUR'); + $request->setSoftDescriptor($this->config->getSoftDescriptor($order, $invoiceNumber)); + $request->setSellerCaptureNote($this->config->getSellerOrderNote($order)); + $request->setAmazonAuthorizationId($amazonAuthorizationId); + $request->setCaptureReferenceId($localCaptureReferenceId); + $request->setSellerId($this->config->getMerchantId()); + + try { + $response = $this->config->getAmazonAPI()->capture($request); + $details = $response->getCaptureResult()->getCaptureDetails(); + // check state + if (self::STATUS_CAPTURE_DECLINED === $details->getCaptureStatus()->getState()) { + $this->logApiError($request, $response); + throw new AmazonCaptureDeclinedException($details->getCaptureStatus()->getReasonCode(), + array( + 'reasonCode' => $details->getCaptureStatus()->getReasonCode(), + 'reasonDescription' => $details->getCaptureStatus()->getReasonDescription(), + ), + ""capture for order {$order->id",- +AmazonOrderReferenceObject,"refund( + \TdbShopOrder $order, + $amazonCaptureId, + $localRefundReferenceId, + $amount, + $invoiceNumber = null, + $sellerRefundNote = null + )",@var \OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult $result,"$request = new \OffAmazonPaymentsService_Model_RefundRequest(); + $request->setSellerId($this->config->getMerchantId()); + + $request->setAmazonCaptureId($amazonCaptureId); + $request->setRefundReferenceId($localRefundReferenceId); + + $request->setRefundAmount(new \OffAmazonPaymentsService_Model_Price()); + $request->getRefundAmount()->setAmount($amount); + $request->getRefundAmount()->setCurrencyCode('EUR'); + + $request->setSoftDescriptor($this->config->getSoftDescriptor($order, $invoiceNumber)); + $request->setSellerRefundNote($sellerRefundNote); + + try { + $response = $this->config->getAmazonAPI()->refund($request); + $details = $response->getRefundResult()->getRefundDetails(); + if (self::STATUS_REFUND_DECLINED === $details->getRefundStatus()->getState()) { + $this->logApiError($request, $response); + throw new AmazonRefundDeclinedException($details->getRefundStatus()->getReasonCode(), + array( + 'reasonCode' => $details->getRefundStatus()->getReasonCode(), + 'reasonDescription' => $details->getRefundStatus()->getReasonDescription(), + ), + ""refund for order {$order->id",- +AmazonOrderReferenceObject,getOrderReferenceDetails,@var \OffAmazonPaymentsService_Model_OrderReferenceDetails $orderReferenceDetails,"if (null !== $constraintsThatShouldBeIgnored) { + $allowedConstraints = array( + self::CONSTRAINT_AMOUNT_NOT_SET, + self::CONSTRAINT_PAYMENT_PLAN_NOT_SET, + self::CONSTRAINT_SHIPPING_ADDRESS_NOT_SET, + self::CONSTRAINT_UNKNOWN, + ); + foreach ($constraintsThatShouldBeIgnored as $ignoreConstraint) { + if (false === in_array($ignoreConstraint, $allowedConstraints)) { + throw new \InvalidArgumentException(""you are trying to ignore an unknown constraint [{$ignoreConstraint",- +AmazonOrderReferenceObject,getAuthorizationDetails,* {@inheritdoc},"$request = new \OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest(); + $request->setSellerId($this->config->getMerchantId()); + $request->setAmazonAuthorizationId($amazonAuthorizationId); + + try { + $response = $this->config->getAmazonAPI()->getAuthorizationDetails($request); + $this->logApiCall($request, $response); + + return $response->getGetAuthorizationDetailsResult()->getAuthorizationDetails();",- +AmazonOrderReferenceObject,getCaptureDetails,@var \OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult $result,"$request = new \OffAmazonPaymentsService_Model_GetCaptureDetailsRequest(); + $request->setSellerId($this->config->getMerchantId()); + $request->setAmazonCaptureId($amazonCaptureId); + try { + $response = $this->config->getAmazonAPI()->getCaptureDetails($request); + $this->logApiCall($request, $response); + + return $response->getGetCaptureDetailsResult()->getCaptureDetails();",- +AmazonOrderReferenceObject,getRefundDetails,@var \OffAmazonPaymentsService_Model_OrderReferenceDetails $orderReferenceDetails,"$request = new \OffAmazonPaymentsService_Model_GetRefundDetailsRequest(); + $request->setSellerId($this->config->getMerchantId()); + $request->setAmazonRefundId($amazonRefundId); + try { + $response = $this->config->getAmazonAPI()->getRefundDetails($request); + $this->logApiCall($request, $response); + + return $response->getGetRefundDetailsResult()->getRefundDetails();",- +AmazonOrderReferenceObject,cancelOrderReference,* {@inheritdoc},"$request = new \OffAmazonPaymentsService_Model_CancelOrderReferenceRequest(); + $request->setSellerId($this->config->getMerchantId()); + $request->setAmazonOrderReferenceId($this->amazonOrderReferenceId); + if (null !== $cancellationReason) { + $cancellationReason = mb_substr($cancellationReason, 0, 1024); + $request->setCancelationReason($cancellationReason);",- +AmazonOrderReferenceObject,closeOrderReference,* {@inheritdoc},"$request = new \OffAmazonPaymentsService_Model_CloseOrderReferenceRequest(); + $request->setSellerId($this->config->getMerchantId()); + $request->setAmazonOrderReferenceId($this->amazonOrderReferenceId); + if (null !== $closureReason) { + $closureReason = mb_substr($closureReason, 0, 1024); + $request->setClosureReason($closureReason);",- +AmazonOrderReferenceObject,closeAuthorization,* {@inheritdoc},"$request = new \OffAmazonPaymentsService_Model_CloseAuthorizationRequest(); + $request->setSellerId($this->config->getMerchantId()); + $request->setAmazonAuthorizationId($amazonAuthorizationId); + if (null !== $closureReason) { + $closureReason = mb_substr($closureReason, 0, 1024); + $request->setClosureReason($closureReason);",- +AmazonOrderReferenceObject,findBestCaptureMatchForRefund,* {@inheritdoc},"$captureCandidateList = array(); + + $amazonCaptureIdListToCheck = array(); + /** @var $item IAmazonReferenceId */ + foreach ($captureIdList->getIterator() as $item) { + $amazonCaptureIdListToCheck[] = $item->getAmazonId();",- +AmazonPayment,__construct,* auth mode.,"if (false === ($config instanceof AmazonPaymentGroupConfig)) { + throw new \InvalidArgumentException('AmazonPayment expects an instance of AmazonPaymentConfig');",- +AmazonPayment,updateWithSelectedShippingAddress,* @var AmazonPaymentGroupConfig,"$amazonOrderRef = $this->config->amazonOrderReferenceObjectFactory($basket->getAmazonOrderReferenceId()); + + $details = $amazonOrderRef->getOrderReferenceDetails( + array( + AmazonOrderReferenceObject::CONSTRAINT_AMOUNT_NOT_SET, + AmazonOrderReferenceObject::CONSTRAINT_PAYMENT_PLAN_NOT_SET, + AmazonOrderReferenceObject::CONSTRAINT_UNKNOWN, + ) + ); + + /** @var \OffAmazonPaymentsService_Model_Destination $destination */ + $destination = $details->getDestination(); + /** @var \OffAmazonPaymentsService_Model_Address $physicalDestination */ + $physicalDestination = $destination->getPhysicalDestination(); + + $countryId = null; + $countryCode = $physicalDestination->getCountryCode(); + try { + $countryId = $this->converter->getCountryIdFromAmazonCountryCode($countryCode, AmazonDataConverter::ORDER_ADDRESS_TYPE_SHIPPING);",- +AmazonPayment,captureOrder,* @var AmazonDataConverter,"$transaction = null; + + $amazonOrderRef = $this->config->amazonOrderReferenceObjectFactory($order->getAmazonOrderReferenceId()); + $amazonOrderRef->setOrderReferenceDetails($order); + $amazonOrderRef->confirmOrderReference(); + + // add catch block so we can cancel the order with amazon if anything goes wrong after the confirm + try { + // update order shipping address + $this->updateOrderWithAmazonDataBeforeAuthorize($amazonOrderRef->getOrderReferenceDetails(), $order); + + // auth / auth + capture + + $authWithCapture = array(); + $authNoCapture = array(); + $orderItems = $order->GetFieldShopOrderItemList(); + while ($item = $orderItems->Next()) { + // if we are to capture on order completion, then every time is in the capture list + if (false === $this->config->isCaptureOnShipment()) { + $authWithCapture[$item->id] = $item->fieldOrderAmount; + continue;",- +AmazonPayment,"captureShipment( + \TPkgShopPaymentTransactionManager $transactionManager, + \TdbShopOrder $order, + $value, + $invoiceNumber = null, + array $orderItemList = null + )",* @var Connection,"$idManager = $this->getAmazonIdReferenceManager($order); + $amazonOrderRefObject = $this->config->amazonOrderReferenceObjectFactory( + $idManager->getAmazonOrderReferenceId() + ); + + $authIdList = $idManager->getListOfAuthorizations(); + + $transactionData = $transactionManager->getTransactionDataFromOrder( + \TPkgShopPaymentTransactionManager::TRANSACTION_TYPE_PAYMENT, + $orderItemList + ); + $transactionData->setContext( + new \TPkgShopPaymentTransactionContext('captureShipment for invoice '.((null !== $invoiceNumber) ? $invoiceNumber : 'null')) + ); + + $transactionData->setTotalValue($value); + + if (null === $authIdList) { + return $this->captureShipmentViaNewAuthCaptureNow( + $transactionManager, + $transactionData, + $order, + $value, + $amazonOrderRefObject, + $idManager, + $invoiceNumber + );",- +AmazonPayment,"refund( + \TPkgShopPaymentTransactionManager $transactionManager, + \TdbShopOrder $order, + $value, + $invoiceNumber = null, + $sellerRefundNote = null, + array $orderItemList = null + )","* @param \IPkgShopOrderPaymentConfig $config + * + * @throws \InvalidArgumentException","$idManager = $this->getAmazonIdReferenceManager($order); + + $amazonOrderReferenceObject = $this->config->amazonOrderReferenceObjectFactory( + $order->getAmazonOrderReferenceId() + ); + + $refundableCaptures = $amazonOrderReferenceObject->findBestCaptureMatchForRefund( + $idManager->getListOfCaptures(), + $value + ); + + if (0 === count($refundableCaptures)) { + $idListChecked = array(); + /** @var $captureIdChecked AmazonReferenceId */ + foreach ($idManager->getListOfCaptures() as $captureIdChecked) { + $idListChecked[] = $captureIdChecked->getAmazonId();",- +AmazonPayment,"cancelOrder( + \TPkgShopPaymentTransactionManager $transactionManager, + \TdbShopOrder $order, + $cancellationReason = null + )","* @param \TShopBasket $basket + * @param \TdbDataExtranetUser $user The user whose shipping and billing address is to be set. Note that the user object will be changed in memory, but not persistent. + * + * @throws \TPkgCmsException_LogAndMessage","$amazonOrderReference = $this->config->amazonOrderReferenceObjectFactory($order->getAmazonOrderReferenceId()); + + $amazonOrderReference->cancelOrderReference($cancellationReason);",- +AmazonPayment,setConverter,@var \OffAmazonPaymentsService_Model_Destination $destination,$this->converter = $converter;,- +AmazonPayment,setDb,@var \OffAmazonPaymentsService_Model_Address $physicalDestination,$this->db = $db;,- +AmazonPayment,getDb,"* if capture on shipping is active, then it will + * * auth + capture all downloads plus create a transaction for this value + * * auth remaining value + * if capture on shipping is disabled, then it will + * * auth + capture the order value + create a matching transaction. + * + * the order object is marked as canceled whenever there is an error and NO payment has been executed (no auth and no capture) + * if there is an error after a successful auth or capture, then an exception will be thrown but the order is NOT marked as canceled + * so make sure to use this to decided what to show the user (the user should see the thank you page, with the error message plus the shop + * owner should be notified) + * + * note that auth+capture is always called first. so if that fails, then the order is canceled as well (since there are no open auth after on the order) + * + * should the amazon order object have benn confirmed and then we get an exception, then we will try to cancel the order object as well + * + * {@inheritdoc}","if (null === $this->db) { + $this->db = \ChameleonSystem\CoreBundle\ServiceLocator::get('database_connection');",- +AmazonPaymentConfigFactory,__construct,* @var LoggerInterface,"$this->logger = $logger; + $this->shopPaymentConfigLoader = $shopPaymentConfigLoader; + $this->configValidator = $configValidator; + $this->internalCache = array();",- +AmazonPaymentConfigFactory,getConfig,* @var ShopPaymentConfigLoaderInterface,"if (array_key_exists($portalId, $this->internalCache)) { + return $this->internalCache[$portalId];",- +AmazonPaymentGroupConfig,__construct,* @var \IPkgShopOrderPaymentConfig,$this->config = $config;,- +AmazonPaymentGroupConfig,getValue,* @var \OffAmazonPaymentsService_Client|null,"return $this->config->getValue($key, $default);",- +AmazonPaymentGroupConfig,getMerchantId,* @var LoggerInterface,return $this->getAmazonAPI()->getMerchantValues()->getMerchantId();,- +AmazonPaymentGroupConfig,getAccessKey,* {@inheritdoc},return $this->getAmazonAPI()->getMerchantValues()->getAccessKey();,- +AmazonPaymentGroupConfig,getSecretKey,* @return string|null,return $this->getAmazonAPI()->getMerchantValues()->getSecretKey();,- +AmazonPaymentGroupConfig,getApplicationName,* @return string|null,return $this->getAmazonAPI()->getMerchantValues()->getApplicationName();,- +AmazonPaymentGroupConfig,getApplicationVersion,* @return string|null,return $this->getAmazonAPI()->getMerchantValues()->getApplicationVersion();,- +AmazonPaymentGroupConfig,getRegion,* @return string|null,return $this->getAmazonAPI()->getMerchantValues()->getRegion();,- +AmazonPaymentGroupConfig,getServiceURL,* @return string|null,return $this->getAmazonAPI()->getMerchantValues()->getServiceUrl();,- +AmazonPaymentGroupConfig,getWidgetURL,* @return string - one of self::REGION_*,return $this->getAmazonAPI()->getMerchantValues()->getWidgetUrl();,- +AmazonPaymentGroupConfig,getPayWithAmazonButton,"* returns the full localized service URL. + * + * @return string|null","$buttonURL = $this->getValue('payWithAmazonButtonURL', null); + if (null !== $buttonURL) { + $buttonURL .= '?sellerId='.urlencode($this->getMerchantId());",- +AmazonPaymentGroupConfig,getPayWithAmazonButtonText,"* returns the full localized widgetURL. + * + * @return string|null","return $this->getValue('payWithAmazonButtonText', null);",- +AmazonPaymentGroupConfig,getPlatformId,"* return buy button url inc. merchant id parameter. + * + * @return string",return self::ESONO_PLATFORM_ID;,- +AmazonPaymentGroupConfig,getAmazonAPI,"* return buy button text. + * + * @return string","if (null !== $this->amazonApi) { + return $this->amazonApi;",- +AmazonPaymentGroupConfig,getAmazonIPNAPI,* @return \OffAmazonPaymentsService_Client,return new \OffAmazonPaymentsNotifications_Client();,- +AmazonPaymentGroupConfig,getSellerAuthorizationNote,"* return the IPN api. + * + * @return \OffAmazonPaymentsNotifications_Client","$text = $this->getValue('sellerAuthorizationNote'); + $data = $this->getTemplateDataFromOrder($order); + $data['captureNow'] = $captureNow; + $data['transaction__totalValue'] = $amount; + $data['transaction__items'] = $itemList; + + return $this->render($text, $data);",- +AmazonPaymentGroupConfig,getSellerOrderNote,"* returns a text displayed on the auth email sent by amazon to the buyer. + * + * @param \TdbShopOrder $order + * @param float $amount + * @param bool $captureNow + * @param array $itemList + * + * @return string","$text = $this->getValue('sellerNote'); + $data = $this->getTemplateDataFromOrder($order); + + return mb_substr($this->render($text, $data), 0, 1024);",- +AmazonPaymentGroupConfig,getSoftDescriptor,"* Represents a description of the order that is displayed in emails to the buyer. (max 1024 chars). + * + * @param \TdbShopOrder $order + * + * @return string","$text = $this->getValue('softDescriptor'); + $data = $this->getTemplateDataFromOrder($order); + $data['invoiceNumber'] = $invoiceNumber; + + return mb_substr($this->render($text, $data), 0, 16);",- +AmazonPaymentGroupConfig,amazonOrderReferenceObjectFactory,"* The description to be shown on the buyer’s payment instrument statement. Maximum: 16 characters. + * + * @param \TdbShopOrder $order + * @param string|null $invoiceNumber - optionally you may pass an invoice number + * + * @return string","return new AmazonOrderReferenceObject($this, $amazonOrderReferenceId, $this->getLogger());",- +AmazonPaymentGroupConfig,amazonReferenceIdManagerFactory,"* extract data from oder to be used by text generated via template. + * + * @param \TdbShopOrder $order + * + * @return array","switch ($sourceType) { + case self::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_SHOP_ORDER_ID: + return AmazonReferenceIdManager::createFromShopOrderId($dbal, $sourceId); + break; + case self::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_AMAZON_ORDER_REFERENCE_ID: + return AmazonReferenceIdManager::createFromOrderReferenceId($dbal, $sourceId); + break; + case self::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID: + return AmazonReferenceIdManager::createFromLocalId($dbal, $sourceId); + break; + default: + throw new \InvalidArgumentException('sourceType must be one of AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_*');",- +AmazonPaymentGroupConfig,setLogger,"* @param $templateString + * @param array $data + * + * @return string",$this->logger = $logger;,- +AmazonPaymentGroupConfig,getEnvironment,"* @param string $amazonOrderReferenceId + * + * @return AmazonOrderReferenceObject",return $this->config->getEnvironment();,- +AmazonPaymentGroupConfig,isCaptureOnShipment,"* @param Connection $dbal + * @param int $sourceType one of self::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_* + * @param string $sourceId + * + * @return AmazonReferenceIdManager|null + * + * @throws \InvalidArgumentException",return $this->config->isCaptureOnShipment();,- +AmazonPaymentGroupConfig,setCaptureOnShipment,* @return LoggerInterface,$this->config->setCaptureOnShipment($captureOnShipment);,- +AmazonPaymentGroupConfig,getAllValues,* @param LoggerInterface $logger,return $this->config->getAllValues();,- +AmazonShopActionPlugin,setAmazonOrderReferenceId,* @return \ICmsCoreRedirect,"$amazonOrderReferenceId = isset($requestParameter['amazonOrderReferenceId']) ? $requestParameter['amazonOrderReferenceId'] : null; + if (null === $amazonOrderReferenceId) { + return;",- +AmazonShopActionPlugin,errorAmazonLogin,* @return SystemPageServiceInterface,"$error = isset($requestParameter['error']) ? $requestParameter['error'] : null; + $errorCode = isset($requestParameter['errorCode']) ? $requestParameter['errorCode'] : null; + $this->handleError($error, $errorCode);",- +ConfigProvider,__construct,"* ConfigProvider adds configuration data that was given through its constructor argument. + * It is designed to provide Symfony configuration values, and so does not take care of any portal + * specifics.","$this->configValues = array(); + foreach ($configList as $environment => $environmentConfig) { + foreach ($environmentConfig as $name => $value) { + $this->configValues[] = new ShopPaymentConfigRawValue( + $name, + $value, + $environment, + '', + ShopPaymentConfigRawValue::SOURCE_ADDITIONAL + );",- +ConfigProvider,getAdditionalConfiguration,* {@inheritdoc},return $this->configValues;,- +ConfigValidator,validate,"* @param \IPkgShopOrderPaymentConfig $config + * + * @throws \InvalidArgumentException","$required = array( + 'merchantId', + 'accessKey', + 'applicationName', + 'applicationVersion', + 'region', + 'payWithAmazonButtonURL', + ); + foreach ($required as $field) { + if (null === $config->getValue($field, null)) { + throw new \InvalidArgumentException(""required parameter {$field",- +ChameleonSystemAmazonPaymentExtension,load,"* Loads a specific configuration. + * + * @param array $config An array of configuration values + * @param ContainerBuilder $container A ContainerBuilder instance + * + * @throws \InvalidArgumentException When provided tag is not defined in this extension + * + * @api","$config = $this->processConfiguration(new Configuration(), $config); + $loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); + $loader->load('services.xml'); + $serviceDefDataFetcher = $container->getDefinition('chameleon_system_amazon_payment.config_provider'); + $serviceDefDataFetcher->replaceArgument(0, $config);",- +ChameleonSystemAmazonPaymentExtension,prepend,* {@inheritdoc},"$container->prependExtensionConfig('monolog', ['channels' => ['order_payment_amazon']]);",- +AmazonAuthorizationDeclinedException,"__construct( + $reasonCode, + $aAdditionalData = array, + $message = '', + $aContextData = array, // any data you want showing up in the log message to help you debug the exception + $iLogLevel = 1, + $sLogFilePath = self::LOG_FILE + )","* @param string $reasonCode - one of self::REASON_CODE_* + * @param array $aAdditionalData + * @param string $message + * @param array $aContextData + * @param int $iLogLevel + * @param string $sLogFilePath","parent::__construct( + AmazonPayment::ERROR_AUTHORIZATION_DECLINED, + $aAdditionalData, + $message, + $aContextData, + $iLogLevel, + $sLogFilePath + ); + $this->reasonCode = $reasonCode;",- +AmazonAuthorizationDeclinedException,__toString,* @return string|null,"$sString = parent::__toString(); + $sString .= ""\n"".'reasonCode: '.$this->getReasonCode(); + + return $sString;",- +AmazonCaptureDeclinedException,"__construct( + $reasonCode, + $aAdditionalData = array, + $message = '', + $aContextData = array, // any data you want showing up in the log message to help you debug the exception + $iLogLevel = 1, + $sLogFilePath = self::LOG_FILE + )","* @param string $reasonCode - one of self::REASON_CODE_* + * @param array $aAdditionalData + * @param string $message + * @param array $aContextData + * @param int $iLogLevel + * @param string $sLogFilePath","parent::__construct( + AmazonPayment::ERROR_CAPTURE_DECLINED, + $aAdditionalData, + $message, + $aContextData, + $iLogLevel, + $sLogFilePath + ); + $this->reasonCode = $reasonCode;",- +AmazonCaptureDeclinedException,__toString,* @return string|null,"$sString = parent::__toString(); + $sString .= ""\n"".'reasonCode: '.$this->getReasonCode(); + + return $sString;",- +AmazonConstraintException,getOrderReferenceDetails,* @var \OffAmazonPaymentsService_Model_OrderReferenceDetails,return $this->orderReferenceDetails;,- +AmazonConstraintException,setOrderReferenceDetails,* @return \OffAmazonPaymentsService_Model_OrderReferenceDetails,$this->orderReferenceDetails = $orderReferenceDetails;,- +AmazonIPNTransactionException,"__construct( + $errorCode, + $message = '', + $aContextData = array, // any data you want showing up in the log message to help you debug the exception + $iLogLevel = Logger::ERROR, + $sLogFilePath = self::LOG_FILE + )",* @return string|null,"parent::__construct($message, $aContextData, $iLogLevel, $sLogFilePath); + $this->errorCode = $errorCode;",- +AmazonRefundAmazonAPIException,"__construct( + $successfulTransactionList, + $aAdditionalData = array, + $message = '', + $aContextData = array, // any data you want showing up in the log message to help you debug the exception + $iLogLevel = 1, + $sLogFilePath = self::LOG_FILE + )","* @param string $successfulTransactionList + * @param array $aAdditionalData + * @param string $message + * @param array $aContextData + * @param int $iLogLevel + * @param string $sLogFilePath","parent::__construct( + AmazonPayment::ERROR_CODE_API_ERROR, + $aAdditionalData, + $message, + $aContextData, + $iLogLevel, + $sLogFilePath + ); + $this->successfulTransactionList = $successfulTransactionList;",- +AmazonRefundAmazonAPIException,__toString,"* array of \TdbPkgShopPaymentTransaction that where successful before the one that was declined. + * + * @return array","$sString = parent::__toString(); + $sString .= ""\n"".'with '.count( + $this->getSuccessfulTransactionList() + ).' successful transactions before the refund request that was declined'; + + return $sString;",- +AmazonRefundDeclinedException,"__construct( + $reasonCode, + $aAdditionalData = array, + $message = '', + $aContextData = array, // any data you want showing up in the log message to help you debug the exception + $iLogLevel = 1, + $sLogFilePath = self::LOG_FILE + )","* @param string $reasonCode - one of self::REASON_CODE_* + * @param array $aAdditionalData + * @param string $message + * @param array $aContextData + * @param int $iLogLevel + * @param string $sLogFilePath","parent::__construct( + AmazonPayment::ERROR_REFUND_DECLINED, + $aAdditionalData, + $message, + $aContextData, + $iLogLevel, + $sLogFilePath + ); + $this->reasonCode = $reasonCode;",- +AmazonRefundDeclinedException,__toString,* @return string|null,"$sString = parent::__toString(); + $sString .= ""\n"".'reasonCode: '.$this->getReasonCode(); + $sString .= ""\n"".'with '.count( + $this->getSuccessfulTransactionList() + ).' successful transactions before the refund request that was declined'; + + return $sString;",- +AmazonRefundDeclinedException,getReasonCode,"* array of \TdbPkgShopPaymentTransaction that where successful before the one that was declined. + * + * @return array",return $this->reasonCode;,- +AmazonRefundDeclinedException,getSuccessfulTransactionList,* @param array $successfulTransactionList,return $this->successfulTransactionList;,- +AmazonIPNHandler,handleIPN,"* process the IPN request - the request object contains all details (payment handler, group, order etc) + * the call should return true if processing should continue, false if it is to stop. On Error it should throw an error + * extending AbstractPkgShopPaymentIPNHandlerException. + * + * @param TPkgShopPaymentIPNRequest $oRequest + * @trows AbstractPkgShopPaymentIPNHandlerException + * + * @return bool","// need to answer with OK + $this->sentOKHeader(); + + $aRequestData = $oRequest->getRequestPayload(); + /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Notification */ + $amazonNotificationObject = $aRequestData['amazonNotificationObject']; + $amazonReferenceIdManager = $aRequestData['amazonReferenceIdManager']; + + switch ($amazonNotificationObject->getNotificationType()) { + case 'OrderReferenceNotification': + /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_OrderReferenceNotification */ + $details = $amazonNotificationObject->getOrderReference(); + $this->handleIPNOrderReferenceNotification($oRequest, $details); + + break; + case 'AuthorizationNotification': + /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_AuthorizationNotification */ + $details = $amazonNotificationObject->getAuthorizationDetails(); + $this->handleIPNAuthorizationNotification($oRequest, $details, $amazonReferenceIdManager); + break; + case 'CaptureNotification': + /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_CaptureNotification */ + $details = $amazonNotificationObject->getCaptureDetails(); + $this->handleIPNCaptureNotification($oRequest, $details); + break; + case 'RefundNotification': + /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_RefundNotification */ + $details = $amazonNotificationObject->getRefundDetails(); + $this->handleIPNRefundNotification($oRequest, $details); + break;",- +AmazonIPNHandler,getIPNTransactionDetails,@var $amazonNotificationObject \OffAmazonPaymentsNotifications_Notification,return null;,- +AmazonIPNHandler,setAmazonConfig,@var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,$this->amazonConfig = $amazonConfig;,- +AmazonIPNHandler,setTransactionManager,@var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_AuthorizationNotification,$this->transactionManager = $transactionManager;,- +AmazonPaymentIPNInvalidException,getResponseHeader,"* the header to return to the caller. + * + * @return string",return 'HTTP/1.1 503 Service Unavailable';,- +for,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","if (!is_null($data)) { + if ($this->_isAssociativeArray($data)) { + $this->_fromAssociativeArray($data);",- +for,__get,* OffAmazonPayments_Model - base class for all model classes,"$getter = ""get$propertyName""; + return $this->$getter();",- +for,__set,"* Defined fields for the model + * object + * + * @var array","$setter = ""set$propertyName""; + $this->$setter($propertyValue); + return $this;",- +OffAmazonPaymentsNotifications_Client,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_snsMessageValidator + = new SnsMessageValidator(new OpenSslVerifySignature());",- +OffAmazonPaymentsNotifications_Client,parseRawMessage,"* Implementation of the OffAmazonPaymentsNotifications + * library + *","// Is this json, is this + // an sns message, do we have the fields we require + $snsMessage = SnsMessageParser::parseNotification($headers, $body); + + // security validation - check that this message is + // from amazon and that it has been signed correctly + $this->_snsMessageValidator->validateMessage($snsMessage); + + // Convert to object - convert from basic class to object + $ipnMessage = IpnNotificationParser::parseSnsMessage($snsMessage); + return XmlNotificationParser::parseIpnMessage($ipnMessage);",- +Message,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_message = json_decode($json, true); + + $json_error = json_last_error(); + + if ($json_error != 0) { + $errorMsg = ""Error with message - content is not in json format"" . + self::_getErrorMessageForJsonError($json_error) . "" "" . + $json; + throw new OffAmazonPaymentsNotifications_InvalidMessageException( + $errorMsg + );",- +Message,setNotificationMetadata,"* Class to wrap a message + *",$this->_notificationMetadata = $notificationMetadata;,- +Message,getNotificationMetadata,"* Json message as associative array + * + * @var array",return $this->_notificationMetadata;,- +Message,getMandatoryField,"* Metadata for the request + * + * @var NotificationMetadata","$value = $this->getField($fieldName); + if (is_null($value)) { + throw new OffAmazonPaymentsNotifications_InvalidMessageException( + ""Error with json message - mandatory field "" . $fieldName . + "" cannot be found"" + );",- +Message,getField,"* Create a new instance of the message and + * wraps the contents in a class + * + * Throws an exception if the message is not valid + * as defined by the implementation of this class + * + * @param string $json json string + * + * @throws OffAmazonPaymentsNotifications_InvalidMessageException + * + * @return new instance of concreate class","if (array_key_exists($fieldName, $this->_message)) { + return $this->_message[$fieldName];",- +OpenSslVerifySignature,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License . + * *****************************************************************************",,- +OpenSslVerifySignature,verifySignatureIsCorrect,"* OpenSSL Implemntation of the verify signature algorithm + *","$cert = $this->_getCertificateFromCertifcatePath($certificatePath); + + $certKey = openssl_get_publickey($cert); + + if ($certKey === False) { + throw new OffAmazonPaymentsNotifications_InvalidMessageException( + ""Unable to extract public key from cert "" . $cert);",- +SnsMessageValidator,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************",$this->_verifySignature = $verifySignature;,- +SnsMessageValidator,validateMessage,"* Performs validation of the sns message to + * make sure signatures match and is signed by + * Amazon + *","switch($snsMessage->getMandatoryField(""SignatureVersion"")) { + case ""1"": + $this->_verifySignatureWithVersionOneAlgorithm($snsMessage); + break; + default: + throw new OffAmazonPaymentsNotifications_InvalidMessageException( + ""Error with signature verification - "" . + ""unable to handle signature version "" . + $snsMessage->getMandatoryField(""SignatureVersion"") + );",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'AmazonAuthorizationId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'AuthorizationReferenceId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'AuthorizationAmount' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' + ), + 'CapturedAmount' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' + ), + 'AuthorizationFee' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' + ), + 'IdList' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_IdList' + ), + 'CreationTimestamp' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'ExpirationTimestamp' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'AuthorizationStatus' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status' + ), + 'OrderItemCategories' => array( + 'FieldValue' => null, + 'FieldType' + => 'OffAmazonPaymentsNotifications_Model_OrderItemCategories' + ), + 'CaptureNow' => array( + 'FieldValue' => null, + 'FieldType' => 'bool' + ), + 'SoftDescriptor' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,getAmazonAuthorizationId,"* OffAmazonPaymentsNotifications_Model_AuthorizationDetails + * + * Properties: + * ",return $this->fields['AmazonAuthorizationId']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,setAmazonAuthorizationId,"* Construct new OffAmazonPaymentsNotifications_Model_AuthorizationDetails + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->fields['AmazonAuthorizationId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,withAmazonAuthorizationId,"* Gets the value of the AmazonAuthorizationId property. + * + * @return string AmazonAuthorizationId","$this->setAmazonAuthorizationId($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,isSetAmazonAuthorizationId,"* Sets the value of the AmazonAuthorizationId property. + * + * @param string $value AmazonAuthorizationId value + * + * @return $this instance",return !is_null($this->fields['AmazonAuthorizationId']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,getAuthorizationReferenceId,"* Sets the value of the AmazonAuthorizationId and returns this instance + * + * @param string $value AmazonAuthorizationId value + * + * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance",return $this->fields['AuthorizationReferenceId']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,setAuthorizationReferenceId,"* Checks if AmazonAuthorizationId is set + * + * @return bool true if AmazonAuthorizationId is set","$this->fields['AuthorizationReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,withAuthorizationReferenceId,"* Gets the value of the AuthorizationReferenceId property. + * + * @return string AuthorizationReferenceId","$this->setAuthorizationReferenceId($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,isSetAuthorizationReferenceId,"* Sets the value of the AuthorizationReferenceId property. + * + * @param string $value AuthorizationReferenceId + * + * @return $this instance",return !is_null($this->fields['AuthorizationReferenceId']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,getAuthorizationAmount,"* Sets the value of the AuthorizationReferenceId and returns this instance + * + * @param string $value AuthorizationReferenceId + * + * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance",return $this->fields['AuthorizationAmount']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,setAuthorizationAmount,"* Checks if AuthorizationReferenceId is set + * + * @return bool true if AuthorizationReferenceId is set","$this->fields['AuthorizationAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,withAuthorizationAmount,"* Gets the value of the AuthorizationAmount. + * + * @return Price AuthorizationAmount","$this->setAuthorizationAmount($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,isSetAuthorizationAmount,"* Sets the value of the AuthorizationAmount. + * + * @param Price $value AuthorizationAmount + * + * @return void",return !is_null($this->fields['AuthorizationAmount']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,getCapturedAmount,"* Sets the value of the AuthorizationAmount and returns this instance + * + * @param Price $value AuthorizationAmount + * + * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance",return $this->fields['CapturedAmount']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,setCapturedAmount,"* Checks if AuthorizationAmount is set + * + * @return bool true if AuthorizationAmount property is set","$this->fields['CapturedAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,withCapturedAmount,"* Gets the value of the CapturedAmount. + * + * @return Price CapturedAmount","$this->setCapturedAmount($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,isSetCapturedAmount,"* Sets the value of the CapturedAmount. + * + * @param Price $value CapturedAmount + * + * @return void",return !is_null($this->fields['CapturedAmount']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,getAuthorizationFee,"* Sets the value of the CapturedAmount and returns this instance + * + * @param Price $value CapturedAmount + * + * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance",return $this->fields['AuthorizationFee']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,setAuthorizationFee,"* Checks if CapturedAmount is set + * + * @return bool true if CapturedAmount property is set","$this->fields['AuthorizationFee']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,withAuthorizationFee,"* Gets the value of the AuthorizationFee. + * + * @return Price AuthorizationFee","$this->setAuthorizationFee($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,isSetAuthorizationFee,"* Sets the value of the AuthorizationFee. + * + * @param Price $value AuthorizationFee + * + * @return void",return !is_null($this->fields['AuthorizationFee']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,getIdList,"* Sets the value of the AuthorizationFee and returns this instance + * + * @param Price $value AuthorizationFee + * + * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance",return $this->fields['IdList']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,setIdList,"* Checks if AuthorizationFee is set + * + * @return bool true if AuthorizationFee property is set","$this->fields['IdList']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,withIdList,"* Gets the value of the IdList. + * + * @return IdList IdList","$this->setIdList($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,isSetIdList,"* Sets the value of the IdList. + * + * @param IdList $value IdList + * + * @return void",return !is_null($this->fields['IdList']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,getCreationTimestamp,"* Sets the value of the IdList and returns this instance + * + * @param IdList $value IdList + * + * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance",return $this->fields['CreationTimestamp']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,setCreationTimestamp,"* Checks if IdList is set + * + * @return bool true if IdList property is set","$this->fields['CreationTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,withCreationTimestamp,"* Gets the value of the CreationTimestamp property. + * + * @return string CreationTimestamp","$this->setCreationTimestamp($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,isSetCreationTimestamp,"* Sets the value of the CreationTimestamp property. + * + * @param string $value CreationTimestamp + * + * @return $this instance",return !is_null($this->fields['CreationTimestamp']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,getExpirationTimestamp,"* Sets the value of the CreationTimestamp and returns this instance + * + * @param string $value CreationTimestamp + * + * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance",return $this->fields['ExpirationTimestamp']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,setExpirationTimestamp,"* Checks if CreationTimestamp is set + * + * @return bool true if CreationTimestamp is set","$this->fields['ExpirationTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,withExpirationTimestamp,"* Gets the value of the ExpirationTimestamp property. + * + * @return string ExpirationTimestamp","$this->setExpirationTimestamp($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,isSetExpirationTimestamp,"* Sets the value of the ExpirationTimestamp property. + * + * @param string $value ExpirationTimestamp + * + * @return $this instance",return !is_null($this->fields['ExpirationTimestamp']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,getAuthorizationStatus,"* Sets the value of the ExpirationTimestamp and returns this instance + * + * @param string $value ExpirationTimestamp + * + * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance",return $this->fields['AuthorizationStatus']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,setAuthorizationStatus,"* Checks if ExpirationTimestamp is set + * + * @return bool true if ExpirationTimestamp is set","$this->fields['AuthorizationStatus']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,withAuthorizationStatus,"* Gets the value of the AuthorizationStatus. + * + * @return OffAmazonPaymentsNotifications_Model_Status AuthorizationStatus","$this->setAuthorizationStatus($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,isSetAuthorizationStatus,"* Sets the value of the AuthorizationStatus. + * + * @param Status $value AuthorizationStatus + * + * @return void",return !is_null($this->fields['AuthorizationStatus']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,getOrderItemCategories,"* Sets the value of the AuthorizationStatus and returns this instance + * + * @param Status $value AuthorizationStatus + * + * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance",return $this->fields['OrderItemCategories']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,setOrderItemCategories,"* Checks if AuthorizationStatus is set + * + * @return bool true if AuthorizationStatus property is set","$this->fields['OrderItemCategories']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,withOrderItemCategories,"* Gets the value of the OrderItemCategories. + * + * @return OrderItemCategories OrderItemCategories","$this->setOrderItemCategories($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,isSetOrderItemCategories,"* Sets the value of the OrderItemCategories. + * + * @param OrderItemCategories $value OrderItemCategories + * + * @return void",return !is_null($this->fields['OrderItemCategories']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,getCaptureNow,"* Sets the value of the OrderItemCategories and returns this instance + * + * @param OrderItemCategories $value OrderItemCategories + * + * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance",return $this->fields['CaptureNow']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,setCaptureNow,"* Checks if OrderItemCategories is set + * + * @return bool true if OrderItemCategories property is set","$this->fields['CaptureNow']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,withCaptureNow,"* Gets the value of the CaptureNow property. + * + * @return bool CaptureNow","$this->setCaptureNow($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,isSetCaptureNow,"* Sets the value of the CaptureNow property. + * + * @param bool $value CaptureNow + * + * @return $this instance",return !is_null($this->fields['CaptureNow']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,getSoftDescriptor,"* Sets the value of the CaptureNow and returns this instance + * + * @param bool $value CaptureNow + * + * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance",return $this->fields['SoftDescriptor']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,setSoftDescriptor,"* Checks if CaptureNow is set + * + * @return bool true if CaptureNow is set","$this->fields['SoftDescriptor']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,withSoftDescriptor,"* Gets the value of the SoftDescriptor property. + * + * @return string SoftDescriptor","$this->setSoftDescriptor($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationDetails,isSetSoftDescriptor,"* Sets the value of the SoftDescriptor property. + * + * @param string $value SoftDescriptor + * + * @return $this instance",return !is_null($this->fields['SoftDescriptor']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_AuthorizationNotification,"__construct( + OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata, + $data = null + )","***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'AuthorizationDetails' => array( + 'FieldValue' => null, + 'FieldType' => + 'OffAmazonPaymentsNotifications_Model_AuthorizationDetails' + ) + ); + parent::__construct( + $notificationMetadata, + ""AuthorizationNotification"", + $data + );",- +OffAmazonPaymentsNotifications_Model_AuthorizationNotification,getAuthorizationDetails,"* OffAmazonPaymentsNotifications_Model_AuthorizationNotification + * + * Properties: + * ",return $this->fields['AuthorizationDetails']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_AuthorizationNotification,setAuthorizationDetails,"* Construct new OffAmazonPaymentsNotifications_Model_AuthorizationNotification + * + * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request + * @param mixed $data DOMElement or Associative Array + * to construct from. + * + * Valid properties: + * ","$this->fields['AuthorizationDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_AuthorizationNotification,withAuthorizationDetails,"* Construct OffAmazonPaymentsNotifications_Model_AuthorizationNotification + * from XML string + * + * @param string $xml XML string to construct from + * + * @return OffAmazonPaymentsNotifications_Model_AuthorizationNotification","$this->setAuthorizationDetails($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_AuthorizationNotification,isSetAuthorizationDetails,"* Gets the value of the AuthorizationNotification. + * + * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails property value",return !is_null($this->fields['AuthorizationDetails']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_AuthorizationNotification,toXML,"* Sets the value of the AuthorizationDetails. + * + * @param AuthorizationDetails $value new value + * + * @return void","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array( + 'AmazonBillingAgreementId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'SellerBillingAgreementAttributes' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes' + ), + 'BillingAgreementStatus' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_BillingAgreementStatus' + ), + 'CreationTimestamp' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'BillingAgreementLimits' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_BillingAgreementLimits' + ), + 'BillingAgreementConsent' => array( + 'FieldValue' => null, + 'FieldType' => 'bool' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,getAmazonBillingAgreementId,"* OffAmazonPaymentsNotifications_Model_BillingAgreement + * + * Properties: + * ",return $this->fields['AmazonBillingAgreementId']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreement,setAmazonBillingAgreementId,"* Construct new OffAmazonPaymentsNotifications_Model_BillingAgreement + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->fields['AmazonBillingAgreementId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,withAmazonBillingAgreementId,"* Gets the value of the AmazonBillingAgreementId property. + * + * @return string AmazonBillingAgreementId","$this->setAmazonBillingAgreementId($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,isSetAmazonBillingAgreementId,"* Sets the value of the AmazonBillingAgreementId property. + * + * @param string AmazonBillingAgreementId + * @return $this instance",return ! is_null($this->fields['AmazonBillingAgreementId']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreement,getBillingAgreementLimits,"* Sets the value of the AmazonBillingAgreementId and returns this instance + * + * @param string $value AmazonBillingAgreementId + * @return OffAmazonPaymentsNotifications_Model_BillingAgreementDetails instance",return $this->fields['BillingAgreementLimits']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreement,setBillingAgreementLimits,"* Checks if AmazonBillingAgreementId is set + * + * @return bool true if AmazonBillingAgreementId is set","$this->fields['BillingAgreementLimits']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,withBillingAgreementLimits,"* Gets the value of the BillingAgreementLimits. + * + * @return OffAmazonPaymentsNotifications_Model_BillingAgreementLimits BillingAgreementLimits","$this->setBillingAgreementLimits($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,isSetBillingAgreementLimits,"* Sets the value of the BillingAgreementLimits. + * + * @param OffAmazonPaymentsNotifications_Model_BillingAgreementLimits BillingAgreementLimits + * @return void",return ! is_null($this->fields['BillingAgreementLimits']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreement,getSellerBillingAgreementAttributes,"* Sets the value of the BillingAgreementLimits and returns this instance + * + * @param OffAmazonPaymentsNotifications_Model_BillingAgreementLimits $value BillingAgreementLimits + * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance",return $this->fields['SellerBillingAgreementAttributes']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreement,setSellerBillingAgreementAttributes,"* Checks if BillingAgreementLimits is set + * + * @return bool true if BillingAgreementLimits property is set","$this->fields['SellerBillingAgreementAttributes']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,withSellerBillingAgreementAttributes,"* Gets the value of the SellerBillingAgreementAttributes. + * + * @return OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes SellerBillingAgreementAttributes","$this->setSellerBillingAgreementAttributes($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,isSetSellerBillingAgreementAttributes,"* Sets the value of the SellerBillingAgreementAttributes. + * + * @param OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes SellerBillingAgreementAttributes + * @return void",return ! is_null($this->fields['SellerBillingAgreementAttributes']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreement,getBillingAgreementStatus,"* Sets the value of the SellerBillingAgreementAttributes and returns this instance + * + * @param OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes $value SellerBillingAgreementAttributes + * @return OffAmazonPaymentsNotifications_Model_BillingAgreementDetails instance",return $this->fields['BillingAgreementStatus']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreement,setBillingAgreementStatus,"* Checks if SellerBillingAgreementAttributes is set + * + * @return bool true if SellerBillingAgreementAttributes property is set","$this->fields['BillingAgreementStatus']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,withBillingAgreementStatus,"* Gets the value of the BillingAgreementStatus. + * + * @return OffAmazonPaymentsNotifications_Model_BillingAgreementStatus BillingAgreementStatus","$this->setBillingAgreementStatus($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,isSetBillingAgreementStatus,"* Sets the value of the BillingAgreementStatus. + * + * @param OffAmazonPaymentsNotifications_Model_BillingAgreementStatus BillingAgreementStatus + * @return void",return ! is_null($this->fields['BillingAgreementStatus']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreement,getCreationTimestamp,"* Sets the value of the BillingAgreementStatus and returns this instance + * + * @param OffAmazonPaymentsNotifications_Model_BillingAgreementStatus $value BillingAgreementStatus + * @return OffAmazonPaymentsNotifications_Model_BillingAgreementDetails instance",return $this->fields['CreationTimestamp']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreement,setCreationTimestamp,"* Checks if BillingAgreementStatus is set + * + * @return bool true if BillingAgreementStatus property is set","$this->fields['CreationTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,withCreationTimestamp,"* Gets the value of the CreationTimestamp property. + * + * @return string CreationTimestamp","$this->setCreationTimestamp($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,isSetCreationTimestamp,"* Sets the value of the CreationTimestamp property. + * + * @param string CreationTimestamp + * @return $this instance",return ! is_null($this->fields['CreationTimestamp']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreement,getBillingAgreementConsent,"* Sets the value of the CreationTimestamp and returns this instance + * + * @param string $value CreationTimestamp + * @return OffAmazonPaymentsNotifications_Model_BillingAgreementDetails instance",return $this->fields['BillingAgreementConsent']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreement,setBillingAgreementConsent,"* Checks if CreationTimestamp is set + * + * @return bool true if CreationTimestamp is set","$this->fields['BillingAgreementConsent']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,withBillingAgreementConsent,"* Gets the value of the BillingAgreementConsent property. + * + * @return bool BillingAgreementConsent","$this->setBillingAgreementConsent($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreement,isSetBillingAgreementConsent,"* Sets the value of the BillingAgreementConsent property. + * + * @param bool BillingAgreementConsent + * @return $this instance",return ! is_null($this->fields['BillingAgreementConsent']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array( + + 'AmountLimitPerTimePeriod' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' + ), + + 'TimePeriodStartDate' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + + 'TimePeriodEndDate' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + + 'CurrentRemainingBalance' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,getAmountLimitPerTimePeriod,"* OffAmazonPaymentsNotifications_Model_BillingAgreementLimits + * + * Properties: + * ",return $this->fields['AmountLimitPerTimePeriod']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,setAmountLimitPerTimePeriod,"* Construct new OffAmazonPaymentsNotifications_Model_BillingAgreementLimits + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->fields['AmountLimitPerTimePeriod']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,withAmountLimitPerTimePeriod,"* Gets the value of the AmountLimitPerTimePeriod. + * + * @return OffAmazonPaymentsNotifications_Model_Price AmountLimitPerTimePeriod","$this->setAmountLimitPerTimePeriod($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,isSetAmountLimitPerTimePeriod,"* Sets the value of the AmountLimitPerTimePeriod. + * + * @param OffAmazonPaymentsNotifications_Model_Price AmountLimitPerTimePeriod + * @return void",return ! is_null($this->fields['AmountLimitPerTimePeriod']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,getTimePeriodStartDate,"* Sets the value of the AmountLimitPerTimePeriod and returns this instance + * + * @param OffAmazonPaymentsNotifications_Model_Price $value AmountLimitPerTimePeriod + * @return OffAmazonPaymentsNotifications_Model_BillingAgreementLimits instance",return $this->fields['TimePeriodStartDate']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,setTimePeriodStartDate,"* Checks if AmountLimitPerTimePeriod is set + * + * @return bool true if AmountLimitPerTimePeriod property is set","$this->fields['TimePeriodStartDate']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,withTimePeriodStartDate,"* Gets the value of the TimePeriodStartDate property. + * + * @return string TimePeriodStartDate","$this->setTimePeriodStartDate($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,isSetTimePeriodStartDate,"* Sets the value of the TimePeriodStartDate property. + * + * @param string TimePeriodStartDate + * @return $this instance",return ! is_null($this->fields['TimePeriodStartDate']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,getTimePeriodEndDate,"* Sets the value of the TimePeriodStartDate and returns this instance + * + * @param string $value TimePeriodStartDate + * @return OffAmazonPaymentsNotifications_Model_BillingAgreementLimits instance",return $this->fields['TimePeriodEndDate']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,setTimePeriodEndDate,"* Checks if TimePeriodStartDate is set + * + * @return bool true if TimePeriodStartDate is set","$this->fields['TimePeriodEndDate']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,withTimePeriodEndDate,"* Gets the value of the TimePeriodEndDate property. + * + * @return string TimePeriodEndDate","$this->setTimePeriodEndDate($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,isSetTimePeriodEndDate,"* Sets the value of the TimePeriodEndDate property. + * + * @param string TimePeriodEndDate + * @return $this instance",return ! is_null($this->fields['TimePeriodEndDate']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,getCurrentRemainingBalance,"* Sets the value of the TimePeriodEndDate and returns this instance + * + * @param string $value TimePeriodEndDate + * @return OffAmazonPaymentsNotifications_Model_BillingAgreementLimits instance",return $this->fields['CurrentRemainingBalance']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,setCurrentRemainingBalance,"* Checks if TimePeriodEndDate is set + * + * @return bool true if TimePeriodEndDate is set","$this->fields['CurrentRemainingBalance']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,withCurrentRemainingBalance,"* Gets the value of the CurrentRemainingBalance. + * + * @return OffAmazonPaymentsNotifications_Model_Price CurrentRemainingBalance","$this->setCurrentRemainingBalance($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,isSetCurrentRemainingBalance,"* Sets the value of the CurrentRemainingBalance. + * + * @param OffAmazonPaymentsNotifications_Model_Price CurrentRemainingBalance + * @return void",return ! is_null($this->fields['CurrentRemainingBalance']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreementNotification,"__construct ( + OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata, $data = null)","***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array( + 'BillingAgreement' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_BillingAgreement' + ) + ); + parent::__construct($notificationMetadata, ""BillingAgreementNotification"", $data);",- +OffAmazonPaymentsNotifications_Model_BillingAgreementNotification,getBillingAgreement,"* OffAmazonPaymentsNotifications_Model_BillingAgreementNotification + * + * Properties: + * ",return $this->fields['BillingAgreement']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreementNotification,setBillingAgreement,"* Construct new OffAmazonPaymentsNotifications_Model_BillingAgreementNotification + * + * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request + * @param mixed $data DOMElement or Associative Array + * to construct from. + * + * Valid properties: + * ","$this->fields['BillingAgreement']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementNotification,withBillingAgreement,"* Construct OffAmazonPaymentsNotifications_Model_BillingAgreementNotification + * from XML string + * + * @param string $xml XML string to construct from + * + * @return OffAmazonPaymentsNotifications_Model_BillingAgreementNotification","$this->setBillingAgreement($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementNotification,isSetBillingAgreement,"* Gets the value of the BillingAgreement. + * + * @return BillingAgreement property value",return ! is_null($this->fields['BillingAgreement']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreementNotification,toXML,"* Sets the value of the BillingAgreement. + * + * @param BillingAgreement $value new value + * + * @return void","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array( + 'State' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'LastUpdateTimestamp' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'ReasonCode' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'ReasonDescription' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,getState,"* OffAmazonPaymentsNotifications_Model_BillingAgreementStatus + * + * Properties: + * ",return $this->fields['State']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,setState,"* Construct new OffAmazonPaymentsNotifications_Model_BillingAgreementStatus + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->fields['State']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,withState,"* Gets the value of the State property. + * + * @return string State","$this->setState($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,isSetState,"* Sets the value of the State property. + * + * @param string State + * @return $this instance",return ! is_null($this->fields['State']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,getLastUpdateTimestamp,"* Sets the value of the State and returns this instance + * + * @param string $value State + * @return OffAmazonPaymentsNotifications_Model_BillingAgreementStatus instance",return $this->fields['LastUpdateTimestamp']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,setLastUpdateTimestamp,"* Checks if State is set + * + * @return bool true if State is set","$this->fields['LastUpdateTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,withLastUpdateTimestamp,"* Gets the value of the LastUpdateTimestamp property. + * + * @return string LastUpdateTimestamp","$this->setLastUpdateTimestamp($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,isSetLastUpdateTimestamp,"* Sets the value of the LastUpdateTimestamp property. + * + * @param string LastUpdateTimestamp + * @return $this instance",return ! is_null($this->fields['LastUpdateTimestamp']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,getReasonCode,"* Sets the value of the LastUpdateTimestamp and returns this instance + * + * @param string $value LastUpdateTimestamp + * @return OffAmazonPaymentsNotifications_Model_BillingAgreementStatus instance",return $this->fields['ReasonCode']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,setReasonCode,"* Checks if LastUpdateTimestamp is set + * + * @return bool true if LastUpdateTimestamp is set","$this->fields['ReasonCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,withReasonCode,"* Gets the value of the ReasonCode property. + * + * @return string ReasonCode","$this->setReasonCode($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,isSetReasonCode,"* Sets the value of the ReasonCode property. + * + * @param string ReasonCode + * @return $this instance",return ! is_null($this->fields['ReasonCode']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,getReasonDescription,"* Sets the value of the ReasonCode and returns this instance + * + * @param string $value ReasonCode + * @return OffAmazonPaymentsNotifications_Model_BillingAgreementStatus instance",return $this->fields['ReasonDescription']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,setReasonDescription,"* Checks if ReasonCode is set + * + * @return bool true if ReasonCode is set","$this->fields['ReasonDescription']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,withReasonDescription,"* Gets the value of the ReasonDescription property. + * + * @return string ReasonDescription","$this->setReasonDescription($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,isSetReasonDescription,"* Sets the value of the ReasonDescription property. + * + * @param string ReasonDescription + * @return $this instance",return ! is_null($this->fields['ReasonDescription']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'AmazonCaptureId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'CaptureReferenceId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'CaptureAmount' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' + ), + 'RefundedAmount' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' + ), + 'CaptureFee' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' + ), + 'IdList' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_IdList' + ), + 'CreationTimestamp' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'CaptureStatus' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status' + ), + 'SoftDescriptor' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,getAmazonCaptureId,"* OffAmazonPaymentsNotifications_Model_CaptureDetails + * + * Properties: + * ",return $this->fields['AmazonCaptureId']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,setAmazonCaptureId,"* Construct new OffAmazonPaymentsNotifications_Model_CaptureDetails + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->fields['AmazonCaptureId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,withAmazonCaptureId,"* Gets the value of the AmazonCaptureId property. + * + * @return string AmazonCaptureId","$this->setAmazonCaptureId($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,isSetAmazonCaptureId,"* Sets the value of the AmazonCaptureId property. + * + * @param string $value AmazonCaptureId + * + * @return this instance",return !is_null($this->fields['AmazonCaptureId']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,getCaptureReferenceId,"* Sets the value of the AmazonCaptureId and returns this instance + * + * @param string $value AmazonCaptureId + * + * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance",return $this->fields['CaptureReferenceId']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,setCaptureReferenceId,"* Checks if AmazonCaptureId is set + * + * @return bool true if AmazonCaptureId is set","$this->fields['CaptureReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,withCaptureReferenceId,"* Gets the value of the CaptureReferenceId property. + * + * @return string CaptureReferenceId","$this->setCaptureReferenceId($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,isSetCaptureReferenceId,"* Sets the value of the CaptureReferenceId property. + * + * @param string $value CaptureReferenceId + * + * @return this instance",return !is_null($this->fields['CaptureReferenceId']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,getCaptureAmount,"* Sets the value of the CaptureReferenceId and returns this instance + * + * @param string $value CaptureReferenceId + * + * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance",return $this->fields['CaptureAmount']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,setCaptureAmount,"* Checks if CaptureReferenceId is set + * + * @return bool true if CaptureReferenceId is set","$this->fields['CaptureAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,withCaptureAmount,"* Gets the value of the CaptureAmount. + * + * @return Price CaptureAmount","$this->setCaptureAmount($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,isSetCaptureAmount,"* Sets the value of the CaptureAmount. + * + * @param Price $value CaptureAmount + * + * @return void",return !is_null($this->fields['CaptureAmount']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,getRefundedAmount,"* Sets the value of the CaptureAmount and returns this instance + * + * @param Price $value CaptureAmount + * + * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance",return $this->fields['RefundedAmount']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,setRefundedAmount,"* Checks if CaptureAmount is set + * + * @return bool true if CaptureAmount property is set","$this->fields['RefundedAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,withRefundedAmount,"* Gets the value of the RefundedAmount. + * + * @return Price RefundedAmount","$this->setRefundedAmount($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,isSetRefundedAmount,"* Sets the value of the RefundedAmount. + * + * @param Price $value RefundedAmount + * + * @return void",return !is_null($this->fields['RefundedAmount']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,getCaptureFee,"* Sets the value of the RefundedAmount and returns this instance + * + * @param Price $value RefundedAmount + * + * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance",return $this->fields['CaptureFee']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,setCaptureFee,"* Checks if RefundedAmount is set + * + * @return bool true if RefundedAmount property is set","$this->fields['CaptureFee']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,withCaptureFee,"* Gets the value of the CaptureFee. + * + * @return Price CaptureFee","$this->setCaptureFee($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,isSetCaptureFee,"* Sets the value of the CaptureFee. + * + * @param Price $value CaptureFee + * + * @return void",return !is_null($this->fields['CaptureFee']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,getIdList,"* Sets the value of the CaptureFee and returns this instance + * + * @param Price $value CaptureFee + * + * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance",return $this->fields['IdList']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,setIdList,"* Checks if CaptureFee is set + * + * @return bool true if CaptureFee property is set","$this->fields['IdList']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,withIdList,"* Gets the value of the IdList. + * + * @return IdList IdList","$this->setIdList($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,isSetIdList,"* Sets the value of the IdList. + * + * @param IdList $value IdList + * + * @return void",return !is_null($this->fields['IdList']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,getCreationTimestamp,"* Sets the value of the IdList and returns this instance + * + * @param IdList $value IdList + * + * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance",return $this->fields['CreationTimestamp']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,setCreationTimestamp,"* Checks if IdList is set + * + * @return bool true if IdList property is set","$this->fields['CreationTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,withCreationTimestamp,"* Gets the value of the CreationTimestamp property. + * + * @return string CreationTimestamp","$this->setCreationTimestamp($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,isSetCreationTimestamp,"* Sets the value of the CreationTimestamp property. + * + * @param string $value CreationTimestamp + * + * @return this instance",return !is_null($this->fields['CreationTimestamp']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,getCaptureStatus,"* Sets the value of the CreationTimestamp and returns this instance + * + * @param string $value CreationTimestamp + * + * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance",return $this->fields['CaptureStatus']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,setCaptureStatus,"* Checks if CreationTimestamp is set + * + * @return bool true if CreationTimestamp is set","$this->fields['CaptureStatus']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,withCaptureStatus,"* Gets the value of the CaptureStatus. + * + * @return OffAmazonPaymentsNotifications_Model_Status CaptureStatus","$this->setCaptureStatus($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,isSetCaptureStatus,"* Sets the value of the CaptureStatus. + * + * @param Status $value CaptureStatus + * + * @return void",return !is_null($this->fields['CaptureStatus']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,getSoftDescriptor,"* Sets the value of the CaptureStatus and returns this instance + * + * @param Status $value CaptureStatus + * + * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance",return $this->fields['SoftDescriptor']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_CaptureDetails,setSoftDescriptor,"* Checks if CaptureStatus is set + * + * @return bool true if CaptureStatus property is set","$this->fields['SoftDescriptor']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,withSoftDescriptor,"* Gets the value of the SoftDescriptor property. + * + * @return string SoftDescriptor","$this->setSoftDescriptor($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureDetails,isSetSoftDescriptor,"* Sets the value of the SoftDescriptor property. + * + * @param string $value SoftDescriptor + * + * @return this instance",return !is_null($this->fields['SoftDescriptor']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_CaptureNotification,"__construct( + OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata, + $data = null + )","***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'CaptureDetails' => array( + 'FieldValue' => null, + 'FieldType' => + 'OffAmazonPaymentsNotifications_Model_CaptureDetails' + ) + ); + parent::__construct( + $notificationMetadata, + ""CaptureNotification"", + $data + );",- +OffAmazonPaymentsNotifications_Model_CaptureNotification,getCaptureDetails,"* OffAmazonPaymentsNotifications_Model_CaptureNotification + * + * Properties: + * ",return $this->fields['CaptureDetails']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_CaptureNotification,setCaptureDetails,"* Construct new OffAmazonPaymentsNotifications_Model_CaptureNotification + * + * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request + * @param mixed $data DOMElement or Associative Array + * to construct from. + * + * Valid properties: + * ","$this->fields['CaptureDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_CaptureNotification,withCaptureDetails,"* Construct OffAmazonPaymentsNotifications_Model_CaptureNotification + * from XML string + * + * @param string $xml XML string to construct from + * + * @return OffAmazonPaymentsNotifications_Model_CaptureNotification","$this->setCaptureDetails($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_CaptureNotification,isSetCaptureDetails,"* Gets the value of the CaptureNotification. + * + * @return OffAmazonPaymentsNotifications_Model_CaptureDetails property value",return !is_null($this->fields['CaptureDetails']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_CaptureNotification,toXML,"* Sets the value of the CaptureDetails. + * + * @param OrderReference $value new value + * + * @return void","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsNotifications_Model_IdList,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'Id' => array('FieldValue' => array(), 'FieldType' => array('string')), + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_IdList,getId,"* OffAmazonPaymentsNotifications_Model_IdList + * + * Properties: + * ",return $this->fields['Id']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_IdList,setId,"* Construct new OffAmazonPaymentsNotifications_Model_IdList + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","if (!$this->_isNumericArray($Id)) { + $Id = array ($Id);",- +OffAmazonPaymentsNotifications_Model_IdList,withId,"* Gets the value of the Id . + * + * @return array of string Id","foreach (func_get_args() as $Id) { + $this->fields['Id']['FieldValue'][] = $Id;",- +OffAmazonPaymentsNotifications_Model_IdList,isSetId,"* Sets the value of the Id. + * + * @param string|array $Id string or array of string Ids + * + * @return this instance",return count($this->fields['Id']['FieldValue']) > 0;,- +OffAmazonPaymentsNotifications_Model_IPNNotificationMetadata,"__construct( + Message $message, + OffAmazonPaymentsNotifications_NotificationMetadata $parentNotificationMetadata = null + )","***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_timestamp + = $message->getMandatoryField(""Timestamp""); + $this->_releaseEnvironment + = $message->getMandatoryField(""ReleaseEnvironment""); + $this->_notificationReferenceId + = $message->getMandatoryField(""NotificationReferenceId""); + parent::__construct($parentNotificationMetadata);",- +OffAmazonPaymentsNotifications_Model_IPNNotificationMetadata,getTimestamp,* IPN Message information,return $this->_timestamp;,- +OffAmazonPaymentsNotifications_Model_IPNNotificationMetadata,getNotificationReferenceId,"* Timestamp for when this notification was generated + * + * @var string",return $this->_notificationReferenceId;,- +OffAmazonPaymentsNotifications_Model_IPNNotificationMetadata,getReleaseEnvironment,"* Environment in which this notification was sent from + * + * @var string",return $this->_releaseEnvironment;,- +OffAmazonPaymentsNotifications_Model_IPNNotificationMetadata,getNotificationMetadataType,"* Identification for the reference id + * + * @var string",return self::SOURCE_MESSAGE_TYPE;,- +OffAmazonPaymentsNotifications_NotificationImpl,"__construct( + OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata, + $notificationType, + $data = null + )","***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_notificationMetadata = $notificationMetadata; + $this->_notificationType = $notificationType; + parent::__construct($data);",- +OffAmazonPaymentsNotifications_NotificationImpl,getNotificationType,"* NotificationsImpl class, contains common functionality for + * an implementation of the notification interface + *",return $this->_notificationType;,- +OffAmazonPaymentsNotifications_NotificationImpl,getNotificationMetadata,* Metadata about the notification request,return $this->_notificationMetadata;,- +OffAmazonPaymentsNotifications_Model_NotificationMetadataImpl,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************",$this->_parentNotificationMetadata = $parentNotificationMetadata;,- +OffAmazonPaymentsNotifications_Model_NotificationMetadataImpl,getParentNotificationMetadata,"* Common functions for classes that extend the message information + * class + *",return $this->_parentNotificationMetadata;,- +OffAmazonPaymentsNotifications_Model_NotificationMetadataImpl,hasParentNotificationMetadata,"* Parent message if applicable, null otherwise + * + * @var object",return !is_null($this->_parentNotificationMetadata);,- +OffAmazonPaymentsNotifications_Model_OrderItemCategories,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'OrderItemCategory' => + array('FieldValue' => array(), 'FieldType' => array('string')), + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_OrderItemCategories,getOrderItemCategory,"* OffAmazonPaymentsNotifications_Model_OrderItemCategories + * + * Properties: + * ",return $this->fields['OrderItemCategory']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderItemCategories,setOrderItemCategory,"* Construct new OffAmazonPaymentsNotifications_Model_OrderItemCategories + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","if (!$this->_isNumericArray($orderItemCategory)) { + $orderItemCategory = array ($orderItemCategory);",- +OffAmazonPaymentsNotifications_Model_OrderItemCategories,withOrderItemCategory,"* Gets the value of the OrderItemCategory . + * + * @return array of string OrderItemCategory","foreach (func_get_args() as $orderItemCategory) { + $this->fields['OrderItemCategory']['FieldValue'][] = $orderItemCategory;",- +OffAmazonPaymentsNotifications_Model_OrderItemCategories,isSetOrderItemCategory,"* Sets the value of the OrderItemCategory. + * + * @param string|array $orderItemCategory string or an array + * of string OrderItemCategory + * + * @return this instance",return count($this->fields['OrderItemCategory']['FieldValue']) > 0;,- +OffAmazonPaymentsNotifications_Model_OrderReference,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'AmazonOrderReferenceId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'OrderTotal' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_OrderTotal' + ), + 'SellerOrderAttributes' => array( + 'FieldValue' => null, + 'FieldType' + => 'OffAmazonPaymentsNotifications_Model_SellerOrderAttributes' + ), + 'OrderReferenceStatus' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_OrderReferenceStatus' + ), + 'CreationTimestamp' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'ExpirationTimestamp' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_OrderReference,getAmazonOrderReferenceId,"* OffAmazonPaymentsNotifications_Model_OrderReference + * + * Properties: + * ",return $this->fields['AmazonOrderReferenceId']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderReference,setAmazonOrderReferenceId,"* Construct new OffAmazonPaymentsNotifications_Model_OrderReference + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->fields['AmazonOrderReferenceId']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_OrderReference,withAmazonOrderReferenceId,"* Gets the value of the AmazonOrderReferenceId. + * + * @return string property value","$this->setAmazonOrderReferenceId($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReference,isSetAmazonOrderReferenceId,"* Sets the value of the AmazonOrderReferenceId. + * + * @param string $value new value + * + * @return void",return !is_null($this->fields['AmazonOrderReferenceId']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_OrderReference,getOrderTotal,"* Sets the value of the AmazonOrderReferenceId + * and returns this instance + * + * @param string $value AmazonOrderReferenceId + * + * @return OffAmazonPaymentsServices_Model_OrderReference instance",return $this->fields['OrderTotal']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderReference,setOrderTotal,"* Checks if AmazonOrderReferenceId is set + * + * @return bool true if AmazonOrderReferenceId property is set","$this->fields['OrderTotal']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_OrderReference,withOrderTotal,"* Gets the value of the OrderTotal. + * + * @return string property value","$this->setOrderTotal($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReference,isSetOrderTotal,"* Sets the value of the OrderTotal. + * + * @param string $value new value + * + * @return void",return !is_null($this->fields['OrderTotal']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_OrderReference,getSellerOrderAttributes,"* Sets the value of the OrderTotal + * and returns this instance + * + * @param string $value OrderTotal + * + * @return OffAmazonPaymentsServices_Model_OrderReference instance",return $this->fields['SellerOrderAttributes']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderReference,setSellerOrderAttributes,"* Checks if OrderTotal is set + * + * @return bool true if OrderTotal property is set","$this->fields['SellerOrderAttributes']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_OrderReference,withSellerOrderAttributes,"* Gets the value of the SellerOrderAttributes. + * + * @return string property value","$this->setSellerOrderAttributes($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReference,isSetSellerOrderAttributes,"* Sets the value of the SellerOrderAttributes. + * + * @param string $value new value + * + * @return void",return !is_null($this->fields['SellerOrderAttributes']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_OrderReference,getOrderReferenceStatus,"* Sets the value of the SellerOrderAttributes + * and returns this instance + * + * @param string $value SellerOrderAttributes + * + * @return OffAmazonPaymentsServices_Model_OrderReference instance",return $this->fields['OrderReferenceStatus']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderReference,setOrderReferenceStatus,"* Checks if SellerOrderAttributes is set + * + * @return bool true if SellerOrderAttributes property is set","$this->fields['OrderReferenceStatus']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_OrderReference,withOrderReferenceStatus,"* Gets the value of the OrderReferenceStatus. + * + * @return OffAmazonPaymentsNotifications_Model_OrderReferenceStatus","$this->setOrderReferenceStatus($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReference,isSetOrderReferenceStatus,"* Sets the value of the OrderReferenceStatus. + * + * @param string $value new value + * + * @return void",return !is_null($this->fields['OrderReferenceStatus']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_OrderReference,getCreationTimestamp,"* Sets the value of the OrderReferenceStatus + * and returns this instance + * + * @param string $value OrderReferenceStatus + * + * @return OffAmazonPaymentsServices_Model_OrderReference instance",return $this->fields['CreationTimestamp']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderReference,setCreationTimestamp,"* Checks if OrderReferenceStatus is set + * + * @return bool true if OrderReferenceStatus property is set","$this->fields['CreationTimestamp']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_OrderReference,withCreationTimestamp,"* Gets the value of the CreationTimestamp. + * + * @return string property value","$this->setCreationTimestamp($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReference,isSetCreationTimestamp,"* Sets the value of the CreationTimestamp. + * + * @param string $value new value + * + * @return void",return !is_null($this->fields['CreationTimestamp']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_OrderReference,getExpirationTimestamp,"* Sets the value of the CreationTimestamp + * and returns this instance + * + * @param string $value CreationTimestamp + * + * @return OffAmazonPaymentsServices_Model_OrderReference instance",return $this->fields['ExpirationTimestamp']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderReference,setExpirationTimestamp,"* Checks if CreationTimestamp is set + * + * @return bool true if CreationTimestamp property is set","$this->fields['ExpirationTimestamp']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_OrderReference,withExpirationTimestamp,"* Gets the value of the ExpirationTimestamp. + * + * @return string property value","$this->setExpirationTimestamp($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReference,isSetExpirationTimestamp,"* Sets the value of the ExpirationTimestamp. + * + * @param string $value new value + * + * @return void",return !is_null($this->fields['ExpirationTimestamp']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,"__construct( + OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata, + $data = null + )","***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'OrderReference' => array( + 'FieldValue' => null, + 'FieldType' => + 'OffAmazonPaymentsNotifications_Model_OrderReference' + ) + ); + parent::__construct( + $notificationMetadata, + ""OrderReferenceNotification"", + $data + );",- +OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,getOrderReference,"* OffAmazonPaymentsNotifications_Model_OrderReferenceNotification + * + * Properties: + * ",return $this->fields['OrderReference']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,setOrderReference,"* Construct new OffAmazonPaymentsNotifications_Model_OrderReferenceNotification + * + * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request + * @param mixed $data DOMElement or Associative Array + * to construct from. + * + * Valid properties: + * ","$this->fields['OrderReference']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,withOrderReference,"* Construct OffAmazonPaymentsNotifications_Model_OrderReferenceNotification + * from XML string + * + * @param string $xml XML string to construct from + * + * @return OffAmazonPaymentsNotifications_Model_OrderReferenceNotification","$this->setOrderReference($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,isSetOrderReference,"* Gets the value of the OrderReference. + * + * @return OffAmazonPaymentsNotifications_Model_OrderReference property value",return !is_null($this->fields['OrderReference']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,toXML,"* Sets the value of the OrderReference. + * + * @param OrderReference $value new value + * + * @return void","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'State' => array('FieldValue' => null, 'FieldType' => 'string'), + 'LastUpdateTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), + 'ReasonCode' => array('FieldValue' => null, 'FieldType' => 'string'), + 'ReasonDescription' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,getState,"* OffAmazonPaymentsNotifications_Model_OrderReferenceStatus + * + * Properties: + * ",return $this->fields['State']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,setState,"* Construct new OffAmazonPaymentsNotifications_Model_OrderReferenceStatus + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->fields['State']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,withState,"* Gets the value of the State property. + * + * @return string State","$this->setState($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,isSetState,"* Sets the value of the State property. + * + * @param string State + * @return this instance",return !is_null($this->fields['State']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,getLastUpdateTimestamp,"* Sets the value of the State and returns this instance + * + * @param string $value State + * @return OffAmazonPaymentsNotifications_Model_OrderReferenceStatus instance",return $this->fields['LastUpdateTimestamp']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,setLastUpdateTimestamp,"* Checks if State is set + * + * @return bool true if State is set","$this->fields['LastUpdateTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,withLastUpdateTimestamp,"* Gets the value of the LastUpdateTimestamp property. + * + * @return string LastUpdateTimestamp","$this->setLastUpdateTimestamp($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,isSetLastUpdateTimestamp,"* Sets the value of the LastUpdateTimestamp property. + * + * @param string LastUpdateTimestamp + * @return this instance",return !is_null($this->fields['LastUpdateTimestamp']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,getReasonCode,"* Sets the value of the LastUpdateTimestamp and returns this instance + * + * @param string $value LastUpdateTimestamp + * @return OffAmazonPaymentsNotifications_Model_OrderReferenceStatus instance",return $this->fields['ReasonCode']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,setReasonCode,"* Checks if LastUpdateTimestamp is set + * + * @return bool true if LastUpdateTimestamp is set","$this->fields['ReasonCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,withReasonCode,"* Gets the value of the ReasonCode property. + * + * @return string ReasonCode","$this->setReasonCode($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,isSetReasonCode,"* Sets the value of the ReasonCode property. + * + * @param string ReasonCode + * @return this instance",return !is_null($this->fields['ReasonCode']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,getReasonDescription,"* Sets the value of the ReasonCode and returns this instance + * + * @param string $value ReasonCode + * @return OffAmazonPaymentsNotifications_Model_OrderReferenceStatus instance",return $this->fields['ReasonDescription']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,setReasonDescription,"* Checks if ReasonCode is set + * + * @return bool true if ReasonCode is set","$this->fields['ReasonDescription']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,withReasonDescription,"* Gets the value of the ReasonDescription property. + * + * @return string ReasonDescription","$this->setReasonDescription($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,isSetReasonDescription,"* Sets the value of the ReasonDescription property. + * + * @param string ReasonDescription + * @return this instance",return !is_null($this->fields['ReasonDescription']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_OrderTotal,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'CurrencyCode' => array('FieldValue' => null, 'FieldType' => 'string'), + 'Amount' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_OrderTotal,getCurrencyCode,"* OffAmazonPaymentsNotifications_Model_OrderTotal + * + * Properties: + * ",return $this->fields['CurrencyCode']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderTotal,setCurrencyCode,"* Construct new OffAmazonPaymentsNotifications_Model_OrderTotal + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->fields['CurrencyCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderTotal,withCurrencyCode,"* Gets the value of the CurrencyCode property. + * + * @return string CurrencyCode","$this->setCurrencyCode($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderTotal,isSetCurrencyCode,"* Sets the value of the CurrencyCode property. + * + * @param string $value CurrencyCode + * + * @return this instance",return !is_null($this->fields['CurrencyCode']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_OrderTotal,getAmount,"* Sets the value of the CurrencyCode and returns this instance + * + * @param string $value CurrencyCode + * + * @return OffAmazonPaymentsNotifications_Model_OrderTotal instance",return $this->fields['Amount']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_OrderTotal,setAmount,"* Checks if CurrencyCode is set + * + * @return bool true if CurrencyCode is set","$this->fields['Amount']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderTotal,withAmount,"* Gets the value of the Amount property. + * + * @return string Amount","$this->setAmount($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_OrderTotal,isSetAmount,"* Sets the value of the Amount property. + * + * @param string $value Amount + * + * @return this instance",return !is_null($this->fields['Amount']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_Price,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'Amount' => array('FieldValue' => null, 'FieldType' => 'string'), + 'CurrencyCode' => array('FieldValue' => null, 'FieldType' => 'string') + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_Price,getAmount,"* OffAmazonPaymentsNotifications_Model_Price + * + * Properties: + * ",return $this->fields['Amount']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_Price,setAmount,"* Construct new OffAmazonPaymentsNotifications_Model_Price + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->fields['Amount']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_Price,withAmount,"* Gets the value of the Amount property. + * + * @return string Amount","$this->setAmount($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_Price,isSetAmount,"* Sets the value of the Amount property. + * + * @param string $value Amount + * + * @return this instance",return !is_null($this->fields['Amount']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_Price,getCurrencyCode,"* Sets the value of the Amount and returns this instance + * + * @param string $value Amount + * + * @return OffAmazonPaymentsNotifications_Model_Price instance",return $this->fields['CurrencyCode']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_Price,setCurrencyCode,"* Checks if Amount is set + * + * @return bool true if Amount is set","$this->fields['CurrencyCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_Price,withCurrencyCode,"* Gets the value of the CurrencyCode property. + * + * @return string CurrencyCode","$this->setCurrencyCode($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_Price,isSetCurrencyCode,"* Sets the value of the CurrencyCode property. + * + * @param string $value CurrencyCode + * + * @return this instance",return !is_null($this->fields['CurrencyCode']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_RefundDetails,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'AmazonRefundId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'RefundReferenceId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'RefundType' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'RefundAmount' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' + ), + 'FeeRefunded' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' + ), + 'CreationTimestamp' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'RefundStatus' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status' + ), + 'SoftDescriptor' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_RefundDetails,getAmazonRefundId,"* OffAmazonPaymentsNotifications_Model_RefundDetails + * + * Properties: + * ",return $this->fields['AmazonRefundId']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_RefundDetails,setAmazonRefundId,"* Construct new OffAmazonPaymentsNotifications_Model_RefundDetails + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->fields['AmazonRefundId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,withAmazonRefundId,"* Gets the value of the AmazonRefundId property. + * + * @return string AmazonRefundId","$this->setAmazonRefundId($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,isSetAmazonRefundId,"* Sets the value of the AmazonRefundId property. + * + * @param string $value AmazonRefundId + * + * @return this instance",return !is_null($this->fields['AmazonRefundId']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_RefundDetails,getRefundReferenceId,"* Sets the value of the AmazonRefundId and returns this instance + * + * @param string $value AmazonRefundId + * + * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance",return $this->fields['RefundReferenceId']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_RefundDetails,setRefundReferenceId,"* Checks if AmazonRefundId is set + * + * @return bool true if AmazonRefundId is set","$this->fields['RefundReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,withRefundReferenceId,"* Gets the value of the RefundReferenceId property. + * + * @return string RefundReferenceId","$this->setRefundReferenceId($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,isSetRefundReferenceId,"* Sets the value of the RefundReferenceId property. + * + * @param string $value RefundReferenceId + * + * @return this instance",return !is_null($this->fields['RefundReferenceId']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_RefundDetails,getRefundType,"* Sets the value of the RefundReferenceId and returns this instance + * + * @param string $value RefundReferenceId + * + * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance",return $this->fields['RefundType']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_RefundDetails,setRefundType,"* Checks if RefundReferenceId is set + * + * @return bool true if RefundReferenceId is set","$this->fields['RefundType']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,withRefundType,"* Gets the value of the RefundType property. + * + * @return string RefundType","$this->setRefundType($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,isSetRefundType,"* Sets the value of the RefundType property. + * + * @param string $value RefundType + * + * @return this instance",return !is_null($this->fields['RefundType']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_RefundDetails,getRefundAmount,"* Sets the value of the RefundType and returns this instance + * + * @param string $value RefundType + * + * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance",return $this->fields['RefundAmount']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_RefundDetails,setRefundAmount,"* Checks if RefundType is set + * + * @return bool true if RefundType is set","$this->fields['RefundAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,withRefundAmount,"* Gets the value of the RefundAmount. + * + * @return Price RefundAmount","$this->setRefundAmount($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,isSetRefundAmount,"* Sets the value of the RefundAmount. + * + * @param Price $value RefundAmount + * + * @return void",return !is_null($this->fields['RefundAmount']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_RefundDetails,getFeeRefunded,"* Sets the value of the RefundAmount and returns this instance + * + * @param Price $value RefundAmount + * + * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance",return $this->fields['FeeRefunded']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_RefundDetails,setFeeRefunded,"* Checks if RefundAmount is set + * + * @return bool true if RefundAmount property is set","$this->fields['FeeRefunded']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,withFeeRefunded,"* Gets the value of the FeeRefunded. + * + * @return Price FeeRefunded","$this->setFeeRefunded($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,isSetFeeRefunded,"* Sets the value of the FeeRefunded. + * + * @param Price $value FeeRefunded + * + * @return void",return !is_null($this->fields['FeeRefunded']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_RefundDetails,getCreationTimestamp,"* Sets the value of the FeeRefunded and returns this instance + * + * @param Price $value FeeRefunded + * + * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance",return $this->fields['CreationTimestamp']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_RefundDetails,setCreationTimestamp,"* Checks if FeeRefunded is set + * + * @return bool true if FeeRefunded property is set","$this->fields['CreationTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,withCreationTimestamp,"* Gets the value of the CreationTimestamp property. + * + * @return string CreationTimestamp","$this->setCreationTimestamp($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,isSetCreationTimestamp,"* Sets the value of the CreationTimestamp property. + * + * @param string $value CreationTimestamp + * + * @return this instance",return !is_null($this->fields['CreationTimestamp']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_RefundDetails,getRefundStatus,"* Sets the value of the CreationTimestamp and returns this instance + * + * @param string $value CreationTimestamp + * + * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance",return $this->fields['RefundStatus']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_RefundDetails,setRefundStatus,"* Checks if CreationTimestamp is set + * + * @return bool true if CreationTimestamp is set","$this->fields['RefundStatus']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,withRefundStatus,"* Gets the value of the RefundStatus. + * + * @return OffAmazonPaymentsNotifications_Model_Status RefundStatus","$this->setRefundStatus($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,isSetRefundStatus,"* Sets the value of the RefundStatus. + * + * @param Status $value RefundStatus + * + * @return void",return !is_null($this->fields['RefundStatus']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_RefundDetails,getSoftDescriptor,"* Sets the value of the RefundStatus and returns this instance + * + * @param Status $value RefundStatus + * + * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance",return $this->fields['SoftDescriptor']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_RefundDetails,setSoftDescriptor,"* Checks if RefundStatus is set + * + * @return bool true if RefundStatus property is set","$this->fields['SoftDescriptor']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,withSoftDescriptor,"* Gets the value of the SoftDescriptor property. + * + * @return string SoftDescriptor","$this->setSoftDescriptor($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundDetails,isSetSoftDescriptor,"* Sets the value of the SoftDescriptor property. + * + * @param string $value SoftDescriptor + * + * @return this instance",return !is_null($this->fields['SoftDescriptor']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_RefundNotification,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'RefundDetails' => array( + 'FieldValue' => null, + 'FieldType' => + 'OffAmazonPaymentsNotifications_Model_RefundDetails' + ) + ); + parent::__construct( + $notificationMetadata, + ""RefundNotification"", + $data + );",- +OffAmazonPaymentsNotifications_Model_RefundNotification,getRefundDetails,"* OffAmazonPaymentsNotifications_Model_RefundNotification + * + * Properties: + * ",return $this->fields['RefundDetails']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_RefundNotification,setRefundDetails,"* Construct new OffAmazonPaymentsNotifications_Model_RefundNotification + * + * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request + * @param mixed $data DOMElement or Associative Array + * to construct from. + * + * Valid properties: + * ","$this->fields['RefundDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_RefundNotification,withRefundDetails,"* Construct OffAmazonPaymentsNotifications_Model_RefundNotification + * from XML string + * + * @param string $xml XML string to construct from + * + * @return OffAmazonPaymentsNotifications_Model_RefundNotification","$this->setRefundDetails($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_RefundNotification,isSetRefundDetails,"* Gets the value of the RefundNotification. + * + * @return OffAmazonPaymentsNotifications_Model_RefundDetails property value",return !is_null($this->fields['RefundDetails']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_RefundNotification,toXML,"* Sets the value of the RefundDetails. + * + * @param OrderReference $value new value + * + * @return void","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array( + 'SellerId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'SellerBillingAgreementId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,getSellerBillingAgreementId,"* OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes + * + * Properties: + * ",return $this->fields['SellerBillingAgreementId']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,setSellerBillingAgreementId,"* Construct new OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->fields['SellerBillingAgreementId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,withSellerBillingAgreementId,"* Gets the value of the SellerBillingAgreementId property. + * + * @return string SellerBillingAgreementId","$this->setSellerBillingAgreementId($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,isSetSellerBillingAgreementId,"* Sets the value of the SellerBillingAgreementId property. + * + * @param string SellerBillingAgreementId + * @return this instance",return ! is_null($this->fields['SellerBillingAgreementId']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,getSellerId,"* Sets the value of the SellerBillingAgreementId and returns this instance + * + * @param string $value SellerBillingAgreementId + * @return OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes instance",return $this->fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,setSellerId,"* Checks if SellerBillingAgreementId is set + * + * @return bool true if SellerBillingAgreementId is set","$this->fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,withSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,isSetSellerId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return ! is_null($this->fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'SellerId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'SellerOrderId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'OrderItemCategories' => array( + 'FieldValue' => null, + 'FieldType' + => 'OffAmazonPaymentsNotifications_Model_OrderItemCategories' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,getSellerId,"* OffAmazonPaymentsNotifications_Model_SellerOrderAttributes + * + * Properties: + * ",return $this->fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,setSellerId,"* Construct new OffAmazonPaymentsNotifications_Model_SellerOrderAttributes + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->fields['SellerId']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,withSellerId,"* Gets the value of the SellerId. + * + * @return string property value","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,isSetSellerId,"* Sets the value of the SellerId. + * + * @param string $value new value + * + * @return void",return !is_null($this->fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,getSellerOrderId,"* Sets the value of the SellerId + * and returns this instance + * + * @param string $value SellerId + * + * @return OffAmazonPaymentsNotifications_Model_SellerOrderAttributes instance",return $this->fields['SellerOrderId']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,setSellerOrderId,"* Checks if SellerId is set + * + * @return bool true if SellerId property is set","$this->fields['SellerOrderId']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,withSellerOrderId,"* Gets the value of the SellerOrderId. + * + * @return string property value","$this->setSellerOrderId($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,isSetSellerOrderId,"* Sets the value of the SellerOrderId. + * + * @param string $value new value + * + * @return void",return !is_null($this->fields['SellerOrderId']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,getOrderItemCategories,"* Sets the value of the SellerOrderId + * and returns this instance + * + * @param string $value SellerOrderId + * + * @return OffAmazonPaymentsNotifications_Model_SellerOrderAttributes instance",return $this->fields['OrderItemCategories']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,setOrderItemCategories,"* Checks if SellerOrderId is set + * + * @return bool true if SellerOrderId property is set","$this->fields['OrderItemCategories']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,withOrderItemCategories,"* Gets the value of the OrderItemCategories. + * + * @return string property value","$this->setOrderItemCategories($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,isSetOrderItemCategories,"* Sets the value of the OrderItemCategories. + * + * @param string $value new value + * + * @return void",return !is_null($this->fields['OrderItemCategories']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_SnsNotificationMetadata,"__construct( + Message $message, + NotificationMetadata $parentNotificationMetadata = null + )","***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_timestamp + = $message->getMandatoryField(""Timestamp""); + $this->_topicArn + = $message->getMandatoryField(""TopicArn""); + $this->_messageId + = $message->getMandatoryField(""MessageId""); + parent::__construct($parentNotificationMetadata);",- +OffAmazonPaymentsNotifications_Model_SnsNotificationMetadata,getTimestamp,* SNS Message information,return $this->_timestamp;,- +OffAmazonPaymentsNotifications_Model_SnsNotificationMetadata,getTopicArn,"* Timestamp for when this notification was generated + * + * @var string",return $this->_topicArn;,- +OffAmazonPaymentsNotifications_Model_SnsNotificationMetadata,getMessageId,"* Topic that the notification was generated from + * + * @var string",return $this->_messageId;,- +OffAmazonPaymentsNotifications_Model_SnsNotificationMetadata,getNotificationMetadataType,"* Message id + * + * @var string",return self::SOURCE_MESSAGE_TYPE;,- +OffAmazonPaymentsNotifications_Model_Status,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->fields = array ( + 'State' => array( + 'FieldValue' => null, + 'FieldType' => 'PaymentStatus' + ), + 'LastUpdateTimestamp' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'ReasonCode' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'ReasonDescription' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsNotifications_Model_Status,getState,"* OffAmazonPaymentsNotifications_Model_Status + * + * Properties: + * ",return $this->fields['State']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_Status,setState,"* Construct new OffAmazonPaymentsNotifications_Model_Status + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->fields['State']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_Status,withState,"* Gets the value of the State property. + * + * @return PaymentStatus State","$this->setState($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_Status,isSetState,"* Sets the value of the State property. + * + * @param string $value State + * + * @return this instance",return !is_null($this->fields['State']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_Status,getLastUpdateTimestamp,"* Sets the value of the State and returns this instance + * + * @param PaymentStatus $value State + * + * @return OffAmazonPaymentsNotifications_Model_Status instance",return $this->fields['LastUpdateTimestamp']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_Status,setLastUpdateTimestamp,"* Checks if State is set + * + * @return bool true if State is set","$this->fields['LastUpdateTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_Status,withLastUpdateTimestamp,"* Gets the value of the LastUpdateTimestamp property. + * + * @return string LastUpdateTimestamp","$this->setLastUpdateTimestamp($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_Status,isSetLastUpdateTimestamp,"* Sets the value of the LastUpdateTimestamp property. + * + * @param string $value LastUpdateTimestamp + * + * @return this instance",return !is_null($this->fields['LastUpdateTimestamp']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_Status,getReasonCode,"* Sets the value of the LastUpdateTimestamp and returns this instance + * + * @param string $value LastUpdateTimestamp + * + * @return OffAmazonPaymentsNotifications_Model_Status instance",return $this->fields['ReasonCode']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_Status,setReasonCode,"* Checks if LastUpdateTimestamp is set + * + * @return bool true if LastUpdateTimestamp is set","$this->fields['ReasonCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_Status,withReasonCode,"* Gets the value of the ReasonCode property. + * + * @return string ReasonCode","$this->setReasonCode($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_Status,isSetReasonCode,"* Sets the value of the ReasonCode property. + * + * @param string $value ReasonCode + * + * @return this instance",return !is_null($this->fields['ReasonCode']['FieldValue']);,- +OffAmazonPaymentsNotifications_Model_Status,getReasonDescription,"* Sets the value of the ReasonCode and returns this instance + * + * @param string $value ReasonCode + * + * @return OffAmazonPaymentsNotifications_Model_Status instance",return $this->fields['ReasonDescription']['FieldValue'];,- +OffAmazonPaymentsNotifications_Model_Status,setReasonDescription,"* Checks if ReasonCode is set + * + * @return bool true if ReasonCode is set","$this->fields['ReasonDescription']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsNotifications_Model_Status,withReasonDescription,"* Gets the value of the ReasonDescription property. + * + * @return string ReasonDescription","$this->setReasonDescription($value); + return $this;",- +OffAmazonPaymentsNotifications_Model_Status,isSetReasonDescription,"* Sets the value of the ReasonDescription property. + * + * @param string $value ReasonDescription + * + * @return this instance",return !is_null($this->fields['ReasonDescription']['FieldValue']);,- +AddressConsentSampleResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","parent::__construct($queryString); + + $this->exampleClass = new AddressConsentSample( + new OffAmazonPaymentsService_Client(), + $this->queryStringParams['orderReferenceId'] + );",- +AddressConsentSampleResult,run,"* This script shows the difference between the the getOrderReferenceDetails call with + * and without an LwA access token for a DRAFT Order Reference object + * + * Note that this sample is currently applicable only for US customers of + * Pay with Amazon + *","echo 'Address consent result'; + $noConsentResponse = $this->_getOrderReferenceDetailsWithoutAddressConsent(); + $this->_validateOrderReferenceIsInACorrectState($noConsentResponse); + + $consentResponse = $this->_getOrderReferenceDetailsWithAddressConsent(); + + $this->_printOrderReferenceResponses($noConsentResponse, $consentResponse); + echo '';",- +OffAmazonPaymentsNotifications_Samples_AuthorizationNotificationSample,"__construct( + OffAmazonPaymentsNotifications_Model_AuthorizationNotification $notification + )","***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************",parent::__construct($notification);,- +OffAmazonPaymentsNotifications_Samples_AuthorizationNotificationSample,logNotificationContents,"* Class for handling an authorization notification and print the + * contents to the log file + *","$this->ipnLogFile->writeLine(""Authorization Notification @ "".date(""Y-m-d H:i:s"") . "" (GMT)""); + $this->ipnLogFile->writeLine(""=============================================================================""); + if ($this->notification->isSetAuthorizationDetails()) { + $this->ipnLogFile->writeLine("" AuthorizeDetails""); + $authorizationDetails = $this->notification->getAuthorizationDetails(); + if ($authorizationDetails->isSetAmazonAuthorizationId()) { + $this->ipnLogFile->writeLine("" AmazonAuthorizationId""); + $this->ipnLogFile->writeLine("" "" . $authorizationDetails->getAmazonAuthorizationId());",- +AutomaticPaymentsSimpleCheckoutResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","parent::__construct($queryString); + + $this->exampleClass = new AutomaticPaymentsSimpleCheckoutExample( + new OffAmazonPaymentsService_Client(), + $this->queryStringParams['billingAgreementId']);",- +AutomaticPaymentsSimpleCheckoutResult,run,"* This script simulates a simple checkout example for automatic payment + * and generates html for the page + *","// Calculate payment amount based on buyer selected shipping address + $paymentTotal = $this->_calculatePaymentAmountBasedOnBuyerDestinationAddress(); + + // Added custom information and seller note to the billing agreement + $this->_addSellerInformationToBillingAgreement(); + + /* + * Confirm billing agreement. The billing agreement has to be consented + * by buyer before you confirm the billing agreement. + */ + $this->_confirmBillingAgreement(); + + // Validate billing agreement (optional) + $this->_validateBillingAgreement(); + + // First payment + $amazonAuthorizationId1 = $this->_authorizePaymentAmount($paymentTotal, + $this->queryStringParams['billingAgreementId'] . ""-A01""); + $this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId1); + $this->_capturePaymentAmount($paymentTotal, $amazonAuthorizationId1); + + // Second payment with capture now + $this->_authorizePaymentAmountWithCaptureNow($paymentTotal, + $this->queryStringParams['billingAgreementId'] . ""-A02""); + + // Third payment with capture now + $this->_authorizePaymentAmountWithCaptureNow($paymentTotal, + $this->queryStringParams['billingAgreementId'] . ""-A03""); + + // Close the billing agreement when this automatic payment is no longer + // needed + $this->_closeBillingAgreement(); + + print HTML_LB . HTML_LB . ""Automatic payment simple checkout sample is complete"";",- +OffAmazonPaymentsNotifications_Samples_BillingAgreementNotificationSample,"__construct ( + OffAmazonPaymentsNotifications_Model_BillingAgreementNotification $notification)","***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************",parent::__construct($notification);,- +CancellationResult,__construct,"* ***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","parent::__construct($queryString); + + $this->exampleClass = new CancellationExample( + new OffAmazonPaymentsService_Client(), + $this->queryStringParams['orderReferenceId'], + ""100.00"", + $this->currencyCode + );",- +CancellationResult,run,"* This script simulates a simple checkout example and generates + * html for the page + *","$this->_setupOrderReference(); + $this->_confirmOrderReference(); + $amazonAuthorizationId = $this->_performAuthorization(); + $this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId); + $this->_cancelOrder(); + $this->_getOrderReferenceDetails(); + print HTML_LB.HTML_LB.""Cancellation Sample is Complete"";",- +OffAmazonPaymentsNotifications_Samples_CaptureNotificationSample,"__construct( + OffAmazonPaymentsNotifications_Model_CaptureNotification $notification + )","***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************",parent::__construct($notification);,- +OffAmazonPaymentsNotifications_Samples_IpnLogFile,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fileName = $fileName; + $this->_fileHandler = fopen(LOG_FILE_LOCATION . $this->getFileName(), 'a');",- +OffAmazonPaymentsNotifications_Samples_IpnLogFile,getFileName,"* Wrapper around a log file used to capture the ipn notifications + *",return $this->_fileName;,- +OffAmazonPaymentsNotifications_Samples_IpnLogFile,writeLine,"* Name of the log file without directory path + * + * @var string","fwrite($this->_fileHandler, $content . PHP_EOL);",- +OffAmazonPaymentsNotifications_Samples_IpnLogFile,closeFile,"* File handle + * + * @var int id",fclose($this->_fileHandler);,- +for,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","if (!isset($notification)) { + throw new InvalidArgumentException(""notification is NULL"");",- +for,logNotification,"* Abstract parent class for handling an notification and print the + * contents to the log file + *","try { + $this->logNotificationContents(); + $this->ipnLogFile->writeLine(""=============================================================================""); + $this->ipnLogFile->closeFile();",- +OffAmazonPaymentsNotifications_Samples_OrderReferenceSample,"__construct( + OffAmazonPaymentsNotifications_Model_OrderReferenceNotification $notification + )","***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************",parent::__construct($notification);,- +OffAmazonPaymentsNotifications_Samples_RefundNotificationSample,"__construct( + OffAmazonPaymentsNotifications_Model_RefundNotification $notification + )","***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************",parent::__construct($notification);,- +RefundResult,__construct,"* ***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","parent::__construct($queryString); + + $this->exampleClass = new RefundExample( + new OffAmazonPaymentsService_Client(), + $this->queryStringParams['orderReferenceId'], + $this->queryStringParams['amazonCaptureId'], + $this->queryStringParams['refundReferenceSuffix'] + );",- +RefundResult,run,"* This script simulates a simple checkout example and generates + * html for the page + *","$this->_getOrderReferenceDetails(); + $amazonRefundId = $this->_refundToBuyer( + $this->queryStringParams[""refundAmount""], + $this->currencyCode + ); + $this->_waitUntilRefundProcessingIsCompleted($amazonRefundId); + $this->_getCaptureDetails(); + print HTML_LB.HTML_LB.""Refund Sample is Complete"";",- +SimpleCheckoutResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","parent::__construct($queryString); + + $this->exampleClass = new SimpleCheckoutExample( + new OffAmazonPaymentsService_Client(), + $this->queryStringParams['orderReferenceId'] + );",- +SimpleCheckoutResult,run,"* This script simulates a simple checkout example and generates + * html for the page + *","$orderTotal = $this->_calculateOrderTotalBasedOnBuyerDestinationAddress(); + $this->_addOrderTotalAndSellerInformationToOrder($orderTotal); + $this->_confirmOrderReference(); + $amazonAuthorizationId = $this->_authorizeOrderAmount($orderTotal); + $this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId); + $this->_getAdditionalInformationForProcessedAuthorization($amazonAuthorizationId); + $this->_captureOrderAmount($orderTotal, $amazonAuthorizationId); + $this->_closeOrderReference(); + print HTML_LB.HTML_LB.""Simple Checkout Sample is Complete"";",- +SplitShipmentsCheckoutResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","parent::__construct($queryString); + + $this->exampleClass = new SplitShipmentsCheckoutExample( + new OffAmazonPaymentsService_Client(), + $this->queryStringParams['orderReferenceId'] + );",- +SplitShipmentsCheckoutResult,run,"* This script simulates a split shipments checkout example and generates + * html for the page + *","$this->_addShipmentsToOrder(); + $this->_addOrderAmountToOrderReference($this->currencyCode); + $this->_confirmOrderReference(); + $this->_performAuthAndCaptureForOrderShipments(); + $this->_closeOrderReference(); + print HTML_LB.HTML_LB.""Split Shipment Checkout Sample is Complete"";",- +for,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","parse_str($queryString, $this->queryStringParams); + $this->folderPath = LOG_FILE_LOCATION;",- +OffAmazonPaymentsService_Client,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","iconv_set_encoding('output_encoding', 'UTF-8'); + iconv_set_encoding('input_encoding', 'UTF-8'); + iconv_set_encoding('internal_encoding', 'UTF-8'); + + if ($config != null) { + $this->_checkConfigHasAllRequiredKeys($config); + $this->_merchantValues = new OffAmazonPaymentsService_MerchantValues( + $config['merchantId'], + $config['accessKey'], + $config['secretKey'], + $config['applicationName'], + $config['applicationVersion'], + $config['region'], + $config['environment'], + $config['serviceURL'], + $config['widgetURL'], + $config['caBundleFile'], + $config['clientId'] + );",- +OffAmazonPaymentsService_Client,getMerchantValues,* @see OffAmazonPaymentsService_Interface,return $this->_merchantValues;,- +OffAmazonPaymentsService_Client,capture,"* Implementation of the OffAmazonPaymentsService interface + * that implements client calls to the web service API + * + * OffAmazonPaymentsService_Client is an implementation of OffAmazonPaymentsService + *","if (!$request instanceof OffAmazonPaymentsService_Model_CaptureRequest) { + $request = new OffAmazonPaymentsService_Model_CaptureRequest($request);",- +OffAmazonPaymentsService_Client,refund,@var array,"if (!$request instanceof OffAmazonPaymentsService_Model_RefundRequest) { + + $request = new OffAmazonPaymentsService_Model_RefundRequest($request);",- +OffAmazonPaymentsService_Client,closeAuthorization,"* Construct new Client + * + * @param string $awsAccessKeyId AWS Access Key ID + * @param string $awsSecretAccessKey AWS Secret Access Key + * @param array $config configuration options. + * Valid configuration options are: + * ","if (!$request instanceof OffAmazonPaymentsService_Model_CloseAuthorizationRequest) { + $request = new OffAmazonPaymentsService_Model_CloseAuthorizationRequest($request);",- +OffAmazonPaymentsService_Client,getRefundDetails,"* Collapse multiple whitespace characters into a single ' ' character. + * @param $s + * @return string","if (!$request instanceof OffAmazonPaymentsService_Model_GetRefundDetailsRequest) { + $request = new OffAmazonPaymentsService_Model_GetRefundDetailsRequest($request);",- +OffAmazonPaymentsService_Client,getCaptureDetails,"* Collapse multiple whitespace characters into a single ' ' and backslash escape '\', + * and '/' characters from a string. + * @param $s + * @return string","if (!$request instanceof OffAmazonPaymentsService_Model_GetCaptureDetailsRequest) { + $request = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest($request);",- +OffAmazonPaymentsService_Client,closeOrderReference,"* Collapse multiple whitespace characters into a single ' ' and backslash escape '\', + * and '(' characters from a string. + * + * @param $s + * @return string","if (!$request instanceof OffAmazonPaymentsService_Model_CloseOrderReferenceRequest) { + $request = new OffAmazonPaymentsService_Model_CloseOrderReferenceRequest($request);",- +OffAmazonPaymentsService_Client,confirmOrderReference,"* Collapse multiple whitespace characters into a single ' ' and backslash escape '\', + * and '=' characters from a string. + * + * @param $s + * @return unknown_type","if (!$request instanceof OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest) { + $request = new OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest($request);",- +OffAmazonPaymentsService_Client,getOrderReferenceDetails,"* Collapse multiple whitespace characters into a single ' ' and backslash escape ';', '\', + * and ')' characters from a string. + * + * @param $s + * @return unknown_type","if (!$request instanceof OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest) { + $request = new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest($request);",- +OffAmazonPaymentsService_Client,authorize,"* Capture + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CaptureRequest request + * or OffAmazonPaymentsService_Model_CaptureRequest object itself + * @see OffAmazonPaymentsService_Model_Capture + * @return OffAmazonPaymentsService_Model_CaptureResponse OffAmazonPaymentsService_Model_CaptureResponse + * + * @throws OffAmazonPaymentsService_Exception","if (!$request instanceof OffAmazonPaymentsService_Model_AuthorizeRequest) { + $request = new OffAmazonPaymentsService_Model_AuthorizeRequest($request);",- +OffAmazonPaymentsService_Client,setOrderReferenceDetails,"* Refund + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_RefundRequest request + * or OffAmazonPaymentsService_Model_RefundRequest object itself + * @see OffAmazonPaymentsService_Model_Refund + * @return OffAmazonPaymentsService_Model_RefundResponse OffAmazonPaymentsService_Model_RefundResponse + * + * @throws OffAmazonPaymentsService_Exception","if (!$request instanceof OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest) { + $request = new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest($request);",- +OffAmazonPaymentsService_Client,getAuthorizationDetails,"* Close Authorization + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseAuthorizationRequest request + * or OffAmazonPaymentsService_Model_CloseAuthorizationRequest object itself + * @see OffAmazonPaymentsService_Model_CloseAuthorization + * @return OffAmazonPaymentsService_Model_CloseAuthorizationResponse OffAmazonPaymentsService_Model_CloseAuthorizationResponse + * + * @throws OffAmazonPaymentsService_Exception","if (!$request instanceof OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest) { + $request = new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest($request);",- +OffAmazonPaymentsService_Client,cancelOrderReference,"* Get Refund Details + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetRefundDetailsRequest request + * or OffAmazonPaymentsService_Model_GetRefundDetailsRequest object itself + * @see OffAmazonPaymentsService_Model_GetRefundDetails + * @return OffAmazonPaymentsService_Model_GetRefundDetailsResponse OffAmazonPaymentsService_Model_GetRefundDetailsResponse + * + * @throws OffAmazonPaymentsService_Exception","if (!$request instanceof OffAmazonPaymentsService_Model_CancelOrderReferenceRequest) { + $request = new OffAmazonPaymentsService_Model_CancelOrderReferenceRequest($request);",- +OffAmazonPaymentsService_Client,createOrderReferenceForId,"* Get Capture Details + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetCaptureDetailsRequest request + * or OffAmazonPaymentsService_Model_GetCaptureDetailsRequest object itself + * @see OffAmazonPaymentsService_Model_GetCaptureDetails + * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse OffAmazonPaymentsService_Model_GetCaptureDetailsResponse + * + * @throws OffAmazonPaymentsService_Exception","if (!$request instanceof OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest) { + $request = new OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest($request);",- +OffAmazonPaymentsService_Client,getBillingAgreementDetails,"* Close Order Reference + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseOrderReferenceRequest request + * or OffAmazonPaymentsService_Model_CloseOrderReferenceRequest object itself + * @see OffAmazonPaymentsService_Model_CloseOrderReference + * @return OffAmazonPaymentsService_Model_CloseOrderReferenceResponse OffAmazonPaymentsService_Model_CloseOrderReferenceResponse + * + * @throws OffAmazonPaymentsService_Exception","if (!$request instanceof OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest) { + $request = new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest($request);",- +OffAmazonPaymentsService_Client,setBillingAgreementDetails,"* Confirm Order Reference + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest request + * or OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest object itself + * @see OffAmazonPaymentsService_Model_ConfirmOrderReference + * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse + * + * @throws OffAmazonPaymentsService_Exception","if (!$request instanceof OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest) { + $request = new OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest($request);",- +OffAmazonPaymentsService_Client,confirmBillingAgreement,"* Get Order Reference Details + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest request + * or OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest object itself + * @see OffAmazonPaymentsService_Model_GetOrderReferenceDetails + * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse + * + * @throws OffAmazonPaymentsService_Exception","if (!$request instanceof OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest) { + $request = new OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest($request);",- +OffAmazonPaymentsService_Client,validateBillingAgreement,"* Authorize + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_AuthorizeRequest request + * or OffAmazonPaymentsService_Model_AuthorizeRequest object itself + * @see OffAmazonPaymentsService_Model_Authorize + * @return OffAmazonPaymentsService_Model_AuthorizeResponse OffAmazonPaymentsService_Model_AuthorizeResponse + * + * @throws OffAmazonPaymentsService_Exception","if (!$request instanceof OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest) { + $request = new OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest($request);",- +OffAmazonPaymentsService_Client,authorizeOnBillingAgreement,"* Set Order Reference Details + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest request + * or OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest object itself + * @see OffAmazonPaymentsService_Model_SetOrderReferenceDetails + * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse + * + * @throws OffAmazonPaymentsService_Exception","if (!$request instanceof OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest) { + $request = new OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest($request);",- +OffAmazonPaymentsService_Client,closeBillingAgreement,"* Get Authorization Details + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest request + * or OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest object itself + * @see OffAmazonPaymentsService_Model_GetAuthorizationDetails + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse + * + * @throws OffAmazonPaymentsService_Exception","if (!$request instanceof OffAmazonPaymentsService_Model_CloseBillingAgreementRequest) { + $request = new OffAmazonPaymentsService_Model_CloseBillingAgreementRequest($request);",- +OffAmazonPaymentsService_Exception,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_message = $errorInfo[""Message""]; + parent::__construct($this->_message); + if (array_key_exists(""Exception"", $errorInfo)) { + $exception = $errorInfo[""Exception""]; + if ($exception instanceof OffAmazonPaymentsService_Exception) { + $this->_statusCode = $exception->getStatusCode(); + $this->_errorCode = $exception->getErrorCode(); + $this->_errorType = $exception->getErrorType(); + $this->_requestId = $exception->getRequestId(); + $this->_xml= $exception->getXML(); + $this->_responseHeaderMetadata = $exception->getResponseHeaderMetadata();",- +OffAmazonPaymentsService_Exception,getErrorCode,"* Off Amazon Payments Service Exception provides details of errors + * returned by Off Amazon Payments Service service + *",return $this->_errorCode;,- +OffAmazonPaymentsService_Exception,getErrorType,@var string,return $this->_errorType;,- +OffAmazonPaymentsService_Exception,getErrorMessage,@var int,return $this->_message;,- +OffAmazonPaymentsService_Exception,getStatusCode,@var string,return $this->_statusCode;,- +OffAmazonPaymentsService_Exception,getXML,@var string,return $this->_xml;,- +OffAmazonPaymentsService_Exception,getRequestId,@var string,return $this->_requestId;,- +OffAmazonPaymentsService_Exception,getResponseHeaderMetadata,@var string,return $this->_responseHeaderMetadata;,- +,"capture; + + + + /** + * Refund + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_RefundRequest request + * or OffAmazonPaymentsService_Model_RefundRequest object itself + * @see OffAmazonPaymentsService_Model_RefundRequest + * @return OffAmazonPaymentsService_Model_RefundResponse OffAmazonPaymentsService_Model_RefundResponse + * + * @throws OffAmazonPaymentsService_Exception + */ + public function refund; + + + + /** + * Close Authorization + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseAuthorizationRequest request + * or OffAmazonPaymentsService_Model_CloseAuthorizationRequest object itself + * @see OffAmazonPaymentsService_Model_CloseAuthorizationRequest + * @return OffAmazonPaymentsService_Model_CloseAuthorizationResponse OffAmazonPaymentsService_Model_CloseAuthorizationResponse + * + * @throws OffAmazonPaymentsService_Exception + */ + public function closeAuthorization; + + + + /** + * Get Refund Details + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetRefundDetailsRequest request + * or OffAmazonPaymentsService_Model_GetRefundDetailsRequest object itself + * @see OffAmazonPaymentsService_Model_GetRefundDetailsRequest + * @return OffAmazonPaymentsService_Model_GetRefundDetailsResponse OffAmazonPaymentsService_Model_GetRefundDetailsResponse + * + * @throws OffAmazonPaymentsService_Exception + */ + public function getRefundDetails; + + + + /** + * Get Capture Details + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetCaptureDetailsRequest request + * or OffAmazonPaymentsService_Model_GetCaptureDetailsRequest object itself + * @see OffAmazonPaymentsService_Model_GetCaptureDetailsRequest + * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse OffAmazonPaymentsService_Model_GetCaptureDetailsResponse + * + * @throws OffAmazonPaymentsService_Exception + */ + public function getCaptureDetails; + + + + /** + * Close Order Reference + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseOrderReferenceRequest request + * or OffAmazonPaymentsService_Model_CloseOrderReferenceRequest object itself + * @see OffAmazonPaymentsService_Model_CloseOrderReferenceRequest + * @return OffAmazonPaymentsService_Model_CloseOrderReferenceResponse OffAmazonPaymentsService_Model_CloseOrderReferenceResponse + * + * @throws OffAmazonPaymentsService_Exception + */ + public function closeOrderReference; + + + + /** + * Confirm Order Reference + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest request + * or OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest object itself + * @see OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest + * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse + * + * @throws OffAmazonPaymentsService_Exception + */ + public function confirmOrderReference; + + + + /** + * Get Order Reference Details + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest request + * or OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest object itself + * @see OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest + * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse + * + * @throws OffAmazonPaymentsService_Exception + */ + public function getOrderReferenceDetails; + + + + /** + * Authorize + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_AuthorizeRequest request + * or OffAmazonPaymentsService_Model_AuthorizeRequest object itself + * @see OffAmazonPaymentsService_Model_AuthorizeRequest + * @return OffAmazonPaymentsService_Model_AuthorizeResponse OffAmazonPaymentsService_Model_AuthorizeResponse + * + * @throws OffAmazonPaymentsService_Exception + */ + public function authorize; + + + + /** + * Set Order Reference Details + + * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest request + * or OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest object itself + * @see OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest + * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse + * + * @throws OffAmazonPaymentsService_Exception + */ + public function setOrderReferenceDetails; + + + + /** + * Get Authorization Details + + * @see http://docs.amazonwebservices.com/$","***************************************************************************** + * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************",docPath,- +OffAmazonPaymentsService_MerchantValues,"__construct( + $merchantId, + $accessKey, + $secretKey, + $applicationName, + $applicationVersion, + $region, + $environment, + $serviceUrl, + $widgetUrl, + $caBundleFile, + $clientId + )","***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_merchantId = $merchantId; + $this->_accessKey = $accessKey; + $this->_secretKey = $secretKey; + $this->_applicationName = $applicationName; + $this->_applicationVersion = $applicationVersion; + $this->_region = strtoupper($region); + $this->_environment = strtoupper($environment); + $this->_caBundleFile = $caBundleFile; + $this->_serviceUrl = $serviceUrl; + $this->_widgetUrl = $widgetUrl; + $this->_regionSpecificProperties = new OffAmazonPaymentsService_RegionSpecificProperties(); + $this->_clientId = $clientId; + + if ($this->_merchantId == """") { + throw new InvalidArgumentException(""merchantId not set in the properties file"");",- +for,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","if (!is_null($data)) { + if ($this->_isAssociativeArray($data)) { + $this->_fromAssociativeArray($data);",- +for,__get,* OffAmazonPaymentsService_Model - base class for all model classes,"$getter = ""get$propertyName""; + return $this->$getter();",- +for,__set,@var array,"$setter = ""set$propertyName""; + $this->$setter($propertyValue); + return $this;",- +OffAmazonPaymentsService_RegionSpecificProperties,getWidgetUrlFor,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","return sprintf(self::WIDGET_FORMAT_STRING, + $this->_getWidgetHostFor($region, $overrideUrl), + $this->_getWidgetRegionFor($region), + $this->_getWidgetEnvironmentFor($environment), + urlencode($merchantId));",- +OffAmazonPaymentsService_RegionSpecificProperties,getServiceUrlFor,"* Encapsulation of properties that are tied to a region/environment pairing + * + * Provides mappings for: + * - widget url + * - mws service url + * - currency code","return sprintf(self::SERVICE_FORMAT_STRING, + $this->_getServiceHostFor($region, $overrideUrl), + $this->_getSectionNameFor($environment), + OffAmazonPaymentsService_Client::SERVICE_VERSION);",- +OffAmazonPaymentsService_RegionSpecificProperties,getCurrencyFor,"* Return the correct widget url for the javascript widget + * + * @param string $region + * @param string $environment + * @param string $merchantId + * @param string $overrideUrl + * + * @return string widgetUrl","$this->_validateRegionIsDefined($region, $this->_currencyCodes); + return $this->_currencyCodes[$region];",- +OffAmazonPaymentsService_Model_Address,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'Name' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AddressLine1' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AddressLine2' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AddressLine3' => array('FieldValue' => null, 'FieldType' => 'string'), + 'City' => array('FieldValue' => null, 'FieldType' => 'string'), + 'County' => array('FieldValue' => null, 'FieldType' => 'string'), + 'District' => array('FieldValue' => null, 'FieldType' => 'string'), + 'StateOrRegion' => array('FieldValue' => null, 'FieldType' => 'string'), + 'PostalCode' => array('FieldValue' => null, 'FieldType' => 'string'), + 'CountryCode' => array('FieldValue' => null, 'FieldType' => 'string'), + 'Phone' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_Address,getName,* @see OffAmazonPaymentsService_Model,return $this->_fields['Name']['FieldValue'];,- +OffAmazonPaymentsService_Model_Address,setName,"* OffAmazonPaymentsService_Model_Address + * + * Properties: + * ","$this->_fields['Name']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Address,withName,"* Construct new OffAmazonPaymentsService_Model_Address + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setName($value); + return $this;",- +OffAmazonPaymentsService_Model_Address,isSetName,"* Gets the value of the Name property. + * + * @return string Name",return !is_null($this->_fields['Name']['FieldValue']);,- +OffAmazonPaymentsService_Model_Address,getAddressLine1,"* Sets the value of the Name property. + * + * @param string Name + * @return this instance",return $this->_fields['AddressLine1']['FieldValue'];,- +OffAmazonPaymentsService_Model_Address,setAddressLine1,"* Sets the value of the Name and returns this instance + * + * @param string $value Name + * @return OffAmazonPaymentsService_Model_Address instance","$this->_fields['AddressLine1']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Address,withAddressLine1,"* Checks if Name is set + * + * @return bool true if Name is set","$this->setAddressLine1($value); + return $this;",- +OffAmazonPaymentsService_Model_Address,isSetAddressLine1,"* Gets the value of the AddressLine1 property. + * + * @return string AddressLine1",return !is_null($this->_fields['AddressLine1']['FieldValue']);,- +OffAmazonPaymentsService_Model_Address,getAddressLine2,"* Sets the value of the AddressLine1 property. + * + * @param string AddressLine1 + * @return this instance",return $this->_fields['AddressLine2']['FieldValue'];,- +OffAmazonPaymentsService_Model_Address,setAddressLine2,"* Sets the value of the AddressLine1 and returns this instance + * + * @param string $value AddressLine1 + * @return OffAmazonPaymentsService_Model_Address instance","$this->_fields['AddressLine2']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Address,withAddressLine2,"* Checks if AddressLine1 is set + * + * @return bool true if AddressLine1 is set","$this->setAddressLine2($value); + return $this;",- +OffAmazonPaymentsService_Model_Address,isSetAddressLine2,"* Gets the value of the AddressLine2 property. + * + * @return string AddressLine2",return !is_null($this->_fields['AddressLine2']['FieldValue']);,- +OffAmazonPaymentsService_Model_Address,getAddressLine3,"* Sets the value of the AddressLine2 property. + * + * @param string AddressLine2 + * @return this instance",return $this->_fields['AddressLine3']['FieldValue'];,- +OffAmazonPaymentsService_Model_Address,setAddressLine3,"* Sets the value of the AddressLine2 and returns this instance + * + * @param string $value AddressLine2 + * @return OffAmazonPaymentsService_Model_Address instance","$this->_fields['AddressLine3']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Address,withAddressLine3,"* Checks if AddressLine2 is set + * + * @return bool true if AddressLine2 is set","$this->setAddressLine3($value); + return $this;",- +OffAmazonPaymentsService_Model_Address,isSetAddressLine3,"* Gets the value of the AddressLine3 property. + * + * @return string AddressLine3",return !is_null($this->_fields['AddressLine3']['FieldValue']);,- +OffAmazonPaymentsService_Model_Address,getCity,"* Sets the value of the AddressLine3 property. + * + * @param string AddressLine3 + * @return this instance",return $this->_fields['City']['FieldValue'];,- +OffAmazonPaymentsService_Model_Address,setCity,"* Sets the value of the AddressLine3 and returns this instance + * + * @param string $value AddressLine3 + * @return OffAmazonPaymentsService_Model_Address instance","$this->_fields['City']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Address,withCity,"* Checks if AddressLine3 is set + * + * @return bool true if AddressLine3 is set","$this->setCity($value); + return $this;",- +OffAmazonPaymentsService_Model_Address,isSetCity,"* Gets the value of the City property. + * + * @return string City",return !is_null($this->_fields['City']['FieldValue']);,- +OffAmazonPaymentsService_Model_Address,getCounty,"* Sets the value of the City property. + * + * @param string City + * @return this instance",return $this->_fields['County']['FieldValue'];,- +OffAmazonPaymentsService_Model_Address,setCounty,"* Sets the value of the City and returns this instance + * + * @param string $value City + * @return OffAmazonPaymentsService_Model_Address instance","$this->_fields['County']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Address,withCounty,"* Checks if City is set + * + * @return bool true if City is set","$this->setCounty($value); + return $this;",- +OffAmazonPaymentsService_Model_Address,isSetCounty,"* Gets the value of the County property. + * + * @return string County",return !is_null($this->_fields['County']['FieldValue']);,- +OffAmazonPaymentsService_Model_Address,getDistrict,"* Sets the value of the County property. + * + * @param string County + * @return this instance",return $this->_fields['District']['FieldValue'];,- +OffAmazonPaymentsService_Model_Address,setDistrict,"* Sets the value of the County and returns this instance + * + * @param string $value County + * @return OffAmazonPaymentsService_Model_Address instance","$this->_fields['District']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Address,withDistrict,"* Checks if County is set + * + * @return bool true if County is set","$this->setDistrict($value); + return $this;",- +OffAmazonPaymentsService_Model_Address,isSetDistrict,"* Gets the value of the District property. + * + * @return string District",return !is_null($this->_fields['District']['FieldValue']);,- +OffAmazonPaymentsService_Model_Address,getStateOrRegion,"* Sets the value of the District property. + * + * @param string District + * @return this instance",return $this->_fields['StateOrRegion']['FieldValue'];,- +OffAmazonPaymentsService_Model_Address,setStateOrRegion,"* Sets the value of the District and returns this instance + * + * @param string $value District + * @return OffAmazonPaymentsService_Model_Address instance","$this->_fields['StateOrRegion']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Address,withStateOrRegion,"* Checks if District is set + * + * @return bool true if District is set","$this->setStateOrRegion($value); + return $this;",- +OffAmazonPaymentsService_Model_Address,isSetStateOrRegion,"* Gets the value of the StateOrRegion property. + * + * @return string StateOrRegion",return !is_null($this->_fields['StateOrRegion']['FieldValue']);,- +OffAmazonPaymentsService_Model_Address,getPostalCode,"* Sets the value of the StateOrRegion property. + * + * @param string StateOrRegion + * @return this instance",return $this->_fields['PostalCode']['FieldValue'];,- +OffAmazonPaymentsService_Model_Address,setPostalCode,"* Sets the value of the StateOrRegion and returns this instance + * + * @param string $value StateOrRegion + * @return OffAmazonPaymentsService_Model_Address instance","$this->_fields['PostalCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Address,withPostalCode,"* Checks if StateOrRegion is set + * + * @return bool true if StateOrRegion is set","$this->setPostalCode($value); + return $this;",- +OffAmazonPaymentsService_Model_Address,isSetPostalCode,"* Gets the value of the PostalCode property. + * + * @return string PostalCode",return !is_null($this->_fields['PostalCode']['FieldValue']);,- +OffAmazonPaymentsService_Model_Address,getCountryCode,"* Sets the value of the PostalCode property. + * + * @param string PostalCode + * @return this instance",return $this->_fields['CountryCode']['FieldValue'];,- +OffAmazonPaymentsService_Model_Address,setCountryCode,"* Sets the value of the PostalCode and returns this instance + * + * @param string $value PostalCode + * @return OffAmazonPaymentsService_Model_Address instance","$this->_fields['CountryCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Address,withCountryCode,"* Checks if PostalCode is set + * + * @return bool true if PostalCode is set","$this->setCountryCode($value); + return $this;",- +OffAmazonPaymentsService_Model_Address,isSetCountryCode,"* Gets the value of the CountryCode property. + * + * @return string CountryCode",return !is_null($this->_fields['CountryCode']['FieldValue']);,- +OffAmazonPaymentsService_Model_Address,getPhone,"* Sets the value of the CountryCode property. + * + * @param string CountryCode + * @return this instance",return $this->_fields['Phone']['FieldValue'];,- +OffAmazonPaymentsService_Model_Address,setPhone,"* Sets the value of the CountryCode and returns this instance + * + * @param string $value CountryCode + * @return OffAmazonPaymentsService_Model_Address instance","$this->_fields['Phone']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Address,withPhone,"* Checks if CountryCode is set + * + * @return bool true if CountryCode is set","$this->setPhone($value); + return $this;",- +OffAmazonPaymentsService_Model_Address,isSetPhone,"* Gets the value of the Phone property. + * + * @return string Phone",return !is_null($this->_fields['Phone']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'AmazonAuthorizationId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AuthorizationReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AuthorizationBillingAddress' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Address'), + 'SellerAuthorizationNote' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'AuthorizationAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), + + + 'CapturedAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), + + + 'AuthorizationFee' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), + + + 'IdList' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_IdList'), + + 'CreationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), + 'ExpirationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'AuthorizationStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Status'), + + + 'OrderItemCategories' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderItemCategories'), + + 'CaptureNow' => array('FieldValue' => null, 'FieldType' => 'bool'), + 'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_AuthorizationDetails,getAmazonAuthorizationId,* @see OffAmazonPaymentsService_Model,return $this->_fields['AmazonAuthorizationId']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setAmazonAuthorizationId,"* OffAmazonPaymentsService_Model_AuthorizationDetails + * + * Properties: + * ","$this->_fields['AmazonAuthorizationId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withAmazonAuthorizationId,"* Construct new OffAmazonPaymentsService_Model_AuthorizationDetails + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setAmazonAuthorizationId($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetAmazonAuthorizationId,"* Gets the value of the AmazonAuthorizationId property. + * + * @return string AmazonAuthorizationId",return !is_null($this->_fields['AmazonAuthorizationId']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,getAuthorizationReferenceId,"* Sets the value of the AmazonAuthorizationId property. + * + * @param string AmazonAuthorizationId + * @return this instance",return $this->_fields['AuthorizationReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setAuthorizationReferenceId,"* Sets the value of the AmazonAuthorizationId and returns this instance + * + * @param string $value AmazonAuthorizationId + * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","$this->_fields['AuthorizationReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withAuthorizationReferenceId,"* Checks if AmazonAuthorizationId is set + * + * @return bool true if AmazonAuthorizationId is set","$this->setAuthorizationReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetAuthorizationReferenceId,"* Gets the value of the AuthorizationReferenceId property. + * + * @return string AuthorizationReferenceId",return !is_null($this->_fields['AuthorizationReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,getAuthorizationBillingAddress,"* Sets the value of the AuthorizationReferenceId property. + * + * @param string AuthorizationReferenceId + * @return this instance",return $this->_fields['AuthorizationBillingAddress']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setAuthorizationBillingAddress,"* Sets the value of the AuthorizationReferenceId and returns this instance + * + * @param string $value AuthorizationReferenceId + * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","$this->_fields['AuthorizationBillingAddress']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withAuthorizationBillingAddress,"* Checks if AuthorizationReferenceId is set + * + * @return bool true if AuthorizationReferenceId is set","$this->setAuthorizationBillingAddress($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetAuthorizationBillingAddress,"* Gets the value of the AuthorizationBillingAddress property. + * + * @return string AuthorizationBillingAddress",return !is_null($this->_fields['AuthorizationBillingAddress']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,getSellerAuthorizationNote,"* Sets the value of the AuthorizationBillingAddress property. + * + * @param string AuthorizationBillingAddress + * @return this instance",return $this->_fields['SellerAuthorizationNote']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setSellerAuthorizationNote,"* Sets the value of the AuthorizationBillingAddress and returns this instance + * + * @param string $value AuthorizationBillingAddress + * @return OffAmazonPaymentsService_Model_Address instance","$this->_fields['SellerAuthorizationNote']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withSellerAuthorizationNote,"* Checks if AuthorizationBillingAddress is set + * + * @return bool true if AuthorizationBillingAddress is set","$this->setSellerAuthorizationNote($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetSellerAuthorizationNote,"* Gets the value of the SellerAuthorizationNote property. + * + * @return string SellerAuthorizationNote",return !is_null($this->_fields['SellerAuthorizationNote']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,getAuthorizationAmount,"* Sets the value of the SellerAuthorizationNote property. + * + * @param string SellerAuthorizationNote + * @return this instance",return $this->_fields['AuthorizationAmount']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setAuthorizationAmount,"* Sets the value of the SellerAuthorizationNote and returns this instance + * + * @param string $value SellerAuthorizationNote + * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","$this->_fields['AuthorizationAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withAuthorizationAmount,"* Checks if SellerAuthorizationNote is set + * + * @return bool true if SellerAuthorizationNote is set","$this->setAuthorizationAmount($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetAuthorizationAmount,"* Gets the value of the AuthorizationAmount. + * + * @return OffAmazonPaymentsService_Model_Price AuthorizationAmount",return !is_null($this->_fields['AuthorizationAmount']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,getCapturedAmount,"* Sets the value of the AuthorizationAmount. + * + * @param Price AuthorizationAmount + * @return void",return $this->_fields['CapturedAmount']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setCapturedAmount,"* Sets the value of the AuthorizationAmount and returns this instance + * + * @param Price $value AuthorizationAmount + * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","$this->_fields['CapturedAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withCapturedAmount,"* Checks if AuthorizationAmount is set + * + * @return bool true if AuthorizationAmount property is set","$this->setCapturedAmount($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetCapturedAmount,"* Gets the value of the CapturedAmount. + * + * @return Price CapturedAmount",return !is_null($this->_fields['CapturedAmount']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,getAuthorizationFee,"* Sets the value of the CapturedAmount. + * + * @param Price CapturedAmount + * @return void",return $this->_fields['AuthorizationFee']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setAuthorizationFee,"* Sets the value of the CapturedAmount and returns this instance + * + * @param Price $value CapturedAmount + * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","$this->_fields['AuthorizationFee']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withAuthorizationFee,"* Checks if CapturedAmount is set + * + * @return bool true if CapturedAmount property is set","$this->setAuthorizationFee($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetAuthorizationFee,"* Gets the value of the AuthorizationFee. + * + * @return Price AuthorizationFee",return !is_null($this->_fields['AuthorizationFee']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,getIdList,"* Sets the value of the AuthorizationFee. + * + * @param Price AuthorizationFee + * @return void",return $this->_fields['IdList']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setIdList,"* Sets the value of the AuthorizationFee and returns this instance + * + * @param Price $value AuthorizationFee + * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","$this->_fields['IdList']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withIdList,"* Checks if AuthorizationFee is set + * + * @return bool true if AuthorizationFee property is set","$this->setIdList($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetIdList,"* Gets the value of the IdList. + * + * @return OffAmazonPaymentsService_Model_IdList IdList",return !is_null($this->_fields['IdList']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,getCreationTimestamp,"* Sets the value of the IdList. + * + * @param IdList IdList + * @return void",return $this->_fields['CreationTimestamp']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setCreationTimestamp,"* Sets the value of the IdList and returns this instance + * + * @param IdList $value IdList + * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","$this->_fields['CreationTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withCreationTimestamp,"* Checks if IdList is set + * + * @return bool true if IdList property is set","$this->setCreationTimestamp($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetCreationTimestamp,"* Gets the value of the CreationTimestamp property. + * + * @return string CreationTimestamp",return !is_null($this->_fields['CreationTimestamp']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,getExpirationTimestamp,"* Sets the value of the CreationTimestamp property. + * + * @param string CreationTimestamp + * @return this instance",return $this->_fields['ExpirationTimestamp']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setExpirationTimestamp,"* Sets the value of the CreationTimestamp and returns this instance + * + * @param string $value CreationTimestamp + * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","$this->_fields['ExpirationTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withExpirationTimestamp,"* Checks if CreationTimestamp is set + * + * @return bool true if CreationTimestamp is set","$this->setExpirationTimestamp($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetExpirationTimestamp,"* Gets the value of the ExpirationTimestamp property. + * + * @return string ExpirationTimestamp",return !is_null($this->_fields['ExpirationTimestamp']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,getAuthorizationStatus,"* Sets the value of the ExpirationTimestamp property. + * + * @param string ExpirationTimestamp + * @return this instance",return $this->_fields['AuthorizationStatus']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setAuthorizationStatus,"* Sets the value of the ExpirationTimestamp and returns this instance + * + * @param string $value ExpirationTimestamp + * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","$this->_fields['AuthorizationStatus']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withAuthorizationStatus,"* Checks if ExpirationTimestamp is set + * + * @return bool true if ExpirationTimestamp is set","$this->setAuthorizationStatus($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetAuthorizationStatus,"* Gets the value of the AuthorizationStatus. + * + * @return OffAmazonPaymentsService_Model_Status AuthorizationStatus",return !is_null($this->_fields['AuthorizationStatus']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,getOrderItemCategories,"* Sets the value of the AuthorizationStatus. + * + * @param Status AuthorizationStatus + * @return void",return $this->_fields['OrderItemCategories']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setOrderItemCategories,"* Sets the value of the AuthorizationStatus and returns this instance + * + * @param Status $value AuthorizationStatus + * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","$this->_fields['OrderItemCategories']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withOrderItemCategories,"* Checks if AuthorizationStatus is set + * + * @return bool true if AuthorizationStatus property is set","$this->setOrderItemCategories($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetOrderItemCategories,"* Gets the value of the OrderItemCategories. + * + * @return OrderItemCategories OrderItemCategories",return !is_null($this->_fields['OrderItemCategories']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,getCaptureNow,"* Sets the value of the OrderItemCategories. + * + * @param OrderItemCategories OrderItemCategories + * @return void",return $this->_fields['CaptureNow']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setCaptureNow,"* Sets the value of the OrderItemCategories and returns this instance + * + * @param OrderItemCategories $value OrderItemCategories + * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","$this->_fields['CaptureNow']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withCaptureNow,"* Checks if OrderItemCategories is set + * + * @return bool true if OrderItemCategories property is set","$this->setCaptureNow($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetCaptureNow,"* Gets the value of the CaptureNow property. + * + * @return bool CaptureNow",return !is_null($this->_fields['CaptureNow']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizationDetails,getSoftDescriptor,"* Sets the value of the CaptureNow property. + * + * @param bool CaptureNow + * @return this instance",return $this->_fields['SoftDescriptor']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizationDetails,setSoftDescriptor,"* Sets the value of the CaptureNow and returns this instance + * + * @param bool $value CaptureNow + * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","$this->_fields['SoftDescriptor']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,withSoftDescriptor,"* Checks if CaptureNow is set + * + * @return bool true if CaptureNow is set","$this->setSoftDescriptor($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizationDetails,isSetSoftDescriptor,"* Gets the value of the SoftDescriptor property. + * + * @return string SoftDescriptor",return !is_null($this->_fields['SoftDescriptor']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + 'SellerId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'AmazonBillingAgreementId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'AuthorizationReferenceId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + + 'AuthorizationAmount' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_Price' + ), + + 'SellerAuthorizationNote' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'TransactionTimeout' => array( + 'FieldValue' => null, + 'FieldType' => 'int' + ), + 'CaptureNow' => array( + 'FieldValue' => null, + 'FieldType' => 'bool' + ), + 'SoftDescriptor' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'SellerNote' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'PlatformId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + + 'SellerOrderAttributes' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_SellerOrderAttributes' + ), + + 'InheritShippingAddress' => array( + 'FieldValue' => null, + 'FieldType' => 'bool' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,getSellerId,"* OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest + * + * Properties: + * ",return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,setSellerId,"* Construct new OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,withSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,isSetSellerId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return ! is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,getAmazonBillingAgreementId,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance",return $this->_fields['AmazonBillingAgreementId']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,setAmazonBillingAgreementId,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,withAmazonBillingAgreementId,"* Gets the value of the AmazonBillingAgreementId property. + * + * @return string AmazonBillingAgreementId","$this->setAmazonBillingAgreementId($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,isSetAmazonBillingAgreementId,"* Sets the value of the AmazonBillingAgreementId property. + * + * @param string AmazonBillingAgreementId + * @return this instance",return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,getAuthorizationReferenceId,"* Sets the value of the AmazonBillingAgreementId and returns this instance + * + * @param string $value AmazonBillingAgreementId + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance",return $this->_fields['AuthorizationReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,setAuthorizationReferenceId,"* Checks if AmazonBillingAgreementId is set + * + * @return bool true if AmazonBillingAgreementId is set","$this->_fields['AuthorizationReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,withAuthorizationReferenceId,"* Gets the value of the AuthorizationReferenceId property. + * + * @return string AuthorizationReferenceId","$this->setAuthorizationReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,isSetAuthorizationReferenceId,"* Sets the value of the AuthorizationReferenceId property. + * + * @param string AuthorizationReferenceId + * @return this instance",return ! is_null($this->_fields['AuthorizationReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,getAuthorizationAmount,"* Sets the value of the AuthorizationReferenceId and returns this instance + * + * @param string $value AuthorizationReferenceId + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance",return $this->_fields['AuthorizationAmount']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,setAuthorizationAmount,"* Checks if AuthorizationReferenceId is set + * + * @return bool true if AuthorizationReferenceId is set","$this->_fields['AuthorizationAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,withAuthorizationAmount,"* Gets the value of the AuthorizationAmount. + * + * @return Price AuthorizationAmount","$this->setAuthorizationAmount($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,isSetAuthorizationAmount,"* Sets the value of the AuthorizationAmount. + * + * @param Price AuthorizationAmount + * @return void",return ! is_null($this->_fields['AuthorizationAmount']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,getSellerAuthorizationNote,"* Sets the value of the AuthorizationAmount and returns this instance + * + * @param Price $value AuthorizationAmount + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance",return $this->_fields['SellerAuthorizationNote']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,setSellerAuthorizationNote,"* Checks if AuthorizationAmount is set + * + * @return bool true if AuthorizationAmount property is set","$this->_fields['SellerAuthorizationNote']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,withSellerAuthorizationNote,"* Gets the value of the SellerAuthorizationNote property. + * + * @return string SellerAuthorizationNote","$this->setSellerAuthorizationNote($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,isSetSellerAuthorizationNote,"* Sets the value of the SellerAuthorizationNote property. + * + * @param string SellerAuthorizationNote + * @return this instance",return ! is_null($this->_fields['SellerAuthorizationNote']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,getTransactionTimeout,"* Sets the value of the SellerAuthorizationNote and returns this instance + * + * @param string $value SellerAuthorizationNote + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance",return $this->_fields['TransactionTimeout']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,setTransactionTimeout,"* Checks if SellerAuthorizationNote is set + * + * @return bool true if SellerAuthorizationNote is set","$this->_fields['TransactionTimeout']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,withTransactionTimeout,"* Gets the value of the TransactionTimeout property. + * + * @return int TransactionTimeout","$this->setTransactionTimeout($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,isSetTransactionTimeout,"* Sets the value of the TransactionTimeout property. + * + * @param int TransactionTimeout + * @return this instance",return ! is_null($this->_fields['TransactionTimeout']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,getCaptureNow,"* Sets the value of the TransactionTimeout and returns this instance + * + * @param int $value TransactionTimeout + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance",return $this->_fields['CaptureNow']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,setCaptureNow,"* Checks if TransactionTimeout is set + * + * @return bool true if TransactionTimeout is set","$this->_fields['CaptureNow']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,withCaptureNow,"* Gets the value of the CaptureNow property. + * + * @return bool CaptureNow","$this->setCaptureNow($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,isSetCaptureNow,"* Sets the value of the CaptureNow property. + * + * @param bool CaptureNow + * @return this instance",return ! is_null($this->_fields['CaptureNow']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,getSoftDescriptor,"* Sets the value of the CaptureNow and returns this instance + * + * @param bool $value CaptureNow + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance",return $this->_fields['SoftDescriptor']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,setSoftDescriptor,"* Checks if CaptureNow is set + * + * @return bool true if CaptureNow is set","$this->_fields['SoftDescriptor']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,withSoftDescriptor,"* Gets the value of the SoftDescriptor property. + * + * @return string SoftDescriptor","$this->setSoftDescriptor($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,isSetSoftDescriptor,"* Sets the value of the SoftDescriptor property. + * + * @param string SoftDescriptor + * @return this instance",return ! is_null($this->_fields['SoftDescriptor']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,getSellerNote,"* Sets the value of the SoftDescriptor and returns this instance + * + * @param string $value SoftDescriptor + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance",return $this->_fields['SellerNote']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,setSellerNote,"* Checks if SoftDescriptor is set + * + * @return bool true if SoftDescriptor is set","$this->_fields['SellerNote']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,withSellerNote,"* Gets the value of the SellerNote property. + * + * @return string SellerNote","$this->setSellerNote($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,isSetSellerNote,"* Sets the value of the SellerNote property. + * + * @param string SellerNote + * @return this instance",return ! is_null($this->_fields['SellerNote']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,getPlatformId,"* Sets the value of the SellerNote and returns this instance + * + * @param string $value SellerNote + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance",return $this->_fields['PlatformId']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,setPlatformId,"* Checks if SellerNote is set + * + * @return bool true if SellerNote is set","$this->_fields['PlatformId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,withPlatformId,"* Gets the value of the PlatformId property. + * + * @return string PlatformId","$this->setPlatformId($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,isSetPlatformId,"* Sets the value of the PlatformId property. + * + * @param string PlatformId + * @return this instance",return ! is_null($this->_fields['PlatformId']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,getSellerOrderAttributes,"* Sets the value of the PlatformId and returns this instance + * + * @param string $value PlatformId + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance",return $this->_fields['SellerOrderAttributes']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,setSellerOrderAttributes,"* Checks if PlatformId is set + * + * @return bool true if PlatformId is set","$this->_fields['SellerOrderAttributes']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,withSellerOrderAttributes,"* Gets the value of the SellerOrderAttributes. + * + * @return SellerOrderAttributes SellerOrderAttributes","$this->setSellerOrderAttributes($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,isSetSellerOrderAttributes,"* Sets the value of the SellerOrderAttributes. + * + * @param SellerOrderAttributes SellerOrderAttributes + * @return void",return ! is_null($this->_fields['SellerOrderAttributes']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,getInheritShippingAddress,"* Sets the value of the SellerOrderAttributes and returns this instance + * + * @param SellerOrderAttributes $value SellerOrderAttributes + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance",return $this->_fields['InheritShippingAddress']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,setInheritShippingAddress,"* Checks if SellerOrderAttributes is set + * + * @return bool true if SellerOrderAttributes property is set","$this->_fields['InheritShippingAddress']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,withInheritShippingAddress,"* Gets the value of the InheritShippingAddress property. + * + * @return bool InheritShippingAddress","$this->setInheritShippingAddress($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,isSetInheritShippingAddress,"* Sets the value of the InheritShippingAddress property. + * + * @param bool InheritShippingAddress + * @return this instance",return ! is_null($this->_fields['InheritShippingAddress']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + + 'AuthorizeOnBillingAgreementResult' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult' + ), + + 'ResponseMetadata' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,getAuthorizeOnBillingAgreementResult,"* OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse + * + * Properties: + * ",return $this->_fields['AuthorizeOnBillingAgreementResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,setAuthorizeOnBillingAgreementResult,"* Construct new OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['AuthorizeOnBillingAgreementResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,withAuthorizeOnBillingAgreementResult,"* Construct OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse","$this->setAuthorizeOnBillingAgreementResult($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,isSetAuthorizeOnBillingAgreementResult,"* Gets the value of the AuthorizeOnBillingAgreementResult. + * + * @return AuthorizeOnBillingAgreementResult AuthorizeOnBillingAgreementResult",return ! is_null($this->_fields['AuthorizeOnBillingAgreementResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,getResponseMetadata,"* Sets the value of the AuthorizeOnBillingAgreementResult. + * + * @param AuthorizeOnBillingAgreementResult AuthorizeOnBillingAgreementResult + * @return void",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,setResponseMetadata,"* Sets the value of the AuthorizeOnBillingAgreementResult and returns this instance + * + * @param AuthorizeOnBillingAgreementResult $value AuthorizeOnBillingAgreementResult + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse instance","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,withResponseMetadata,"* Checks if AuthorizeOnBillingAgreementResult is set + * + * @return bool true if AuthorizeOnBillingAgreementResult property is set","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,isSetResponseMetadata,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata",return ! is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,toXML,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse instance",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,setResponseHeaderMetadata,"* Checks if ResponseMetadata is set + * + * @return bool true if ResponseMetadata property is set",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + + 'AuthorizationDetails' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_AuthorizationDetails' + ), + + 'AmazonOrderReferenceId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,getAuthorizationDetails,"* OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult + * + * Properties: + * ",return $this->_fields['AuthorizationDetails']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,setAuthorizationDetails,"* Construct new OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['AuthorizationDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,withAuthorizationDetails,"* Gets the value of the AuthorizationDetails. + * + * @return AuthorizationDetails AuthorizationDetails","$this->setAuthorizationDetails($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,isSetAuthorizationDetails,"* Sets the value of the AuthorizationDetails. + * + * @param AuthorizationDetails AuthorizationDetails + * @return void",return ! is_null($this->_fields['AuthorizationDetails']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,getAmazonOrderReferenceId,"* Sets the value of the AuthorizationDetails and returns this instance + * + * @param AuthorizationDetails $value AuthorizationDetails + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult instance",return $this->_fields['AmazonOrderReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,setAmazonOrderReferenceId,"* Checks if AuthorizationDetails is set + * + * @return bool true if AuthorizationDetails property is set","$this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,withAmazonOrderReferenceId,"* Gets the value of the AmazonOrderReferenceId property. + * + * @return string AmazonOrderReferenceId","$this->setAmazonOrderReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,isSetAmazonOrderReferenceId,"* Sets the value of the AmazonOrderReferenceId property. + * + * @param string AmazonOrderReferenceId + * @return this instance",return ! is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AuthorizationReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'AuthorizationAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), + + 'SellerAuthorizationNote' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'OrderItemCategories' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderItemCategories'), + + 'TransactionTimeout' => array('FieldValue' => null, 'FieldType' => 'int'), + 'CaptureNow' => array('FieldValue' => null, 'FieldType' => 'bool'), + 'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_AuthorizeRequest,getSellerId,* @see OffAmazonPaymentsService_Model,return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeRequest,setSellerId,"* OffAmazonPaymentsService_Model_AuthorizeRequest + * + * Properties: + * ","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,withSellerId,"* Construct new OffAmazonPaymentsService_Model_AuthorizeRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,isSetSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId",return !is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeRequest,getAmazonOrderReferenceId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return $this->_fields['AmazonOrderReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeRequest,setAmazonOrderReferenceId,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","$this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,withAmazonOrderReferenceId,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->setAmazonOrderReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,isSetAmazonOrderReferenceId,"* Gets the value of the AmazonOrderReferenceId property. + * + * @return string AmazonOrderReferenceId",return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeRequest,getAuthorizationReferenceId,"* Sets the value of the AmazonOrderReferenceId property. + * + * @param string AmazonOrderReferenceId + * @return this instance",return $this->_fields['AuthorizationReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeRequest,setAuthorizationReferenceId,"* Sets the value of the AmazonOrderReferenceId and returns this instance + * + * @param string $value AmazonOrderReferenceId + * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","$this->_fields['AuthorizationReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,withAuthorizationReferenceId,"* Checks if AmazonOrderReferenceId is set + * + * @return bool true if AmazonOrderReferenceId is set","$this->setAuthorizationReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,isSetAuthorizationReferenceId,"* Gets the value of the AuthorizationReferenceId property. + * + * @return string AuthorizationReferenceId",return !is_null($this->_fields['AuthorizationReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeRequest,getAuthorizationAmount,"* Sets the value of the AuthorizationReferenceId property. + * + * @param string AuthorizationReferenceId + * @return this instance",return $this->_fields['AuthorizationAmount']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeRequest,setAuthorizationAmount,"* Sets the value of the AuthorizationReferenceId and returns this instance + * + * @param string $value AuthorizationReferenceId + * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","$this->_fields['AuthorizationAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,withAuthorizationAmount,"* Checks if AuthorizationReferenceId is set + * + * @return bool true if AuthorizationReferenceId is set","$this->setAuthorizationAmount($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,isSetAuthorizationAmount,"* Gets the value of the AuthorizationAmount. + * + * @return \OffAmazonPaymentsService_Model_Price AuthorizationAmount",return !is_null($this->_fields['AuthorizationAmount']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeRequest,getSellerAuthorizationNote,"* Sets the value of the AuthorizationAmount. + * + * @param \OffAmazonPaymentsService_Model_Price AuthorizationAmount + * @return void",return $this->_fields['SellerAuthorizationNote']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeRequest,setSellerAuthorizationNote,"* Sets the value of the AuthorizationAmount and returns this instance + * + * @param \OffAmazonPaymentsService_Model_Price $value AuthorizationAmount + * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","$this->_fields['SellerAuthorizationNote']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,withSellerAuthorizationNote,"* Checks if AuthorizationAmount is set + * + * @return bool true if AuthorizationAmount property is set","$this->setSellerAuthorizationNote($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,isSetSellerAuthorizationNote,"* Gets the value of the SellerAuthorizationNote property. + * + * @return string SellerAuthorizationNote",return !is_null($this->_fields['SellerAuthorizationNote']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeRequest,getOrderItemCategories,"* Sets the value of the SellerAuthorizationNote property. + * + * @param string SellerAuthorizationNote + * @return this instance",return $this->_fields['OrderItemCategories']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeRequest,setOrderItemCategories,"* Sets the value of the SellerAuthorizationNote and returns this instance + * + * @param string $value SellerAuthorizationNote + * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","$this->_fields['OrderItemCategories']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,withOrderItemCategories,"* Checks if SellerAuthorizationNote is set + * + * @return bool true if SellerAuthorizationNote is set","$this->setOrderItemCategories($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,isSetOrderItemCategories,"* Gets the value of the OrderItemCategories. + * + * @return OrderItemCategories OrderItemCategories",return !is_null($this->_fields['OrderItemCategories']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeRequest,getTransactionTimeout,"* Sets the value of the OrderItemCategories. + * + * @param OrderItemCategories OrderItemCategories + * @return void",return $this->_fields['TransactionTimeout']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeRequest,setTransactionTimeout,"* Sets the value of the OrderItemCategories and returns this instance + * + * @param OrderItemCategories $value OrderItemCategories + * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","$this->_fields['TransactionTimeout']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,withTransactionTimeout,"* Checks if OrderItemCategories is set + * + * @return bool true if OrderItemCategories property is set","$this->setTransactionTimeout($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,isSetTransactionTimeout,"* Gets the value of the TransactionTimeout property. + * + * @return int TransactionTimeout",return !is_null($this->_fields['TransactionTimeout']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeRequest,getCaptureNow,"* Sets the value of the TransactionTimeout property. + * + * @param int TransactionTimeout + * @return this instance",return $this->_fields['CaptureNow']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeRequest,setCaptureNow,"* Sets the value of the TransactionTimeout and returns this instance + * + * @param int $value TransactionTimeout + * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","$this->_fields['CaptureNow']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,withCaptureNow,"* Checks if TransactionTimeout is set + * + * @return bool true if TransactionTimeout is set","$this->setCaptureNow($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,isSetCaptureNow,"* Gets the value of the CaptureNow property. + * + * @return bool CaptureNow",return !is_null($this->_fields['CaptureNow']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeRequest,getSoftDescriptor,"* Sets the value of the CaptureNow property. + * + * @param bool CaptureNow + * @return this instance",return $this->_fields['SoftDescriptor']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeRequest,setSoftDescriptor,"* Sets the value of the CaptureNow and returns this instance + * + * @param bool $value CaptureNow + * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","$this->_fields['SoftDescriptor']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,withSoftDescriptor,"* Checks if CaptureNow is set + * + * @return bool true if CaptureNow is set","$this->setSoftDescriptor($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeRequest,isSetSoftDescriptor,"* Gets the value of the SoftDescriptor property. + * + * @return string SoftDescriptor",return !is_null($this->_fields['SoftDescriptor']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'AuthorizeResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_AuthorizeResult'), + + + 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_AuthorizeResponse,getAuthorizeResult,* @see OffAmazonPaymentsService_Model,return $this->_fields['AuthorizeResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeResponse,setAuthorizeResult,"* OffAmazonPaymentsService_Model_AuthorizeResponse + * + * Properties: + * ","$this->_fields['AuthorizeResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizeResponse,withAuthorizeResult,"* Construct new OffAmazonPaymentsService_Model_AuthorizeResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setAuthorizeResult($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeResponse,isSetAuthorizeResult,"* Construct OffAmazonPaymentsService_Model_AuthorizeResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_AuthorizeResponse",return !is_null($this->_fields['AuthorizeResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeResponse,getResponseMetadata,"* Gets the value of the AuthorizeResult. + * + * @return OffAmazonPaymentsService_Model_AuthorizeResult AuthorizeResult",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeResponse,setResponseMetadata,"* Sets the value of the AuthorizeResult. + * + * @param AuthorizeResult AuthorizeResult + * @return void","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizeResponse,withResponseMetadata,"* Sets the value of the AuthorizeResult and returns this instance + * + * @param AuthorizeResult $value AuthorizeResult + * @return OffAmazonPaymentsService_Model_AuthorizeResponse instance","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeResponse,isSetResponseMetadata,"* Checks if AuthorizeResult is set + * + * @return bool true if AuthorizeResult property is set",return !is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_AuthorizeResponse,toXML,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_AuthorizeResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_AuthorizeResponse,setResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_AuthorizeResponse instance",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_AuthorizeResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'AuthorizationDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_AuthorizationDetails'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_AuthorizeResult,getAuthorizationDetails,* @see OffAmazonPaymentsService_Model,return $this->_fields['AuthorizationDetails']['FieldValue'];,- +OffAmazonPaymentsService_Model_AuthorizeResult,setAuthorizationDetails,"* OffAmazonPaymentsService_Model_AuthorizeResult + * + * Properties: + * ","$this->_fields['AuthorizationDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_AuthorizeResult,withAuthorizationDetails,"* Construct new OffAmazonPaymentsService_Model_AuthorizeResult + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setAuthorizationDetails($value); + return $this;",- +OffAmazonPaymentsService_Model_AuthorizeResult,isSetAuthorizationDetails,"* Gets the value of the AuthorizationDetails. + * + * @return OffAmazonPaymentsService_Model_AuthorizationDetails AuthorizationDetails",return !is_null($this->_fields['AuthorizationDetails']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementAttributes,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + 'PlatformId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'SellerNote' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + + 'SellerBillingAgreementAttributes' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_BillingAgreementAttributes,getPlatformId,"* OffAmazonPaymentsService_Model_BillingAgreementAttributes + * + * Properties: + * ",return $this->_fields['PlatformId']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementAttributes,setPlatformId,"* Construct new OffAmazonPaymentsService_Model_BillingAgreementAttributes + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['PlatformId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementAttributes,withPlatformId,"* Gets the value of the PlatformId property. + * + * @return string PlatformId","$this->setPlatformId($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementAttributes,isSetPlatformId,"* Sets the value of the PlatformId property. + * + * @param string PlatformId + * @return this instance",return ! is_null($this->_fields['PlatformId']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementAttributes,getSellerNote,"* Sets the value of the PlatformId and returns this instance + * + * @param string $value PlatformId + * @return OffAmazonPaymentsService_Model_BillingAgreementAttributes instance",return $this->_fields['SellerNote']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementAttributes,setSellerNote,"* Checks if PlatformId is set + * + * @return bool true if PlatformId is set","$this->_fields['SellerNote']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementAttributes,withSellerNote,"* Gets the value of the SellerNote property. + * + * @return string SellerNote","$this->setSellerNote($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementAttributes,isSetSellerNote,"* Sets the value of the SellerNote property. + * + * @param string SellerNote + * @return this instance",return ! is_null($this->_fields['SellerNote']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementAttributes,getSellerBillingAgreementAttributes,"* Sets the value of the SellerNote and returns this instance + * + * @param string $value SellerNote + * @return OffAmazonPaymentsService_Model_BillingAgreementAttributes instance",return $this->_fields['SellerBillingAgreementAttributes']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementAttributes,setSellerBillingAgreementAttributes,"* Checks if SellerNote is set + * + * @return bool true if SellerNote is set","$this->_fields['SellerBillingAgreementAttributes']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_BillingAgreementAttributes,withSellerBillingAgreementAttributes,"* Gets the value of the SellerBillingAgreementAttributes. + * + * @return SellerBillingAgreementAttributes SellerBillingAgreementAttributes","$this->setSellerBillingAgreementAttributes($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementAttributes,isSetSellerBillingAgreementAttributes,"* Sets the value of the SellerBillingAgreementAttributes. + * + * @param SellerBillingAgreementAttributes SellerBillingAgreementAttributes + * @return void",return ! is_null($this->_fields['SellerBillingAgreementAttributes']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + 'AmazonBillingAgreementId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + + 'BillingAgreementLimits' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAgreementLimits' + ), + + 'Buyer' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_Buyer' + ), + + 'SellerNote' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'PlatformId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + + 'Destination' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_Destination' + ), + + 'ReleaseEnvironment' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + + 'SellerBillingAgreementAttributes' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes' + ), + + 'BillingAgreementStatus' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAgreementStatus' + ), + + 'Constraints' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_Constraints' + ), + + 'CreationTimestamp' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'ExpirationTimestamp' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'BillingAgreementConsent' => array( + 'FieldValue' => null, + 'FieldType' => 'bool' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,getAmazonBillingAgreementId,"* OffAmazonPaymentsService_Model_BillingAgreementDetails + * + * Properties: + * ",return $this->_fields['AmazonBillingAgreementId']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,setAmazonBillingAgreementId,"* Construct new OffAmazonPaymentsService_Model_BillingAgreementDetails + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,withAmazonBillingAgreementId,"* Gets the value of the AmazonBillingAgreementId property. + * + * @return string AmazonBillingAgreementId","$this->setAmazonBillingAgreementId($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,isSetAmazonBillingAgreementId,"* Sets the value of the AmazonBillingAgreementId property. + * + * @param string AmazonBillingAgreementId + * @return this instance",return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,getBillingAgreementLimits,"* Sets the value of the AmazonBillingAgreementId and returns this instance + * + * @param string $value AmazonBillingAgreementId + * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance",return $this->_fields['BillingAgreementLimits']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,setBillingAgreementLimits,"* Checks if AmazonBillingAgreementId is set + * + * @return bool true if AmazonBillingAgreementId is set","$this->_fields['BillingAgreementLimits']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,withBillingAgreementLimits,"* Gets the value of the BillingAgreementLimits. + * + * @return BillingAgreementLimits BillingAgreementLimits","$this->setBillingAgreementLimits($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,isSetBillingAgreementLimits,"* Sets the value of the BillingAgreementLimits. + * + * @param BillingAgreementLimits BillingAgreementLimits + * @return void",return ! is_null($this->_fields['BillingAgreementLimits']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,getBuyer,"* Sets the value of the BillingAgreementLimits and returns this instance + * + * @param BillingAgreementLimits $value BillingAgreementLimits + * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance",return $this->_fields['Buyer']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,setBuyer,"* Checks if BillingAgreementLimits is set + * + * @return bool true if BillingAgreementLimits property is set","$this->_fields['Buyer']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,withBuyer,"* Gets the value of the Buyer. + * + * @return Buyer Buyer","$this->setBuyer($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,isSetBuyer,"* Sets the value of the Buyer. + * + * @param Buyer Buyer + * @return void",return ! is_null($this->_fields['Buyer']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,getSellerNote,"* Sets the value of the Buyer and returns this instance + * + * @param Buyer $value Buyer + * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance",return $this->_fields['SellerNote']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,setSellerNote,"* Checks if Buyer is set + * + * @return bool true if Buyer property is set","$this->_fields['SellerNote']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,withSellerNote,"* Gets the value of the SellerNote property. + * + * @return string SellerNote","$this->setSellerNote($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,isSetSellerNote,"* Sets the value of the SellerNote property. + * + * @param string SellerNote + * @return this instance",return ! is_null($this->_fields['SellerNote']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,getPlatformId,"* Sets the value of the SellerNote and returns this instance + * + * @param string $value SellerNote + * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance",return $this->_fields['PlatformId']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,setPlatformId,"* Checks if SellerNote is set + * + * @return bool true if SellerNote is set","$this->_fields['PlatformId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,withPlatformId,"* Gets the value of the PlatformId property. + * + * @return string PlatformId","$this->setPlatformId($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,isSetPlatformId,"* Sets the value of the PlatformId property. + * + * @param string PlatformId + * @return this instance",return ! is_null($this->_fields['PlatformId']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,getDestination,"* Sets the value of the PlatformId and returns this instance + * + * @param string $value PlatformId + * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance",return $this->_fields['Destination']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,setDestination,"* Checks if PlatformId is set + * + * @return bool true if PlatformId is set","$this->_fields['Destination']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,withDestination,"* Gets the value of the Destination. + * + * @return Destination Destination","$this->setDestination($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,isSetDestination,"* Sets the value of the Destination. + * + * @param Destination Destination + * @return void",return ! is_null($this->_fields['Destination']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,getReleaseEnvironment,"* Sets the value of the Destination and returns this instance + * + * @param Destination $value Destination + * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance",return $this->_fields['ReleaseEnvironment']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,setReleaseEnvironment,"* Checks if Destination is set + * + * @return bool true if Destination property is set","$this->_fields['ReleaseEnvironment']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,withReleaseEnvironment,"* Gets the value of the ReleaseEnvironment property. + * + * @return string ReleaseEnvironment","$this->setReleaseEnvironment($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,isSetReleaseEnvironment,"* Sets the value of the ReleaseEnvironment property. + * + * @param string ReleaseEnvironment + * @return this instance",return ! is_null($this->_fields['ReleaseEnvironment']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,getSellerBillingAgreementAttributes,"* Sets the value of the ReleaseEnvironment and returns this instance + * + * @param string $value ReleaseEnvironment + * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance",return $this->_fields['SellerBillingAgreementAttributes']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,setSellerBillingAgreementAttributes,"* Checks if ReleaseEnvironment is set + * + * @return bool true if ReleaseEnvironment is set","$this->_fields['SellerBillingAgreementAttributes']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,withSellerBillingAgreementAttributes,"* Gets the value of the SellerBillingAgreementAttributes. + * + * @return SellerBillingAgreementAttributes SellerBillingAgreementAttributes","$this->setSellerBillingAgreementAttributes($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,isSetSellerBillingAgreementAttributes,"* Sets the value of the SellerBillingAgreementAttributes. + * + * @param SellerBillingAgreementAttributes SellerBillingAgreementAttributes + * @return void",return ! is_null($this->_fields['SellerBillingAgreementAttributes']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,getBillingAgreementStatus,"* Sets the value of the SellerBillingAgreementAttributes and returns this instance + * + * @param SellerBillingAgreementAttributes $value SellerBillingAgreementAttributes + * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance",return $this->_fields['BillingAgreementStatus']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,setBillingAgreementStatus,"* Checks if SellerBillingAgreementAttributes is set + * + * @return bool true if SellerBillingAgreementAttributes property is set","$this->_fields['BillingAgreementStatus']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,withBillingAgreementStatus,"* Gets the value of the BillingAgreementStatus. + * + * @return BillingAgreementStatus BillingAgreementStatus","$this->setBillingAgreementStatus($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,isSetBillingAgreementStatus,"* Sets the value of the BillingAgreementStatus. + * + * @param BillingAgreementStatus BillingAgreementStatus + * @return void",return ! is_null($this->_fields['BillingAgreementStatus']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,getConstraints,"* Sets the value of the BillingAgreementStatus and returns this instance + * + * @param BillingAgreementStatus $value BillingAgreementStatus + * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance",return $this->_fields['Constraints']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,setConstraints,"* Checks if BillingAgreementStatus is set + * + * @return bool true if BillingAgreementStatus property is set","$this->_fields['Constraints']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,withConstraints,"* Gets the value of the Constraints. + * + * @return Constraints Constraints","$this->setConstraints($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,isSetConstraints,"* Sets the value of the Constraints. + * + * @param Constraints Constraints + * @return void",return ! is_null($this->_fields['Constraints']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,getCreationTimestamp,"* Sets the value of the Constraints and returns this instance + * + * @param Constraints $value Constraints + * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance",return $this->_fields['CreationTimestamp']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,setCreationTimestamp,"* Checks if Constraints is set + * + * @return bool true if Constraints property is set","$this->_fields['CreationTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,withCreationTimestamp,"* Gets the value of the CreationTimestamp property. + * + * @return string CreationTimestamp","$this->setCreationTimestamp($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,isSetCreationTimestamp,"* Sets the value of the CreationTimestamp property. + * + * @param string CreationTimestamp + * @return this instance",return ! is_null($this->_fields['CreationTimestamp']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,getExpirationTimestamp,"* Sets the value of the CreationTimestamp and returns this instance + * + * @param string $value CreationTimestamp + * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance",return $this->_fields['ExpirationTimestamp']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,setExpirationTimestamp,"* Checks if CreationTimestamp is set + * + * @return bool true if CreationTimestamp is set","$this->_fields['ExpirationTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,withExpirationTimestamp,"* Gets the value of the ExpirationTimestamp property. + * + * @return string ExpirationTimestamp","$this->setExpirationTimestamp($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,isSetExpirationTimestamp,"* Sets the value of the ExpirationTimestamp property. + * + * @param string ExpirationTimestamp + * @return this instance",return ! is_null($this->_fields['ExpirationTimestamp']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,getBillingAgreementConsent,"* Sets the value of the ExpirationTimestamp and returns this instance + * + * @param string $value ExpirationTimestamp + * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance",return $this->_fields['BillingAgreementConsent']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementDetails,setBillingAgreementConsent,"* Checks if ExpirationTimestamp is set + * + * @return bool true if ExpirationTimestamp is set","$this->_fields['BillingAgreementConsent']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,withBillingAgreementConsent,"* Gets the value of the BillingAgreementConsent property. + * + * @return bool BillingAgreementConsent","$this->setBillingAgreementConsent($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementDetails,isSetBillingAgreementConsent,"* Sets the value of the BillingAgreementConsent property. + * + * @param bool BillingAgreementConsent + * @return this instance",return ! is_null($this->_fields['BillingAgreementConsent']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementLimits,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + + 'AmountLimitPerTimePeriod' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_Price' + ), + + 'TimePeriodStartDate' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'TimePeriodEndDate' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + + 'CurrentRemainingBalance' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_Price' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_BillingAgreementLimits,getAmountLimitPerTimePeriod,"* OffAmazonPaymentsService_Model_BillingAgreementLimits + * + * Properties: + * ",return $this->_fields['AmountLimitPerTimePeriod']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementLimits,setAmountLimitPerTimePeriod,"* Construct new OffAmazonPaymentsService_Model_BillingAgreementLimits + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['AmountLimitPerTimePeriod']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_BillingAgreementLimits,withAmountLimitPerTimePeriod,"* Gets the value of the AmountLimitPerTimePeriod. + * + * @return Price AmountLimitPerTimePeriod","$this->setAmountLimitPerTimePeriod($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementLimits,isSetAmountLimitPerTimePeriod,"* Sets the value of the AmountLimitPerTimePeriod. + * + * @param Price AmountLimitPerTimePeriod + * @return void",return ! is_null($this->_fields['AmountLimitPerTimePeriod']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementLimits,getTimePeriodStartDate,"* Sets the value of the AmountLimitPerTimePeriod and returns this instance + * + * @param Price $value AmountLimitPerTimePeriod + * @return OffAmazonPaymentsService_Model_BillingAgreementLimits instance",return $this->_fields['TimePeriodStartDate']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementLimits,setTimePeriodStartDate,"* Checks if AmountLimitPerTimePeriod is set + * + * @return bool true if AmountLimitPerTimePeriod property is set","$this->_fields['TimePeriodStartDate']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementLimits,withTimePeriodStartDate,"* Gets the value of the TimePeriodStartDate property. + * + * @return string TimePeriodStartDate","$this->setTimePeriodStartDate($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementLimits,isSetTimePeriodStartDate,"* Sets the value of the TimePeriodStartDate property. + * + * @param string TimePeriodStartDate + * @return this instance",return ! is_null($this->_fields['TimePeriodStartDate']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementLimits,getTimePeriodEndDate,"* Sets the value of the TimePeriodStartDate and returns this instance + * + * @param string $value TimePeriodStartDate + * @return OffAmazonPaymentsService_Model_BillingAgreementLimits instance",return $this->_fields['TimePeriodEndDate']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementLimits,setTimePeriodEndDate,"* Checks if TimePeriodStartDate is set + * + * @return bool true if TimePeriodStartDate is set","$this->_fields['TimePeriodEndDate']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementLimits,withTimePeriodEndDate,"* Gets the value of the TimePeriodEndDate property. + * + * @return string TimePeriodEndDate","$this->setTimePeriodEndDate($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementLimits,isSetTimePeriodEndDate,"* Sets the value of the TimePeriodEndDate property. + * + * @param string TimePeriodEndDate + * @return this instance",return ! is_null($this->_fields['TimePeriodEndDate']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementLimits,getCurrentRemainingBalance,"* Sets the value of the TimePeriodEndDate and returns this instance + * + * @param string $value TimePeriodEndDate + * @return OffAmazonPaymentsService_Model_BillingAgreementLimits instance",return $this->_fields['CurrentRemainingBalance']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementLimits,setCurrentRemainingBalance,"* Checks if TimePeriodEndDate is set + * + * @return bool true if TimePeriodEndDate is set","$this->_fields['CurrentRemainingBalance']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_BillingAgreementLimits,withCurrentRemainingBalance,"* Gets the value of the CurrentRemainingBalance. + * + * @return Price CurrentRemainingBalance","$this->setCurrentRemainingBalance($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementLimits,isSetCurrentRemainingBalance,"* Sets the value of the CurrentRemainingBalance. + * + * @param Price CurrentRemainingBalance + * @return void",return ! is_null($this->_fields['CurrentRemainingBalance']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementStatus,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + 'State' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'LastUpdatedTimestamp' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'ReasonCode' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'ReasonDescription' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_BillingAgreementStatus,getState,"* OffAmazonPaymentsService_Model_BillingAgreementStatus + * + * Properties: + * ",return $this->_fields['State']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementStatus,setState,"* Construct new OffAmazonPaymentsService_Model_BillingAgreementStatus + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['State']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementStatus,withState,"* Gets the value of the State property. + * + * @return string State","$this->setState($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementStatus,isSetState,"* Sets the value of the State property. + * + * @param string State + * @return this instance",return ! is_null($this->_fields['State']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementStatus,getLastUpdatedTimestamp,"* Sets the value of the State and returns this instance + * + * @param string $value State + * @return OffAmazonPaymentsService_Model_BillingAgreementStatus instance",return $this->_fields['LastUpdatedTimestamp']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementStatus,setLastUpdatedTimestamp,"* Checks if State is set + * + * @return bool true if State is set","$this->_fields['LastUpdatedTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementStatus,withLastUpdatedTimestamp,"* Gets the value of the LastUpdatedTimestamp property. + * + * @return string LastUpdatedTimestamp","$this->setLastUpdatedTimestamp($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementStatus,isSetLastUpdatedTimestamp,"* Sets the value of the LastUpdatedTimestamp property. + * + * @param string LastUpdatedTimestamp + * @return this instance",return ! is_null($this->_fields['LastUpdatedTimestamp']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementStatus,getReasonCode,"* Sets the value of the LastUpdatedTimestamp and returns this instance + * + * @param string $value LastUpdatedTimestamp + * @return OffAmazonPaymentsService_Model_BillingAgreementStatus instance",return $this->_fields['ReasonCode']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementStatus,setReasonCode,"* Checks if LastUpdatedTimestamp is set + * + * @return bool true if LastUpdatedTimestamp is set","$this->_fields['ReasonCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementStatus,withReasonCode,"* Gets the value of the ReasonCode property. + * + * @return string ReasonCode","$this->setReasonCode($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementStatus,isSetReasonCode,"* Sets the value of the ReasonCode property. + * + * @param string ReasonCode + * @return this instance",return ! is_null($this->_fields['ReasonCode']['FieldValue']);,- +OffAmazonPaymentsService_Model_BillingAgreementStatus,getReasonDescription,"* Sets the value of the ReasonCode and returns this instance + * + * @param string $value ReasonCode + * @return OffAmazonPaymentsService_Model_BillingAgreementStatus instance",return $this->_fields['ReasonDescription']['FieldValue'];,- +OffAmazonPaymentsService_Model_BillingAgreementStatus,setReasonDescription,"* Checks if ReasonCode is set + * + * @return bool true if ReasonCode is set","$this->_fields['ReasonDescription']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementStatus,withReasonDescription,"* Gets the value of the ReasonDescription property. + * + * @return string ReasonDescription","$this->setReasonDescription($value); + return $this;",- +OffAmazonPaymentsService_Model_BillingAgreementStatus,isSetReasonDescription,"* Sets the value of the ReasonDescription property. + * + * @param string ReasonDescription + * @return this instance",return ! is_null($this->_fields['ReasonDescription']['FieldValue']);,- +OffAmazonPaymentsService_Model_Buyer,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'Name' => array('FieldValue' => null, 'FieldType' => 'string'), + 'Email' => array('FieldValue' => null, 'FieldType' => 'string'), + 'Phone' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_Buyer,getName,* @see OffAmazonPaymentsService_Model,return $this->_fields['Name']['FieldValue'];,- +OffAmazonPaymentsService_Model_Buyer,setName,"* OffAmazonPaymentsService_Model_Buyer + * + * Properties: + * ","$this->_fields['Name']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Buyer,withName,"* Construct new OffAmazonPaymentsService_Model_Buyer + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setName($value); + return $this;",- +OffAmazonPaymentsService_Model_Buyer,isSetName,"* Gets the value of the Name property. + * + * @return string Name",return !is_null($this->_fields['Name']['FieldValue']);,- +OffAmazonPaymentsService_Model_Buyer,getEmail,"* Sets the value of the Name property. + * + * @param string Name + * @return this instance",return $this->_fields['Email']['FieldValue'];,- +OffAmazonPaymentsService_Model_Buyer,setEmail,"* Sets the value of the Name and returns this instance + * + * @param string $value Name + * @return OffAmazonPaymentsService_Model_Buyer instance","$this->_fields['Email']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Buyer,withEmail,"* Checks if Name is set + * + * @return bool true if Name is set","$this->setEmail($value); + return $this;",- +OffAmazonPaymentsService_Model_Buyer,isSetEmail,"* Gets the value of the Email property. + * + * @return string Email",return !is_null($this->_fields['Email']['FieldValue']);,- +OffAmazonPaymentsService_Model_Buyer,getPhone,"* Sets the value of the Email property. + * + * @param string Email + * @return this instance",return $this->_fields['Phone']['FieldValue'];,- +OffAmazonPaymentsService_Model_Buyer,setPhone,"* Sets the value of the Email and returns this instance + * + * @param string $value Email + * @return OffAmazonPaymentsService_Model_Buyer instance","$this->_fields['Phone']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Buyer,withPhone,"* Checks if Email is set + * + * @return bool true if Email is set","$this->setPhone($value); + return $this;",- +OffAmazonPaymentsService_Model_Buyer,isSetPhone,"* Gets the value of the Phone property. + * + * @return string Phone",return !is_null($this->_fields['Phone']['FieldValue']);,- +OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'CancelationReason' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,getSellerId,* @see OffAmazonPaymentsService_Model,return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,setSellerId,"* OffAmazonPaymentsService_Model_CancelOrderReferenceRequest + * + * Properties: + * ","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,withSellerId,"* Construct new OffAmazonPaymentsService_Model_CancelOrderReferenceRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,isSetSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId",return !is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,getAmazonOrderReferenceId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return $this->_fields['AmazonOrderReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,setAmazonOrderReferenceId,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_CancelOrderReferenceRequest instance","$this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,withAmazonOrderReferenceId,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->setAmazonOrderReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,isSetAmazonOrderReferenceId,"* Gets the value of the AmazonOrderReferenceId property. + * + * @return string AmazonOrderReferenceId",return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,getCancelationReason,"* Sets the value of the AmazonOrderReferenceId property. + * + * @param string AmazonOrderReferenceId + * @return this instance",return $this->_fields['CancelationReason']['FieldValue'];,- +OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,setCancelationReason,"* Sets the value of the AmazonOrderReferenceId and returns this instance + * + * @param string $value AmazonOrderReferenceId + * @return OffAmazonPaymentsService_Model_CancelOrderReferenceRequest instance","$this->_fields['CancelationReason']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,withCancelationReason,"* Checks if AmazonOrderReferenceId is set + * + * @return bool true if AmazonOrderReferenceId is set","$this->setCancelationReason($value); + return $this;",- +OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,isSetCancelationReason,"* Gets the value of the CancelationReason property. + * + * @return string CancelationReason",return !is_null($this->_fields['CancelationReason']['FieldValue']);,- +OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'CancelOrderReferenceResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_CancelOrderReferenceResult'), + + + 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,getCancelOrderReferenceResult,* @see OffAmazonPaymentsService_Model,return $this->_fields['CancelOrderReferenceResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,setCancelOrderReferenceResult,"* OffAmazonPaymentsService_Model_CancelOrderReferenceResponse + * + * Properties: + * ","$this->_fields['CancelOrderReferenceResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,withCancelOrderReferenceResult,"* Construct new OffAmazonPaymentsService_Model_CancelOrderReferenceResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setCancelOrderReferenceResult($value); + return $this;",- +OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,isSetCancelOrderReferenceResult,"* Construct OffAmazonPaymentsService_Model_CancelOrderReferenceResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_CancelOrderReferenceResponse",return !is_null($this->_fields['CancelOrderReferenceResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,getResponseMetadata,"* Gets the value of the CancelOrderReferenceResult. + * + * @return OffAmazonPaymentsService_Model_CancelOrderReferenceResult CancelOrderReferenceResult",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,setResponseMetadata,"* Sets the value of the CancelOrderReferenceResult. + * + * @param CancelOrderReferenceResult CancelOrderReferenceResult + * @return void","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,withResponseMetadata,"* Sets the value of the CancelOrderReferenceResult and returns this instance + * + * @param CancelOrderReferenceResult $value CancelOrderReferenceResult + * @return OffAmazonPaymentsService_Model_CancelOrderReferenceResponse instance","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,isSetResponseMetadata,"* Checks if CancelOrderReferenceResult is set + * + * @return bool true if CancelOrderReferenceResult property is set",return !is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,toXML,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,setResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_CancelOrderReferenceResponse instance",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_CancelOrderReferenceResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CaptureDetails,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'AmazonCaptureId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'CaptureReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'SellerCaptureNote' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'CaptureAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), + + + 'RefundedAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), + + + 'CaptureFee' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), + + + 'IdList' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_IdList'), + + 'CreationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'CaptureStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Status'), + + 'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CaptureDetails,getAmazonCaptureId,* @see OffAmazonPaymentsService_Model,return $this->_fields['AmazonCaptureId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureDetails,setAmazonCaptureId,"* OffAmazonPaymentsService_Model_CaptureDetails + * + * Properties: + * ","$this->_fields['AmazonCaptureId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,withAmazonCaptureId,"* Construct new OffAmazonPaymentsService_Model_CaptureDetails + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setAmazonCaptureId($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,isSetAmazonCaptureId,"* Gets the value of the AmazonCaptureId property. + * + * @return string AmazonCaptureId",return !is_null($this->_fields['AmazonCaptureId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureDetails,getCaptureReferenceId,"* Sets the value of the AmazonCaptureId property. + * + * @param string AmazonCaptureId + * @return this instance",return $this->_fields['CaptureReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureDetails,setCaptureReferenceId,"* Sets the value of the AmazonCaptureId and returns this instance + * + * @param string $value AmazonCaptureId + * @return OffAmazonPaymentsService_Model_CaptureDetails instance","$this->_fields['CaptureReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,withCaptureReferenceId,"* Checks if AmazonCaptureId is set + * + * @return bool true if AmazonCaptureId is set","$this->setCaptureReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,isSetCaptureReferenceId,"* Gets the value of the CaptureReferenceId property. + * + * @return string CaptureReferenceId",return !is_null($this->_fields['CaptureReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureDetails,getSellerCaptureNote,"* Sets the value of the CaptureReferenceId property. + * + * @param string CaptureReferenceId + * @return this instance",return $this->_fields['SellerCaptureNote']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureDetails,setSellerCaptureNote,"* Sets the value of the CaptureReferenceId and returns this instance + * + * @param string $value CaptureReferenceId + * @return OffAmazonPaymentsService_Model_CaptureDetails instance","$this->_fields['SellerCaptureNote']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,withSellerCaptureNote,"* Checks if CaptureReferenceId is set + * + * @return bool true if CaptureReferenceId is set","$this->setSellerCaptureNote($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,isSetSellerCaptureNote,"* Gets the value of the SellerCaptureNote property. + * + * @return string SellerCaptureNote",return !is_null($this->_fields['SellerCaptureNote']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureDetails,getCaptureAmount,"* Sets the value of the SellerCaptureNote property. + * + * @param string SellerCaptureNote + * @return this instance",return $this->_fields['CaptureAmount']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureDetails,setCaptureAmount,"* Sets the value of the SellerCaptureNote and returns this instance + * + * @param string $value SellerCaptureNote + * @return OffAmazonPaymentsService_Model_CaptureDetails instance","$this->_fields['CaptureAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CaptureDetails,withCaptureAmount,"* Checks if SellerCaptureNote is set + * + * @return bool true if SellerCaptureNote is set","$this->setCaptureAmount($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,isSetCaptureAmount,"* Gets the value of the CaptureAmount. + * + * @return OffAmazonPaymentsService_Model_Price CaptureAmount",return !is_null($this->_fields['CaptureAmount']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureDetails,getRefundedAmount,"* Sets the value of the CaptureAmount. + * + * @param Price CaptureAmount + * @return void",return $this->_fields['RefundedAmount']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureDetails,setRefundedAmount,"* Sets the value of the CaptureAmount and returns this instance + * + * @param Price $value CaptureAmount + * @return OffAmazonPaymentsService_Model_CaptureDetails instance","$this->_fields['RefundedAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CaptureDetails,withRefundedAmount,"* Checks if CaptureAmount is set + * + * @return bool true if CaptureAmount property is set","$this->setRefundedAmount($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,isSetRefundedAmount,"* Gets the value of the RefundedAmount. + * + * @return OffAmazonPaymentsService_Model_Price RefundedAmount",return !is_null($this->_fields['RefundedAmount']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureDetails,getCaptureFee,"* Sets the value of the RefundedAmount. + * + * @param Price RefundedAmount + * @return void",return $this->_fields['CaptureFee']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureDetails,setCaptureFee,"* Sets the value of the RefundedAmount and returns this instance + * + * @param Price $value RefundedAmount + * @return OffAmazonPaymentsService_Model_CaptureDetails instance","$this->_fields['CaptureFee']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CaptureDetails,withCaptureFee,"* Checks if RefundedAmount is set + * + * @return bool true if RefundedAmount property is set","$this->setCaptureFee($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,isSetCaptureFee,"* Gets the value of the CaptureFee. + * + * @return Price CaptureFee",return !is_null($this->_fields['CaptureFee']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureDetails,getIdList,"* Sets the value of the CaptureFee. + * + * @param Price CaptureFee + * @return void",return $this->_fields['IdList']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureDetails,setIdList,"* Sets the value of the CaptureFee and returns this instance + * + * @param Price $value CaptureFee + * @return OffAmazonPaymentsService_Model_CaptureDetails instance","$this->_fields['IdList']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CaptureDetails,withIdList,"* Checks if CaptureFee is set + * + * @return bool true if CaptureFee property is set","$this->setIdList($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,isSetIdList,"* Gets the value of the IdList. + * + * @return IdList IdList",return !is_null($this->_fields['IdList']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureDetails,getCreationTimestamp,"* Sets the value of the IdList. + * + * @param IdList IdList + * @return void",return $this->_fields['CreationTimestamp']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureDetails,setCreationTimestamp,"* Sets the value of the IdList and returns this instance + * + * @param IdList $value IdList + * @return OffAmazonPaymentsService_Model_CaptureDetails instance","$this->_fields['CreationTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,withCreationTimestamp,"* Checks if IdList is set + * + * @return bool true if IdList property is set","$this->setCreationTimestamp($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,isSetCreationTimestamp,"* Gets the value of the CreationTimestamp property. + * + * @return string CreationTimestamp",return !is_null($this->_fields['CreationTimestamp']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureDetails,getCaptureStatus,"* Sets the value of the CreationTimestamp property. + * + * @param string CreationTimestamp + * @return this instance",return $this->_fields['CaptureStatus']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureDetails,setCaptureStatus,"* Sets the value of the CreationTimestamp and returns this instance + * + * @param string $value CreationTimestamp + * @return OffAmazonPaymentsService_Model_CaptureDetails instance","$this->_fields['CaptureStatus']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CaptureDetails,withCaptureStatus,"* Checks if CreationTimestamp is set + * + * @return bool true if CreationTimestamp is set","$this->setCaptureStatus($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,isSetCaptureStatus,"* Gets the value of the CaptureStatus. + * + * @return OffAmazonPaymentsService_Model_Status CaptureStatus",return !is_null($this->_fields['CaptureStatus']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureDetails,getSoftDescriptor,"* Sets the value of the CaptureStatus. + * + * @param Status CaptureStatus + * @return void",return $this->_fields['SoftDescriptor']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureDetails,setSoftDescriptor,"* Sets the value of the CaptureStatus and returns this instance + * + * @param Status $value CaptureStatus + * @return OffAmazonPaymentsService_Model_CaptureDetails instance","$this->_fields['SoftDescriptor']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,withSoftDescriptor,"* Checks if CaptureStatus is set + * + * @return bool true if CaptureStatus property is set","$this->setSoftDescriptor($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureDetails,isSetSoftDescriptor,"* Gets the value of the SoftDescriptor property. + * + * @return string SoftDescriptor",return !is_null($this->_fields['SoftDescriptor']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AmazonAuthorizationId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'CaptureReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'CaptureAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), + + 'SellerCaptureNote' => array('FieldValue' => null, 'FieldType' => 'string'), + 'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CaptureRequest,getSellerId,* @see OffAmazonPaymentsService_Model,return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureRequest,setSellerId,"* OffAmazonPaymentsService_Model_CaptureRequest + * + * Properties: + * ","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CaptureRequest,withSellerId,"* Construct new OffAmazonPaymentsService_Model_CaptureRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureRequest,isSetSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId",return !is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureRequest,getAmazonAuthorizationId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return $this->_fields['AmazonAuthorizationId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureRequest,setAmazonAuthorizationId,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_CaptureRequest instance","$this->_fields['AmazonAuthorizationId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CaptureRequest,withAmazonAuthorizationId,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->setAmazonAuthorizationId($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureRequest,isSetAmazonAuthorizationId,"* Gets the value of the AmazonAuthorizationId property. + * + * @return string AmazonAuthorizationId",return !is_null($this->_fields['AmazonAuthorizationId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureRequest,getCaptureReferenceId,"* Sets the value of the AmazonAuthorizationId property. + * + * @param string AmazonAuthorizationId + * @return this instance",return $this->_fields['CaptureReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureRequest,setCaptureReferenceId,"* Sets the value of the AmazonAuthorizationId and returns this instance + * + * @param string $value AmazonAuthorizationId + * @return OffAmazonPaymentsService_Model_CaptureRequest instance","$this->_fields['CaptureReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CaptureRequest,withCaptureReferenceId,"* Checks if AmazonAuthorizationId is set + * + * @return bool true if AmazonAuthorizationId is set","$this->setCaptureReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureRequest,isSetCaptureReferenceId,"* Gets the value of the CaptureReferenceId property. + * + * @return string CaptureReferenceId",return !is_null($this->_fields['CaptureReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureRequest,getCaptureAmount,"* Sets the value of the CaptureReferenceId property. + * + * @param string CaptureReferenceId + * @return this instance",return $this->_fields['CaptureAmount']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureRequest,setCaptureAmount,"* Sets the value of the CaptureReferenceId and returns this instance + * + * @param string $value CaptureReferenceId + * @return OffAmazonPaymentsService_Model_CaptureRequest instance","$this->_fields['CaptureAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CaptureRequest,withCaptureAmount,"* Checks if CaptureReferenceId is set + * + * @return bool true if CaptureReferenceId is set","$this->setCaptureAmount($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureRequest,isSetCaptureAmount,"* Gets the value of the CaptureAmount. + * + * @return OffAmazonPaymentsService_Model_Price CaptureAmount",return !is_null($this->_fields['CaptureAmount']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureRequest,getSellerCaptureNote,"* Sets the value of the CaptureAmount. + * + * @param Price CaptureAmount + * @return void",return $this->_fields['SellerCaptureNote']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureRequest,setSellerCaptureNote,"* Sets the value of the CaptureAmount and returns this instance + * + * @param Price $value CaptureAmount + * @return OffAmazonPaymentsService_Model_CaptureRequest instance","$this->_fields['SellerCaptureNote']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CaptureRequest,withSellerCaptureNote,"* Checks if CaptureAmount is set + * + * @return bool true if CaptureAmount property is set","$this->setSellerCaptureNote($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureRequest,isSetSellerCaptureNote,"* Gets the value of the SellerCaptureNote property. + * + * @return string SellerCaptureNote",return !is_null($this->_fields['SellerCaptureNote']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureRequest,getSoftDescriptor,"* Sets the value of the SellerCaptureNote property. + * + * @param string SellerCaptureNote + * @return this instance",return $this->_fields['SoftDescriptor']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureRequest,setSoftDescriptor,"* Sets the value of the SellerCaptureNote and returns this instance + * + * @param string $value SellerCaptureNote + * @return OffAmazonPaymentsService_Model_CaptureRequest instance","$this->_fields['SoftDescriptor']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CaptureRequest,withSoftDescriptor,"* Checks if SellerCaptureNote is set + * + * @return bool true if SellerCaptureNote is set","$this->setSoftDescriptor($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureRequest,isSetSoftDescriptor,"* Gets the value of the SoftDescriptor property. + * + * @return string SoftDescriptor",return !is_null($this->_fields['SoftDescriptor']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'CaptureResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_CaptureResult'), + + + 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CaptureResponse,getCaptureResult,* @see OffAmazonPaymentsService_Model,return $this->_fields['CaptureResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureResponse,setCaptureResult,"* OffAmazonPaymentsService_Model_CaptureResponse + * + * Properties: + * ","$this->_fields['CaptureResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CaptureResponse,withCaptureResult,"* Construct new OffAmazonPaymentsService_Model_CaptureResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setCaptureResult($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureResponse,isSetCaptureResult,"* Construct OffAmazonPaymentsService_Model_CaptureResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_CaptureResponse",return !is_null($this->_fields['CaptureResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureResponse,getResponseMetadata,"* Gets the value of the CaptureResult. + * + * @return OffAmazonPaymentsService_Model_CaptureResult CaptureResult",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureResponse,setResponseMetadata,"* Sets the value of the CaptureResult. + * + * @param CaptureResult CaptureResult + * @return void","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CaptureResponse,withResponseMetadata,"* Sets the value of the CaptureResult and returns this instance + * + * @param CaptureResult $value CaptureResult + * @return OffAmazonPaymentsService_Model_CaptureResponse instance","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureResponse,isSetResponseMetadata,"* Checks if CaptureResult is set + * + * @return bool true if CaptureResult property is set",return !is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_CaptureResponse,toXML,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_CaptureResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_CaptureResponse,setResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_CaptureResponse instance",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_CaptureResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'CaptureDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_CaptureDetails'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CaptureResult,getCaptureDetails,* @see OffAmazonPaymentsService_Model,return $this->_fields['CaptureDetails']['FieldValue'];,- +OffAmazonPaymentsService_Model_CaptureResult,setCaptureDetails,"* OffAmazonPaymentsService_Model_CaptureResult + * + * Properties: + * ","$this->_fields['CaptureDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CaptureResult,withCaptureDetails,"* Construct new OffAmazonPaymentsService_Model_CaptureResult + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setCaptureDetails($value); + return $this;",- +OffAmazonPaymentsService_Model_CaptureResult,isSetCaptureDetails,"* Gets the value of the CaptureDetails. + * + * @return OffAmazonPaymentsService_Model_CaptureDetails CaptureDetails",return !is_null($this->_fields['CaptureDetails']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseAuthorizationRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AmazonAuthorizationId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'ClosureReason' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CloseAuthorizationRequest,getSellerId,* @see OffAmazonPaymentsService_Model,return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseAuthorizationRequest,setSellerId,"* OffAmazonPaymentsService_Model_CloseAuthorizationRequest + * + * Properties: + * ","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CloseAuthorizationRequest,withSellerId,"* Construct new OffAmazonPaymentsService_Model_CloseAuthorizationRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseAuthorizationRequest,isSetSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId",return !is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseAuthorizationRequest,getAmazonAuthorizationId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return $this->_fields['AmazonAuthorizationId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseAuthorizationRequest,setAmazonAuthorizationId,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_CloseAuthorizationRequest instance","$this->_fields['AmazonAuthorizationId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CloseAuthorizationRequest,withAmazonAuthorizationId,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->setAmazonAuthorizationId($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseAuthorizationRequest,isSetAmazonAuthorizationId,"* Gets the value of the AmazonAuthorizationId property. + * + * @return string AmazonAuthorizationId",return !is_null($this->_fields['AmazonAuthorizationId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseAuthorizationRequest,getClosureReason,"* Sets the value of the AmazonAuthorizationId property. + * + * @param string AmazonAuthorizationId + * @return this instance",return $this->_fields['ClosureReason']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseAuthorizationRequest,setClosureReason,"* Sets the value of the AmazonAuthorizationId and returns this instance + * + * @param string $value AmazonAuthorizationId + * @return OffAmazonPaymentsService_Model_CloseAuthorizationRequest instance","$this->_fields['ClosureReason']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CloseAuthorizationRequest,withClosureReason,"* Checks if AmazonAuthorizationId is set + * + * @return bool true if AmazonAuthorizationId is set","$this->setClosureReason($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseAuthorizationRequest,isSetClosureReason,"* Gets the value of the ClosureReason property. + * + * @return string ClosureReason",return !is_null($this->_fields['ClosureReason']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseAuthorizationResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'CloseAuthorizationResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_CloseAuthorizationResult'), + + + 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CloseAuthorizationResponse,getCloseAuthorizationResult,* @see OffAmazonPaymentsService_Model,return $this->_fields['CloseAuthorizationResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseAuthorizationResponse,setCloseAuthorizationResult,"* OffAmazonPaymentsService_Model_CloseAuthorizationResponse + * + * Properties: + * ","$this->_fields['CloseAuthorizationResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CloseAuthorizationResponse,withCloseAuthorizationResult,"* Construct new OffAmazonPaymentsService_Model_CloseAuthorizationResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setCloseAuthorizationResult($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseAuthorizationResponse,isSetCloseAuthorizationResult,"* Construct OffAmazonPaymentsService_Model_CloseAuthorizationResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_CloseAuthorizationResponse",return !is_null($this->_fields['CloseAuthorizationResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseAuthorizationResponse,getResponseMetadata,"* Gets the value of the CloseAuthorizationResult. + * + * @return CloseAuthorizationResult CloseAuthorizationResult",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseAuthorizationResponse,setResponseMetadata,"* Sets the value of the CloseAuthorizationResult. + * + * @param CloseAuthorizationResult CloseAuthorizationResult + * @return void","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CloseAuthorizationResponse,withResponseMetadata,"* Sets the value of the CloseAuthorizationResult and returns this instance + * + * @param CloseAuthorizationResult $value CloseAuthorizationResult + * @return OffAmazonPaymentsService_Model_CloseAuthorizationResponse instance","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseAuthorizationResponse,isSetResponseMetadata,"* Checks if CloseAuthorizationResult is set + * + * @return bool true if CloseAuthorizationResult property is set",return !is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseAuthorizationResponse,toXML,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_CloseAuthorizationResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_CloseAuthorizationResponse,setResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_CloseAuthorizationResponse instance",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_CloseAuthorizationResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + 'AmazonBillingAgreementId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'SellerId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'ClosureReason' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'ReasonCode' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,getAmazonBillingAgreementId,"* OffAmazonPaymentsService_Model_CloseBillingAgreementRequest + * + * Properties: + * ",return $this->_fields['AmazonBillingAgreementId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,setAmazonBillingAgreementId,"* Construct new OffAmazonPaymentsService_Model_CloseBillingAgreementRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,withAmazonBillingAgreementId,"* Gets the value of the AmazonBillingAgreementId property. + * + * @return string AmazonBillingAgreementId","$this->setAmazonBillingAgreementId($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,isSetAmazonBillingAgreementId,"* Sets the value of the AmazonBillingAgreementId property. + * + * @param string AmazonBillingAgreementId + * @return this instance",return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,getSellerId,"* Sets the value of the AmazonBillingAgreementId and returns this instance + * + * @param string $value AmazonBillingAgreementId + * @return OffAmazonPaymentsService_Model_CloseBillingAgreementRequest instance",return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,setSellerId,"* Checks if AmazonBillingAgreementId is set + * + * @return bool true if AmazonBillingAgreementId is set","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,withSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,isSetSellerId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return ! is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,getClosureReason,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_CloseBillingAgreementRequest instance",return $this->_fields['ClosureReason']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,setClosureReason,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->_fields['ClosureReason']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,withClosureReason,"* Gets the value of the ClosureReason property. + * + * @return string ClosureReason","$this->setClosureReason($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,isSetClosureReason,"* Sets the value of the ClosureReason property. + * + * @param string ClosureReason + * @return this instance",return ! is_null($this->_fields['ClosureReason']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,getReasonCode,"* Sets the value of the ClosureReason and returns this instance + * + * @param string $value ClosureReason + * @return OffAmazonPaymentsService_Model_CloseBillingAgreementRequest instance",return $this->_fields['ReasonCode']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,setReasonCode,"* Checks if ClosureReason is set + * + * @return bool true if ClosureReason is set","$this->_fields['ReasonCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,withReasonCode,"* Gets the value of the ReasonCode property. + * + * @return string ReasonCode","$this->setReasonCode($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,isSetReasonCode,"* Sets the value of the ReasonCode property. + * + * @param string ReasonCode + * @return this instance",return ! is_null($this->_fields['ReasonCode']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + + 'CloseBillingAgreementResult' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_CloseBillingAgreementResult' + ), + + 'ResponseMetadata' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,getCloseBillingAgreementResult,"* OffAmazonPaymentsService_Model_CloseBillingAgreementResponse + * + * Properties: + * ",return $this->_fields['CloseBillingAgreementResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,setCloseBillingAgreementResult,"* Construct new OffAmazonPaymentsService_Model_CloseBillingAgreementResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['CloseBillingAgreementResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,withCloseBillingAgreementResult,"* Construct OffAmazonPaymentsService_Model_CloseBillingAgreementResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_CloseBillingAgreementResponse","$this->setCloseBillingAgreementResult($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,isSetCloseBillingAgreementResult,"* Gets the value of the CloseBillingAgreementResult. + * + * @return CloseBillingAgreementResult CloseBillingAgreementResult",return ! is_null($this->_fields['CloseBillingAgreementResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,getResponseMetadata,"* Sets the value of the CloseBillingAgreementResult. + * + * @param CloseBillingAgreementResult CloseBillingAgreementResult + * @return void",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,setResponseMetadata,"* Sets the value of the CloseBillingAgreementResult and returns this instance + * + * @param CloseBillingAgreementResult $value CloseBillingAgreementResult + * @return OffAmazonPaymentsService_Model_CloseBillingAgreementResponse instance","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,withResponseMetadata,"* Checks if CloseBillingAgreementResult is set + * + * @return bool true if CloseBillingAgreementResult property is set","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,isSetResponseMetadata,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata",return ! is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,toXML,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_CloseBillingAgreementResponse instance",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,setResponseHeaderMetadata,"* Checks if ResponseMetadata is set + * + * @return bool true if ResponseMetadata property is set",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_CloseBillingAgreementResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array(); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'ClosureReason' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,getSellerId,* @see OffAmazonPaymentsService_Model,return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,setSellerId,"* OffAmazonPaymentsService_Model_CloseOrderReferenceRequest + * + * Properties: + * ","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,withSellerId,"* Construct new OffAmazonPaymentsService_Model_CloseOrderReferenceRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,isSetSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId",return !is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,getAmazonOrderReferenceId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return $this->_fields['AmazonOrderReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,setAmazonOrderReferenceId,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_CloseOrderReferenceRequest instance","$this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,withAmazonOrderReferenceId,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->setAmazonOrderReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,isSetAmazonOrderReferenceId,"* Gets the value of the AmazonOrderReferenceId property. + * + * @return string AmazonOrderReferenceId",return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,getClosureReason,"* Sets the value of the AmazonOrderReferenceId property. + * + * @param string AmazonOrderReferenceId + * @return this instance",return $this->_fields['ClosureReason']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,setClosureReason,"* Sets the value of the AmazonOrderReferenceId and returns this instance + * + * @param string $value AmazonOrderReferenceId + * @return OffAmazonPaymentsService_Model_CloseOrderReferenceRequest instance","$this->_fields['ClosureReason']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,withClosureReason,"* Checks if AmazonOrderReferenceId is set + * + * @return bool true if AmazonOrderReferenceId is set","$this->setClosureReason($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,isSetClosureReason,"* Gets the value of the ClosureReason property. + * + * @return string ClosureReason",return !is_null($this->_fields['ClosureReason']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'CloseOrderReferenceResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_CloseOrderReferenceResult'), + + + 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,getCloseOrderReferenceResult,* @see OffAmazonPaymentsService_Model,return $this->_fields['CloseOrderReferenceResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,setCloseOrderReferenceResult,"* OffAmazonPaymentsService_Model_CloseOrderReferenceResponse + * + * Properties: + * ","$this->_fields['CloseOrderReferenceResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,withCloseOrderReferenceResult,"* Construct new OffAmazonPaymentsService_Model_CloseOrderReferenceResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setCloseOrderReferenceResult($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,isSetCloseOrderReferenceResult,"* Construct OffAmazonPaymentsService_Model_CloseOrderReferenceResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_CloseOrderReferenceResponse",return !is_null($this->_fields['CloseOrderReferenceResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,getResponseMetadata,"* Gets the value of the CloseOrderReferenceResult. + * + * @return CloseOrderReferenceResult CloseOrderReferenceResult",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,setResponseMetadata,"* Sets the value of the CloseOrderReferenceResult. + * + * @param CloseOrderReferenceResult CloseOrderReferenceResult + * @return void","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,withResponseMetadata,"* Sets the value of the CloseOrderReferenceResult and returns this instance + * + * @param CloseOrderReferenceResult $value CloseOrderReferenceResult + * @return OffAmazonPaymentsService_Model_CloseOrderReferenceResponse instance","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,isSetResponseMetadata,"* Checks if CloseOrderReferenceResult is set + * + * @return bool true if CloseOrderReferenceResult property is set",return !is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,toXML,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,setResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_CloseOrderReferenceResponse instance",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_CloseOrderReferenceResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + 'SellerId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'AmazonBillingAgreementId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,getSellerId,"* OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest + * + * Properties: + * ",return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,setSellerId,"* Construct new OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,withSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,isSetSellerId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return ! is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,getAmazonBillingAgreementId,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest instance",return $this->_fields['AmazonBillingAgreementId']['FieldValue'];,- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,setAmazonBillingAgreementId,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,withAmazonBillingAgreementId,"* Gets the value of the AmazonBillingAgreementId property. + * + * @return string AmazonBillingAgreementId","$this->setAmazonBillingAgreementId($value); + return $this;",- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,isSetAmazonBillingAgreementId,"* Sets the value of the AmazonBillingAgreementId property. + * + * @param string AmazonBillingAgreementId + * @return this instance",return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']);,- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + + 'ConfirmBillingAgreementResult' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_ConfirmBillingAgreementResult' + ), + + 'ResponseMetadata' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,getConfirmBillingAgreementResult,"* OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse + * + * Properties: + * ",return $this->_fields['ConfirmBillingAgreementResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,setConfirmBillingAgreementResult,"* Construct new OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['ConfirmBillingAgreementResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,withConfirmBillingAgreementResult,"* Construct OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse","$this->setConfirmBillingAgreementResult($value); + return $this;",- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,isSetConfirmBillingAgreementResult,"* Gets the value of the ConfirmBillingAgreementResult. + * + * @return ConfirmBillingAgreementResult ConfirmBillingAgreementResult",return ! is_null($this->_fields['ConfirmBillingAgreementResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,getResponseMetadata,"* Sets the value of the ConfirmBillingAgreementResult. + * + * @param ConfirmBillingAgreementResult ConfirmBillingAgreementResult + * @return void",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,setResponseMetadata,"* Sets the value of the ConfirmBillingAgreementResult and returns this instance + * + * @param ConfirmBillingAgreementResult $value ConfirmBillingAgreementResult + * @return OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse instance","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,withResponseMetadata,"* Checks if ConfirmBillingAgreementResult is set + * + * @return bool true if ConfirmBillingAgreementResult property is set","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,isSetResponseMetadata,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata",return ! is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,toXML,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse instance",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,setResponseHeaderMetadata,"* Checks if ResponseMetadata is set + * + * @return bool true if ResponseMetadata property is set",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_ConfirmBillingAgreementResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array(); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,getAmazonOrderReferenceId,* @see OffAmazonPaymentsService_Model,return $this->_fields['AmazonOrderReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,setAmazonOrderReferenceId,"* OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest + * + * Properties: + * ","$this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,withAmazonOrderReferenceId,"* Construct new OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setAmazonOrderReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,isSetAmazonOrderReferenceId,"* Gets the value of the AmazonOrderReferenceId property. + * + * @return string AmazonOrderReferenceId",return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,getSellerId,"* Sets the value of the AmazonOrderReferenceId property. + * + * @param string AmazonOrderReferenceId + * @return this instance",return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,setSellerId,"* Sets the value of the AmazonOrderReferenceId and returns this instance + * + * @param string $value AmazonOrderReferenceId + * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest instance","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,withSellerId,"* Checks if AmazonOrderReferenceId is set + * + * @return bool true if AmazonOrderReferenceId is set","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,isSetSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId",return !is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,getResponseMetadata,* @see OffAmazonPaymentsService_Model,return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,setResponseMetadata,"* OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse + * + * Properties: + * ","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,withResponseMetadata,"* Construct new OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,isSetResponseMetadata,"* Construct OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse",return !is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,toXML,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,setResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse instance",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_Constraint,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'ConstraintID' => array('FieldValue' => null, 'FieldType' => 'string'), + 'Description' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_Constraint,getConstraintID,* @see OffAmazonPaymentsService_Model,return $this->_fields['ConstraintID']['FieldValue'];,- +OffAmazonPaymentsService_Model_Constraint,setConstraintID,"* OffAmazonPaymentsService_Model_Constraint + * + * Properties: + * ","$this->_fields['ConstraintID']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Constraint,withConstraintID,"* Construct new OffAmazonPaymentsService_Model_Constraint + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setConstraintID($value); + return $this;",- +OffAmazonPaymentsService_Model_Constraint,isSetConstraintID,"* Gets the value of the ConstraintID property. + * + * @return string ConstraintID",return !is_null($this->_fields['ConstraintID']['FieldValue']);,- +OffAmazonPaymentsService_Model_Constraint,getDescription,"* Sets the value of the ConstraintID property. + * + * @param string ConstraintID + * @return this instance",return $this->_fields['Description']['FieldValue'];,- +OffAmazonPaymentsService_Model_Constraint,setDescription,"* Sets the value of the ConstraintID and returns this instance + * + * @param string $value ConstraintID + * @return OffAmazonPaymentsService_Model_Constraint instance","$this->_fields['Description']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Constraint,withDescription,"* Checks if ConstraintID is set + * + * @return bool true if ConstraintID is set","$this->setDescription($value); + return $this;",- +OffAmazonPaymentsService_Model_Constraint,isSetDescription,"* Gets the value of the Description property. + * + * @return string Description",return !is_null($this->_fields['Description']['FieldValue']);,- +OffAmazonPaymentsService_Model_Constraints,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'Constraint' => array('FieldValue' => array(), 'FieldType' => array('OffAmazonPaymentsService_Model_Constraint')), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_Constraints,getConstraint,* @see OffAmazonPaymentsService_Model,return $this->_fields['Constraint']['FieldValue'];,- +OffAmazonPaymentsService_Model_Constraints,setConstraint,"* OffAmazonPaymentsService_Model_Constraints + * + * Properties: + * ","if (!$this->_isNumericArray($constraint)) { + $constraint = array ($constraint);",- +OffAmazonPaymentsService_Model_Constraints,withConstraint,"* Construct new OffAmazonPaymentsService_Model_Constraints + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","foreach (func_get_args() as $constraint) { + $this->_fields['Constraint']['FieldValue'][] = $constraint;",- +OffAmazonPaymentsService_Model_Constraints,isSetConstraint,"* Gets the value of the Constraint. + * + * @return array of Constraint Constraint",return count ($this->_fields['Constraint']['FieldValue']) > 0;,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + 'Id' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'SellerId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'IdType' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'InheritShippingAddress' => array( + 'FieldValue' => null, + 'FieldType' => 'bool' + ), + 'ConfirmNow' => array( + 'FieldValue' => null, + 'FieldType' => 'bool' + ), + + 'OrderReferenceAttributes' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceAttributes' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,getId,"* OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest + * + * Properties: + * ",return $this->_fields['Id']['FieldValue'];,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,setId,"* Construct new OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['Id']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,withId,"* Gets the value of the Id property. + * + * @return string Id","$this->setId($value); + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,isSetId,"* Sets the value of the Id property. + * + * @param string Id + * @return this instance",return ! is_null($this->_fields['Id']['FieldValue']);,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,getSellerId,"* Sets the value of the Id and returns this instance + * + * @param string $value Id + * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest instance",return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,setSellerId,"* Checks if Id is set + * + * @return bool true if Id is set","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,withSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,isSetSellerId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return ! is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,getIdType,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest instance",return $this->_fields['IdType']['FieldValue'];,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,setIdType,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->_fields['IdType']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,withIdType,"* Gets the value of the IdType property. + * + * @return string IdType","$this->setIdType($value); + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,isSetIdType,"* Sets the value of the IdType property. + * + * @param string IdType + * @return this instance",return ! is_null($this->_fields['IdType']['FieldValue']);,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,getInheritShippingAddress,"* Sets the value of the IdType and returns this instance + * + * @param string $value IdType + * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest instance",return $this->_fields['InheritShippingAddress']['FieldValue'];,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,setInheritShippingAddress,"* Checks if IdType is set + * + * @return bool true if IdType is set","$this->_fields['InheritShippingAddress']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,withInheritShippingAddress,"* Gets the value of the InheritShippingAddress property. + * + * @return bool InheritShippingAddress","$this->setInheritShippingAddress($value); + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,isSetInheritShippingAddress,"* Sets the value of the InheritShippingAddress property. + * + * @param bool InheritShippingAddress + * @return this instance",return ! is_null($this->_fields['InheritShippingAddress']['FieldValue']);,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,getConfirmNow,"* Sets the value of the InheritShippingAddress and returns this instance + * + * @param bool $value InheritShippingAddress + * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest instance",return $this->_fields['ConfirmNow']['FieldValue'];,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,setConfirmNow,"* Checks if InheritShippingAddress is set + * + * @return bool true if InheritShippingAddress is set","$this->_fields['ConfirmNow']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,withConfirmNow,"* Gets the value of the ConfirmNow property. + * + * @return bool ConfirmNow","$this->setConfirmNow($value); + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,isSetConfirmNow,"* Sets the value of the ConfirmNow property. + * + * @param bool ConfirmNow + * @return this instance",return ! is_null($this->_fields['ConfirmNow']['FieldValue']);,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,getOrderReferenceAttributes,"* Sets the value of the ConfirmNow and returns this instance + * + * @param bool $value ConfirmNow + * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest instance",return $this->_fields['OrderReferenceAttributes']['FieldValue'];,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,setOrderReferenceAttributes,"* Checks if ConfirmNow is set + * + * @return bool true if ConfirmNow is set","$this->_fields['OrderReferenceAttributes']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,withOrderReferenceAttributes,"* Gets the value of the OrderReferenceAttributes. + * + * @return OrderReferenceAttributes OrderReferenceAttributes","$this->setOrderReferenceAttributes($value); + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,isSetOrderReferenceAttributes,"* Sets the value of the OrderReferenceAttributes. + * + * @param OrderReferenceAttributes OrderReferenceAttributes + * @return void",return ! is_null($this->_fields['OrderReferenceAttributes']['FieldValue']);,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + + 'CreateOrderReferenceForIdResult' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult' + ), + + 'ResponseMetadata' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,getCreateOrderReferenceForIdResult,"* OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse + * + * Properties: + * ",return $this->_fields['CreateOrderReferenceForIdResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,setCreateOrderReferenceForIdResult,"* Construct new OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['CreateOrderReferenceForIdResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,withCreateOrderReferenceForIdResult,"* Construct OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse","$this->setCreateOrderReferenceForIdResult($value); + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,isSetCreateOrderReferenceForIdResult,"* Gets the value of the CreateOrderReferenceForIdResult. + * + * @return CreateOrderReferenceForIdResult CreateOrderReferenceForIdResult",return ! is_null($this->_fields['CreateOrderReferenceForIdResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,getResponseMetadata,"* Sets the value of the CreateOrderReferenceForIdResult. + * + * @param CreateOrderReferenceForIdResult CreateOrderReferenceForIdResult + * @return void",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,setResponseMetadata,"* Sets the value of the CreateOrderReferenceForIdResult and returns this instance + * + * @param CreateOrderReferenceForIdResult $value CreateOrderReferenceForIdResult + * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse instance","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,withResponseMetadata,"* Checks if CreateOrderReferenceForIdResult is set + * + * @return bool true if CreateOrderReferenceForIdResult property is set","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,isSetResponseMetadata,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata",return ! is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,toXML,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse instance",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,setResponseHeaderMetadata,"* Checks if ResponseMetadata is set + * + * @return bool true if ResponseMetadata property is set",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + + 'OrderReferenceDetails' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceDetails' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult,getOrderReferenceDetails,"* OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult + * + * Properties: + * ",return $this->_fields['OrderReferenceDetails']['FieldValue'];,- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult,setOrderReferenceDetails,"* Construct new OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['OrderReferenceDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult,withOrderReferenceDetails,"* Gets the value of the OrderReferenceDetails. + * + * @return OrderReferenceDetails OrderReferenceDetails","$this->setOrderReferenceDetails($value); + return $this;",- +OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult,isSetOrderReferenceDetails,"* Sets the value of the OrderReferenceDetails. + * + * @param OrderReferenceDetails OrderReferenceDetails + * @return void",return ! is_null($this->_fields['OrderReferenceDetails']['FieldValue']);,- +OffAmazonPaymentsService_Model_Destination,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'DestinationType' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'PhysicalDestination' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Address'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_Destination,getDestinationType,* @see OffAmazonPaymentsService_Model,return $this->_fields['DestinationType']['FieldValue'];,- +OffAmazonPaymentsService_Model_Destination,setDestinationType,"* OffAmazonPaymentsService_Model_Destination + * + * Properties: + * ","$this->_fields['DestinationType']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Destination,withDestinationType,"* Construct new OffAmazonPaymentsService_Model_Destination + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setDestinationType($value); + return $this;",- +OffAmazonPaymentsService_Model_Destination,isSetDestinationType,"* Gets the value of the DestinationType property. + * + * @return string DestinationType",return !is_null($this->_fields['DestinationType']['FieldValue']);,- +OffAmazonPaymentsService_Model_Destination,getPhysicalDestination,"* Sets the value of the DestinationType property. + * + * @param string DestinationType + * @return this instance",return $this->_fields['PhysicalDestination']['FieldValue'];,- +OffAmazonPaymentsService_Model_Destination,setPhysicalDestination,"* Sets the value of the DestinationType and returns this instance + * + * @param string $value DestinationType + * @return OffAmazonPaymentsService_Model_Destination instance","$this->_fields['PhysicalDestination']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_Destination,withPhysicalDestination,"* Checks if DestinationType is set + * + * @return bool true if DestinationType is set","$this->setPhysicalDestination($value); + return $this;",- +OffAmazonPaymentsService_Model_Destination,isSetPhysicalDestination,"* Gets the value of the PhysicalDestination. + * + * @return OffAmazonPaymentsService_Model_Address PhysicalDestination",return !is_null($this->_fields['PhysicalDestination']['FieldValue']);,- +OffAmazonPaymentsService_Model_Error,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'Type' => array('FieldValue' => null, 'FieldType' => 'string'), + 'Code' => array('FieldValue' => null, 'FieldType' => 'string'), + 'Message' => array('FieldValue' => null, 'FieldType' => 'string'), + 'Detail' => array('FieldValue' => null, 'FieldType' => 'string'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_Error,getType,* @see OffAmazonPaymentsService_Model,return $this->_fields['Type']['FieldValue'];,- +OffAmazonPaymentsService_Model_Error,setType,"* OffAmazonPaymentsService_Model_Error + * + * Properties: + * ","$this->_fields['Type']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Error,withType,"* Construct new OffAmazonPaymentsService_Model_Error + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setType($value); + return $this;",- +OffAmazonPaymentsService_Model_Error,isSetType,"* Gets the value of the Type property. + * + * @return string Type",return !is_null($this->_fields['Type']['FieldValue']);,- +OffAmazonPaymentsService_Model_Error,getCode,"* Sets the value of the Type property. + * + * @param string Type + * @return this instance",return $this->_fields['Code']['FieldValue'];,- +OffAmazonPaymentsService_Model_Error,setCode,"* Sets the value of the Type and returns this instance + * + * @param string $value Type + * @return OffAmazonPaymentsService_Model_Error instance","$this->_fields['Code']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Error,withCode,"* Checks if Type is set + * + * @return bool true if Type is set","$this->setCode($value); + return $this;",- +OffAmazonPaymentsService_Model_Error,isSetCode,"* Gets the value of the Code property. + * + * @return string Code",return !is_null($this->_fields['Code']['FieldValue']);,- +OffAmazonPaymentsService_Model_Error,getMessage,"* Sets the value of the Code property. + * + * @param string Code + * @return this instance",return $this->_fields['Message']['FieldValue'];,- +OffAmazonPaymentsService_Model_Error,setMessage,"* Sets the value of the Code and returns this instance + * + * @param string $value Code + * @return OffAmazonPaymentsService_Model_Error instance","$this->_fields['Message']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Error,withMessage,"* Checks if Code is set + * + * @return bool true if Code is set","$this->setMessage($value); + return $this;",- +OffAmazonPaymentsService_Model_Error,isSetMessage,"* Gets the value of the Message property. + * + * @return string Message",return !is_null($this->_fields['Message']['FieldValue']);,- +OffAmazonPaymentsService_Model_Error,getDetail,"* Sets the value of the Message property. + * + * @param string Message + * @return this instance",return $this->_fields['Detail']['FieldValue'];,- +OffAmazonPaymentsService_Model_Error,setDetail,"* Sets the value of the Message and returns this instance + * + * @param string $value Message + * @return OffAmazonPaymentsService_Model_Error instance","$this->_fields['Detail']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_Error,withDetail,"* Checks if Message is set + * + * @return bool true if Message is set","$this->setDetail($value); + return $this;",- +OffAmazonPaymentsService_Model_Error,isSetDetail,"* Gets the value of the Detail. + * + * @return Error.Detail Detail",return !is_null($this->_fields['Detail']['FieldValue']);,- +OffAmazonPaymentsService_Model_ErrorResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'Error' => array('FieldValue' => array(), 'FieldType' => array('OffAmazonPaymentsService_Model_Error')), + 'RequestId' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_ErrorResponse,getError,* @see OffAmazonPaymentsService_Model,return $this->_fields['Error']['FieldValue'];,- +OffAmazonPaymentsService_Model_ErrorResponse,setError,"* OffAmazonPaymentsService_Model_ErrorResponse + * + * Properties: + * ","if (!$this->_isNumericArray($error)) { + $error = array ($error);",- +OffAmazonPaymentsService_Model_ErrorResponse,withError,"* Construct new OffAmazonPaymentsService_Model_ErrorResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","foreach (func_get_args() as $error) { + $this->_fields['Error']['FieldValue'][] = $error;",- +OffAmazonPaymentsService_Model_ErrorResponse,isSetError,"* Construct OffAmazonPaymentsService_Model_ErrorResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_ErrorResponse",return count ($this->_fields['Error']['FieldValue']) > 0;,- +OffAmazonPaymentsService_Model_ErrorResponse,getRequestId,"* Gets the value of the Error. + * + * @return array of Error Error",return $this->_fields['RequestId']['FieldValue'];,- +OffAmazonPaymentsService_Model_ErrorResponse,setRequestId,"* Sets the value of the Error. + * + * @param mixed Error or an array of Error Error + * @return this instance","$this->_fields['RequestId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_ErrorResponse,withRequestId,"* Sets single or multiple values of Error list via variable number of arguments. + * For example, to set the list with two elements, simply pass two values as arguments to this function + * withError($error1, $error2) + * + * @param Error $errorArgs one or more Error + * @return OffAmazonPaymentsService_Model_ErrorResponse instance","$this->setRequestId($value); + return $this;",- +OffAmazonPaymentsService_Model_ErrorResponse,isSetRequestId,"* Checks if Error list is non-empty + * + * @return bool true if Error list is non-empty",return !is_null($this->_fields['RequestId']['FieldValue']);,- +OffAmazonPaymentsService_Model_ErrorResponse,toXML,"* Gets the value of the RequestId property. + * + * @return string RequestId","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_ErrorResponse,getResponseHeaderMetadata,"* Sets the value of the RequestId property. + * + * @param string RequestId + * @return this instance",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_ErrorResponse,setResponseHeaderMetadata,"* Sets the value of the RequestId and returns this instance + * + * @param string $value RequestId + * @return OffAmazonPaymentsService_Model_ErrorResponse instance",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AmazonAuthorizationId' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,getSellerId,* @see OffAmazonPaymentsService_Model,return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,setSellerId,"* OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest + * + * Properties: + * ","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,withSellerId,"* Construct new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,isSetSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId",return !is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,getAmazonAuthorizationId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return $this->_fields['AmazonAuthorizationId']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,setAmazonAuthorizationId,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest instance","$this->_fields['AmazonAuthorizationId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,withAmazonAuthorizationId,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->setAmazonAuthorizationId($value); + return $this;",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,isSetAmazonAuthorizationId,"* Gets the value of the AmazonAuthorizationId property. + * + * @return string AmazonAuthorizationId",return !is_null($this->_fields['AmazonAuthorizationId']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'GetAuthorizationDetailsResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult'), + + + 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,getGetAuthorizationDetailsResult,* @see OffAmazonPaymentsService_Model,return $this->_fields['GetAuthorizationDetailsResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,setGetAuthorizationDetailsResult,"* OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse + * + * Properties: + * ","$this->_fields['GetAuthorizationDetailsResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,withGetAuthorizationDetailsResult,"* Construct new OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setGetAuthorizationDetailsResult($value); + return $this;",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,isSetGetAuthorizationDetailsResult,"* Construct OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse",return !is_null($this->_fields['GetAuthorizationDetailsResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,getResponseMetadata,"* Gets the value of the GetAuthorizationDetailsResult. + * + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult GetAuthorizationDetailsResult",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,setResponseMetadata,"* Sets the value of the GetAuthorizationDetailsResult. + * + * @param GetAuthorizationDetailsResult GetAuthorizationDetailsResult + * @return void","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,withResponseMetadata,"* Sets the value of the GetAuthorizationDetailsResult and returns this instance + * + * @param GetAuthorizationDetailsResult $value GetAuthorizationDetailsResult + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse instance","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,isSetResponseMetadata,"* Checks if GetAuthorizationDetailsResult is set + * + * @return bool true if GetAuthorizationDetailsResult property is set",return !is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,toXML,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,setResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse instance",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'AuthorizationDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_AuthorizationDetails'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult,getAuthorizationDetails,* @see OffAmazonPaymentsService_Model,return $this->_fields['AuthorizationDetails']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult,setAuthorizationDetails,"* OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult + * + * Properties: + * ","$this->_fields['AuthorizationDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult,withAuthorizationDetails,"* Construct new OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setAuthorizationDetails($value); + return $this;",- +OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult,isSetAuthorizationDetails,"* Gets the value of the AuthorizationDetails. + * + * @return OffAmazonPaymentsService_Model_AuthorizationDetails AuthorizationDetails",return !is_null($this->_fields['AuthorizationDetails']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + 'AmazonBillingAgreementId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'SellerId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'AddressConsentToken' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,getAmazonBillingAgreementId,"* OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest + * + * Properties: + * ",return $this->_fields['AmazonBillingAgreementId']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,setAmazonBillingAgreementId,"* Construct new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,withAmazonBillingAgreementId,"* Gets the value of the AmazonBillingAgreementId property. + * + * @return string AmazonBillingAgreementId","$this->setAmazonBillingAgreementId($value); + return $this;",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,isSetAmazonBillingAgreementId,"* Sets the value of the AmazonBillingAgreementId property. + * + * @param string AmazonBillingAgreementId + * @return this instance",return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,getSellerId,"* Sets the value of the AmazonBillingAgreementId and returns this instance + * + * @param string $value AmazonBillingAgreementId + * @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest instance",return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,setSellerId,"* Checks if AmazonBillingAgreementId is set + * + * @return bool true if AmazonBillingAgreementId is set","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,withSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,isSetSellerId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return ! is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,getAddressConsentToken,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest instance",return $this->_fields['AddressConsentToken']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,setAddressConsentToken,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->_fields['AddressConsentToken']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,withAddressConsentToken,"* Gets the value of the AddressConsentToken property. + * + * @return string AddressConsentToken","$this->setAddressConsentToken($value); + return $this;",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,isSetAddressConsentToken,"* Sets the value of the AddressConsentToken property. + * + * @param string AddressConsentToken + * @return this instance",return ! is_null($this->_fields['AddressConsentToken']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + + 'GetBillingAgreementDetailsResult' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult' + ), + + 'ResponseMetadata' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,getGetBillingAgreementDetailsResult,"* OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse + * + * Properties: + * ",return $this->_fields['GetBillingAgreementDetailsResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,setGetBillingAgreementDetailsResult,"* Construct new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['GetBillingAgreementDetailsResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,withGetBillingAgreementDetailsResult,"* Construct OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse","$this->setGetBillingAgreementDetailsResult($value); + return $this;",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,isSetGetBillingAgreementDetailsResult,"* Gets the value of the GetBillingAgreementDetailsResult. + * + * @return GetBillingAgreementDetailsResult GetBillingAgreementDetailsResult",return ! is_null($this->_fields['GetBillingAgreementDetailsResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,getResponseMetadata,"* Sets the value of the GetBillingAgreementDetailsResult. + * + * @param GetBillingAgreementDetailsResult GetBillingAgreementDetailsResult + * @return void",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,setResponseMetadata,"* Sets the value of the GetBillingAgreementDetailsResult and returns this instance + * + * @param GetBillingAgreementDetailsResult $value GetBillingAgreementDetailsResult + * @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse instance","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,withResponseMetadata,"* Checks if GetBillingAgreementDetailsResult is set + * + * @return bool true if GetBillingAgreementDetailsResult property is set","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,isSetResponseMetadata,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata",return ! is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,toXML,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse instance",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,setResponseHeaderMetadata,"* Checks if ResponseMetadata is set + * + * @return bool true if ResponseMetadata property is set",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + + 'BillingAgreementDetails' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAgreementDetails' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult,getBillingAgreementDetails,"* OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult + * + * Properties: + * ",return $this->_fields['BillingAgreementDetails']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult,setBillingAgreementDetails,"* Construct new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['BillingAgreementDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult,withBillingAgreementDetails,"* Gets the value of the BillingAgreementDetails. + * + * @return BillingAgreementDetails BillingAgreementDetails","$this->setBillingAgreementDetails($value); + return $this;",- +OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult,isSetBillingAgreementDetails,"* Sets the value of the BillingAgreementDetails. + * + * @param BillingAgreementDetails BillingAgreementDetails + * @return void",return ! is_null($this->_fields['BillingAgreementDetails']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AmazonCaptureId' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,getSellerId,* @see OffAmazonPaymentsService_Model,return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,setSellerId,"* OffAmazonPaymentsService_Model_GetCaptureDetailsRequest + * + * Properties: + * ","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,withSellerId,"* Construct new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,isSetSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId",return !is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,getAmazonCaptureId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return $this->_fields['AmazonCaptureId']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,setAmazonCaptureId,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_GetCaptureDetailsRequest instance","$this->_fields['AmazonCaptureId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,withAmazonCaptureId,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->setAmazonCaptureId($value); + return $this;",- +OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,isSetAmazonCaptureId,"* Gets the value of the AmazonCaptureId property. + * + * @return string AmazonCaptureId",return !is_null($this->_fields['AmazonCaptureId']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'GetCaptureDetailsResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_GetCaptureDetailsResult'), + + + 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,getGetCaptureDetailsResult,* @see OffAmazonPaymentsService_Model,return $this->_fields['GetCaptureDetailsResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,setGetCaptureDetailsResult,"* OffAmazonPaymentsService_Model_GetCaptureDetailsResponse + * + * Properties: + * ","$this->_fields['GetCaptureDetailsResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,withGetCaptureDetailsResult,"* Construct new OffAmazonPaymentsService_Model_GetCaptureDetailsResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setGetCaptureDetailsResult($value); + return $this;",- +OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,isSetGetCaptureDetailsResult,"* Construct OffAmazonPaymentsService_Model_GetCaptureDetailsResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse",return !is_null($this->_fields['GetCaptureDetailsResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,getResponseMetadata,"* Gets the value of the GetCaptureDetailsResult. + * + * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResult GetCaptureDetailsResult",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,setResponseMetadata,"* Sets the value of the GetCaptureDetailsResult. + * + * @param GetCaptureDetailsResult GetCaptureDetailsResult + * @return void","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,withResponseMetadata,"* Sets the value of the GetCaptureDetailsResult and returns this instance + * + * @param GetCaptureDetailsResult $value GetCaptureDetailsResult + * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse instance","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,isSetResponseMetadata,"* Checks if GetCaptureDetailsResult is set + * + * @return bool true if GetCaptureDetailsResult property is set",return !is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,toXML,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,setResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse instance",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_GetCaptureDetailsResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'CaptureDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_CaptureDetails'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetCaptureDetailsResult,getCaptureDetails,* @see OffAmazonPaymentsService_Model,return $this->_fields['CaptureDetails']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetCaptureDetailsResult,setCaptureDetails,"* OffAmazonPaymentsService_Model_GetCaptureDetailsResult + * + * Properties: + * ","$this->_fields['CaptureDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetCaptureDetailsResult,withCaptureDetails,"* Construct new OffAmazonPaymentsService_Model_GetCaptureDetailsResult + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setCaptureDetails($value); + return $this;",- +OffAmazonPaymentsService_Model_GetCaptureDetailsResult,isSetCaptureDetails,"* Gets the value of the CaptureDetails. + * + * @return CaptureDetails CaptureDetails",return !is_null($this->_fields['CaptureDetails']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AddressConsentToken' => array('FieldValue' => null, 'FieldType' => 'string') + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,getAmazonOrderReferenceId,* @see OffAmazonPaymentsService_Model,return $this->_fields['AmazonOrderReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,setAmazonOrderReferenceId,"* OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest + * + * Properties: + * ","$this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,withAmazonOrderReferenceId,"* Construct new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setAmazonOrderReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,isSetAmazonOrderReferenceId,"* Gets the value of the AmazonOrderReferenceId property. + * + * @return string AmazonOrderReferenceId",return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,getSellerId,"* Sets the value of the AmazonOrderReferenceId property. + * + * @param string AmazonOrderReferenceId + * @return this instance",return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,setSellerId,"* Sets the value of the AmazonOrderReferenceId and returns this instance + * + * @param string $value AmazonOrderReferenceId + * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest instance","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,withSellerId,"* Checks if AmazonOrderReferenceId is set + * + * @return bool true if AmazonOrderReferenceId is set","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,isSetSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId",return !is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,getAddressConsentToken,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return $this->_fields['AddressConsentToken']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,setAddressConsentToken,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest instance","$this->_fields['AddressConsentToken']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,withAddressConsentToken,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->setAddressConsentToken($value); + return $this;",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,isSetAddressConsentToken,"* Gets the value of the AddressConsentToken property. + * + * @return string AddressConsentToken",return !is_null($this->_fields['AddressConsentToken']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'GetOrderReferenceDetailsResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult'), + + + 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,getGetOrderReferenceDetailsResult,* @see OffAmazonPaymentsService_Model,return $this->_fields['GetOrderReferenceDetailsResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,setGetOrderReferenceDetailsResult,"* OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse + * + * Properties: + * ","$this->_fields['GetOrderReferenceDetailsResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,withGetOrderReferenceDetailsResult,"* Construct new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setGetOrderReferenceDetailsResult($value); + return $this;",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,isSetGetOrderReferenceDetailsResult,"* Construct OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse",return !is_null($this->_fields['GetOrderReferenceDetailsResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,getResponseMetadata,"* Gets the value of the GetOrderReferenceDetailsResult. + * + * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult GetOrderReferenceDetailsResult",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,setResponseMetadata,"* Sets the value of the GetOrderReferenceDetailsResult. + * + * @param GetOrderReferenceDetailsResult GetOrderReferenceDetailsResult + * @return void","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,withResponseMetadata,"* Sets the value of the GetOrderReferenceDetailsResult and returns this instance + * + * @param GetOrderReferenceDetailsResult $value GetOrderReferenceDetailsResult + * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse instance","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,isSetResponseMetadata,"* Checks if GetOrderReferenceDetailsResult is set + * + * @return bool true if GetOrderReferenceDetailsResult property is set",return !is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,toXML,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,setResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse instance",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'OrderReferenceDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceDetails'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult,getOrderReferenceDetails,* @see OffAmazonPaymentsService_Model,return $this->_fields['OrderReferenceDetails']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult,setOrderReferenceDetails,"* OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult + * + * Properties: + * ","$this->_fields['OrderReferenceDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult,withOrderReferenceDetails,"* Construct new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setOrderReferenceDetails($value); + return $this;",- +OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult,isSetOrderReferenceDetails,"* Gets the value of the OrderReferenceDetails. + * + * @return OffAmazonPaymentsService_Model_OrderReferenceDetails OrderReferenceDetails",return !is_null($this->_fields['OrderReferenceDetails']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetRefundDetailsRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AmazonRefundId' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetRefundDetailsRequest,getSellerId,* @see OffAmazonPaymentsService_Model,return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetRefundDetailsRequest,setSellerId,"* OffAmazonPaymentsService_Model_GetRefundDetailsRequest + * + * Properties: + * ","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_GetRefundDetailsRequest,withSellerId,"* Construct new OffAmazonPaymentsService_Model_GetRefundDetailsRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_GetRefundDetailsRequest,isSetSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId",return !is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetRefundDetailsRequest,getAmazonRefundId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return $this->_fields['AmazonRefundId']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetRefundDetailsRequest,setAmazonRefundId,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_GetRefundDetailsRequest instance","$this->_fields['AmazonRefundId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_GetRefundDetailsRequest,withAmazonRefundId,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->setAmazonRefundId($value); + return $this;",- +OffAmazonPaymentsService_Model_GetRefundDetailsRequest,isSetAmazonRefundId,"* Gets the value of the AmazonRefundId property. + * + * @return string AmazonRefundId",return !is_null($this->_fields['AmazonRefundId']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetRefundDetailsResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'GetRefundDetailsResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_GetRefundDetailsResult'), + + + 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetRefundDetailsResponse,getGetRefundDetailsResult,* @see OffAmazonPaymentsService_Model,return $this->_fields['GetRefundDetailsResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetRefundDetailsResponse,setGetRefundDetailsResult,"* OffAmazonPaymentsService_Model_GetRefundDetailsResponse + * + * Properties: + * ","$this->_fields['GetRefundDetailsResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetRefundDetailsResponse,withGetRefundDetailsResult,"* Construct new OffAmazonPaymentsService_Model_GetRefundDetailsResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setGetRefundDetailsResult($value); + return $this;",- +OffAmazonPaymentsService_Model_GetRefundDetailsResponse,isSetGetRefundDetailsResult,"* Construct OffAmazonPaymentsService_Model_GetRefundDetailsResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_GetRefundDetailsResponse",return !is_null($this->_fields['GetRefundDetailsResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetRefundDetailsResponse,getResponseMetadata,"* Gets the value of the GetRefundDetailsResult. + * + * @return OffAmazonPaymentsService_Model_GetRefundDetailsResult GetRefundDetailsResult",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetRefundDetailsResponse,setResponseMetadata,"* Sets the value of the GetRefundDetailsResult. + * + * @param GetRefundDetailsResult GetRefundDetailsResult + * @return void","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetRefundDetailsResponse,withResponseMetadata,"* Sets the value of the GetRefundDetailsResult and returns this instance + * + * @param GetRefundDetailsResult $value GetRefundDetailsResult + * @return OffAmazonPaymentsService_Model_GetRefundDetailsResponse instance","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_GetRefundDetailsResponse,isSetResponseMetadata,"* Checks if GetRefundDetailsResult is set + * + * @return bool true if GetRefundDetailsResult property is set",return !is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_GetRefundDetailsResponse,toXML,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_GetRefundDetailsResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_GetRefundDetailsResponse,setResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_GetRefundDetailsResponse instance",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_GetRefundDetailsResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'RefundDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_RefundDetails'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_GetRefundDetailsResult,getRefundDetails,* @see OffAmazonPaymentsService_Model,return $this->_fields['RefundDetails']['FieldValue'];,- +OffAmazonPaymentsService_Model_GetRefundDetailsResult,setRefundDetails,"* OffAmazonPaymentsService_Model_GetRefundDetailsResult + * + * Properties: + * ","$this->_fields['RefundDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_GetRefundDetailsResult,withRefundDetails,"* Construct new OffAmazonPaymentsService_Model_GetRefundDetailsResult + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setRefundDetails($value); + return $this;",- +OffAmazonPaymentsService_Model_GetRefundDetailsResult,isSetRefundDetails,"* Gets the value of the RefundDetails. + * + * @return RefundDetails RefundDetails",return !is_null($this->_fields['RefundDetails']['FieldValue']);,- +OffAmazonPaymentsService_Model_IdList,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'member' => array('FieldValue' => array(), 'FieldType' => array('string')), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_IdList,getmember,* @see OffAmazonPaymentsService_Model,return $this->_fields['member']['FieldValue'];,- +OffAmazonPaymentsService_Model_IdList,setmember,"* OffAmazonPaymentsService_Model_IdList + * + * Properties: + * ","if (!$this->_isNumericArray($member)) { + $member = array ($member);",- +OffAmazonPaymentsService_Model_IdList,withmember,"* Construct new OffAmazonPaymentsService_Model_IdList + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","foreach (func_get_args() as $member) { + $this->_fields['member']['FieldValue'][] = $member;",- +OffAmazonPaymentsService_Model_IdList,isSetmember,"* Gets the value of the member . + * + * @return array of string member",return count ($this->_fields['member']['FieldValue']) > 0;,- +OffAmazonPaymentsService_Model_OrderItemCategories,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'OrderItemCategory' => array('FieldValue' => array(), 'FieldType' => array('string')), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_OrderItemCategories,getOrderItemCategory,* @see OffAmazonPaymentsService_Model,return $this->_fields['OrderItemCategory']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderItemCategories,setOrderItemCategory,"* OffAmazonPaymentsService_Model_OrderItemCategories + * + * Properties: + * ","if (!$this->_isNumericArray($orderItemCategory)) { + $orderItemCategory = array ($orderItemCategory);",- +OffAmazonPaymentsService_Model_OrderItemCategories,withOrderItemCategory,"* Construct new OffAmazonPaymentsService_Model_OrderItemCategories + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","foreach (func_get_args() as $orderItemCategory) { + $this->_fields['OrderItemCategory']['FieldValue'][] = $orderItemCategory;",- +OffAmazonPaymentsService_Model_OrderItemCategories,isSetOrderItemCategory,"* Gets the value of the OrderItemCategory . + * + * @return array of string OrderItemCategory",return count ($this->_fields['OrderItemCategory']['FieldValue']) > 0;,- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'OrderTotal' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderTotal'), + + 'PlatformId' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'SellerNote' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'SellerOrderAttributes' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_SellerOrderAttributes'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,getOrderTotal,* @see OffAmazonPaymentsService_Model,return $this->_fields['OrderTotal']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,setOrderTotal,"* OffAmazonPaymentsService_Model_OrderReferenceAttributes + * + * Properties: + * ","$this->_fields['OrderTotal']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,withOrderTotal,"* Construct new OffAmazonPaymentsService_Model_OrderReferenceAttributes + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setOrderTotal($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,isSetOrderTotal,"* Gets the value of the OrderTotal. + * + * @return OffAmazonPaymentsService_Model_OrderTotal OrderTotal",return !is_null($this->_fields['OrderTotal']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,getPlatformId,"* Sets the value of the OrderTotal. + * + * @param OrderTotal OrderTotal + * @return void",return $this->_fields['PlatformId']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,setPlatformId,"* Sets the value of the OrderTotal and returns this instance + * + * @param OrderTotal $value OrderTotal + * @return OffAmazonPaymentsService_Model_OrderReferenceAttributes instance","$this->_fields['PlatformId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,withPlatformId,"* Checks if OrderTotal is set + * + * @return bool true if OrderTotal property is set","$this->setPlatformId($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,isSetPlatformId,"* Gets the value of the PlatformId property. + * + * @return string PlatformId",return !is_null($this->_fields['PlatformId']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,getSellerNote,"* Sets the value of the PlatformId property. + * + * @param string PlatformId + * @return this instance",return $this->_fields['SellerNote']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,setSellerNote,"* Sets the value of the PlatformId and returns this instance + * + * @param string $value PlatformId + * @return OffAmazonPaymentsService_Model_OrderReferenceAttributes instance","$this->_fields['SellerNote']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,withSellerNote,"* Checks if PlatformId is set + * + * @return bool true if PlatformId is set","$this->setSellerNote($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,isSetSellerNote,"* Gets the value of the SellerNote property. + * + * @return string SellerNote",return !is_null($this->_fields['SellerNote']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,getSellerOrderAttributes,"* Sets the value of the SellerNote property. + * + * @param string SellerNote + * @return this instance",return $this->_fields['SellerOrderAttributes']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,setSellerOrderAttributes,"* Sets the value of the SellerNote and returns this instance + * + * @param string $value SellerNote + * @return OffAmazonPaymentsService_Model_OrderReferenceAttributes instance","$this->_fields['SellerOrderAttributes']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,withSellerOrderAttributes,"* Checks if SellerNote is set + * + * @return bool true if SellerNote is set","$this->setSellerOrderAttributes($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceAttributes,isSetSellerOrderAttributes,"* Gets the value of the SellerOrderAttributes. + * + * @return OffAmazonPaymentsService_Model_SellerOrderAttributes SellerOrderAttributes",return !is_null($this->_fields['SellerOrderAttributes']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'Buyer' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Buyer'), + + + 'OrderTotal' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderTotal'), + + 'SellerNote' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'PlatformId' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'Destination' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Destination'), + + 'ReleaseEnvironment' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'SellerOrderAttributes' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_SellerOrderAttributes'), + + + 'OrderReferenceStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceStatus'), + + + 'Constraints' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Constraints'), + + 'CreationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), + 'ExpirationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,getAmazonOrderReferenceId,* @see OffAmazonPaymentsService_Model,return $this->_fields['AmazonOrderReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,setAmazonOrderReferenceId,"* OffAmazonPaymentsService_Model_OrderReferenceDetails + * + * Properties: + * ","$this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,withAmazonOrderReferenceId,"* Construct new OffAmazonPaymentsService_Model_OrderReferenceDetails + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setAmazonOrderReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,isSetAmazonOrderReferenceId,"* Gets the value of the AmazonOrderReferenceId property. + * + * @return string AmazonOrderReferenceId",return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,getBuyer,"* Sets the value of the AmazonOrderReferenceId property. + * + * @param string AmazonOrderReferenceId + * @return this instance",return $this->_fields['Buyer']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,setBuyer,"* Sets the value of the AmazonOrderReferenceId and returns this instance + * + * @param string $value AmazonOrderReferenceId + * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","$this->_fields['Buyer']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,withBuyer,"* Checks if AmazonOrderReferenceId is set + * + * @return bool true if AmazonOrderReferenceId is set","$this->setBuyer($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,isSetBuyer,"* Gets the value of the Buyer. + * + * @return OffAmazonPaymentsService_Model_Buyer Buyer",return !is_null($this->_fields['Buyer']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,getOrderTotal,"* Sets the value of the Buyer. + * + * @param Buyer Buyer + * @return void",return $this->_fields['OrderTotal']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,setOrderTotal,"* Sets the value of the Buyer and returns this instance + * + * @param Buyer $value Buyer + * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","$this->_fields['OrderTotal']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,withOrderTotal,"* Checks if Buyer is set + * + * @return bool true if Buyer property is set","$this->setOrderTotal($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,isSetOrderTotal,"* Gets the value of the OrderTotal. + * + * @return OrderTotal OrderTotal",return !is_null($this->_fields['OrderTotal']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,getSellerNote,"* Sets the value of the OrderTotal. + * + * @param OrderTotal OrderTotal + * @return void",return $this->_fields['SellerNote']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,setSellerNote,"* Sets the value of the OrderTotal and returns this instance + * + * @param OrderTotal $value OrderTotal + * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","$this->_fields['SellerNote']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,withSellerNote,"* Checks if OrderTotal is set + * + * @return bool true if OrderTotal property is set","$this->setSellerNote($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,isSetSellerNote,"* Gets the value of the SellerNote property. + * + * @return string SellerNote",return !is_null($this->_fields['SellerNote']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,getPlatformId,"* Sets the value of the SellerNote property. + * + * @param string SellerNote + * @return this instance",return $this->_fields['PlatformId']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,setPlatformId,"* Sets the value of the SellerNote and returns this instance + * + * @param string $value SellerNote + * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","$this->_fields['PlatformId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,withPlatformId,"* Checks if SellerNote is set + * + * @return bool true if SellerNote is set","$this->setPlatformId($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,isSetPlatformId,"* Gets the value of the PlatformId property. + * + * @return string PlatformId",return !is_null($this->_fields['PlatformId']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,getDestination,"* Sets the value of the PlatformId property. + * + * @param string PlatformId + * @return this instance",return $this->_fields['Destination']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,setDestination,"* Sets the value of the PlatformId and returns this instance + * + * @param string $value PlatformId + * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","$this->_fields['Destination']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,withDestination,"* Checks if PlatformId is set + * + * @return bool true if PlatformId is set","$this->setDestination($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,isSetDestination,"* Gets the value of the Destination. + * + * @return OffAmazonPaymentsService_Model_Destination Destination",return !is_null($this->_fields['Destination']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,getReleaseEnvironment,"* Sets the value of the Destination. + * + * @param Destination Destination + * @return void",return $this->_fields['ReleaseEnvironment']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,setReleaseEnvironment,"* Sets the value of the Destination and returns this instance + * + * @param Destination $value Destination + * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","$this->_fields['ReleaseEnvironment']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,withReleaseEnvironment,"* Checks if Destination is set + * + * @return bool true if Destination property is set","$this->setReleaseEnvironment($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,isSetReleaseEnvironment,"* Gets the value of the ReleaseEnvironment property. + * + * @return string ReleaseEnvironment",return !is_null($this->_fields['ReleaseEnvironment']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,getSellerOrderAttributes,"* Sets the value of the ReleaseEnvironment property. + * + * @param string ReleaseEnvironment + * @return this instance",return $this->_fields['SellerOrderAttributes']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,setSellerOrderAttributes,"* Sets the value of the ReleaseEnvironment and returns this instance + * + * @param string $value ReleaseEnvironment + * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","$this->_fields['SellerOrderAttributes']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,withSellerOrderAttributes,"* Checks if ReleaseEnvironment is set + * + * @return bool true if ReleaseEnvironment is set","$this->setSellerOrderAttributes($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,isSetSellerOrderAttributes,"* Gets the value of the SellerOrderAttributes. + * + * @return SellerOrderAttributes SellerOrderAttributes",return !is_null($this->_fields['SellerOrderAttributes']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,getOrderReferenceStatus,"* Sets the value of the SellerOrderAttributes. + * + * @param SellerOrderAttributes SellerOrderAttributes + * @return void",return $this->_fields['OrderReferenceStatus']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,setOrderReferenceStatus,"* Sets the value of the SellerOrderAttributes and returns this instance + * + * @param SellerOrderAttributes $value SellerOrderAttributes + * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","$this->_fields['OrderReferenceStatus']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,withOrderReferenceStatus,"* Checks if SellerOrderAttributes is set + * + * @return bool true if SellerOrderAttributes property is set","$this->setOrderReferenceStatus($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,isSetOrderReferenceStatus,"* Gets the value of the OrderReferenceStatus. + * + * @return OrderReferenceStatus OrderReferenceStatus",return !is_null($this->_fields['OrderReferenceStatus']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,getConstraints,"* Sets the value of the OrderReferenceStatus. + * + * @param OrderReferenceStatus OrderReferenceStatus + * @return void",return $this->_fields['Constraints']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,setConstraints,"* Sets the value of the OrderReferenceStatus and returns this instance + * + * @param OrderReferenceStatus $value OrderReferenceStatus + * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","$this->_fields['Constraints']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,withConstraints,"* Checks if OrderReferenceStatus is set + * + * @return bool true if OrderReferenceStatus property is set","$this->setConstraints($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,isSetConstraints,"* Gets the value of the Constraints. + * + * @return OffAmazonPaymentsService_Model_Constraints Constraints",return !is_null($this->_fields['Constraints']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,getCreationTimestamp,"* Sets the value of the Constraints. + * + * @param Constraints Constraints + * @return void",return $this->_fields['CreationTimestamp']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,setCreationTimestamp,"* Sets the value of the Constraints and returns this instance + * + * @param Constraints $value Constraints + * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","$this->_fields['CreationTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,withCreationTimestamp,"* Checks if Constraints is set + * + * @return bool true if Constraints property is set","$this->setCreationTimestamp($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,isSetCreationTimestamp,"* Gets the value of the CreationTimestamp property. + * + * @return string CreationTimestamp",return !is_null($this->_fields['CreationTimestamp']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,getExpirationTimestamp,"* Sets the value of the CreationTimestamp property. + * + * @param string CreationTimestamp + * @return this instance",return $this->_fields['ExpirationTimestamp']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceDetails,setExpirationTimestamp,"* Sets the value of the CreationTimestamp and returns this instance + * + * @param string $value CreationTimestamp + * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","$this->_fields['ExpirationTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,withExpirationTimestamp,"* Checks if CreationTimestamp is set + * + * @return bool true if CreationTimestamp is set","$this->setExpirationTimestamp($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceDetails,isSetExpirationTimestamp,"* Gets the value of the ExpirationTimestamp property. + * + * @return string ExpirationTimestamp",return !is_null($this->_fields['ExpirationTimestamp']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceStatus,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'State' => array('FieldValue' => null, 'FieldType' => 'string'), + 'LastUpdateTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), + 'ReasonCode' => array('FieldValue' => null, 'FieldType' => 'string'), + 'ReasonDescription' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_OrderReferenceStatus,getState,* @see OffAmazonPaymentsService_Model,return $this->_fields['State']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceStatus,setState,"* OffAmazonPaymentsService_Model_OrderReferenceStatus + * + * Properties: + * ","$this->_fields['State']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceStatus,withState,"* Construct new OffAmazonPaymentsService_Model_OrderReferenceStatus + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setState($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceStatus,isSetState,"* Gets the value of the State property. + * + * @return string State",return !is_null($this->_fields['State']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceStatus,getLastUpdateTimestamp,"* Sets the value of the State property. + * + * @param string State + * @return this instance",return $this->_fields['LastUpdateTimestamp']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceStatus,setLastUpdateTimestamp,"* Sets the value of the State and returns this instance + * + * @param string $value State + * @return OffAmazonPaymentsService_Model_OrderReferenceStatus instance","$this->_fields['LastUpdateTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceStatus,withLastUpdateTimestamp,"* Checks if State is set + * + * @return bool true if State is set","$this->setLastUpdateTimestamp($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceStatus,isSetLastUpdateTimestamp,"* Gets the value of the LastUpdateTimestamp property. + * + * @return string LastUpdateTimestamp",return !is_null($this->_fields['LastUpdateTimestamp']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceStatus,getReasonCode,"* Sets the value of the LastUpdateTimestamp property. + * + * @param string LastUpdateTimestamp + * @return this instance",return $this->_fields['ReasonCode']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceStatus,setReasonCode,"* Sets the value of the LastUpdateTimestamp and returns this instance + * + * @param string $value LastUpdateTimestamp + * @return OffAmazonPaymentsService_Model_OrderReferenceStatus instance","$this->_fields['ReasonCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceStatus,withReasonCode,"* Checks if LastUpdateTimestamp is set + * + * @return bool true if LastUpdateTimestamp is set","$this->setReasonCode($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceStatus,isSetReasonCode,"* Gets the value of the ReasonCode property. + * + * @return string ReasonCode",return !is_null($this->_fields['ReasonCode']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderReferenceStatus,getReasonDescription,"* Sets the value of the ReasonCode property. + * + * @param string ReasonCode + * @return this instance",return $this->_fields['ReasonDescription']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderReferenceStatus,setReasonDescription,"* Sets the value of the ReasonCode and returns this instance + * + * @param string $value ReasonCode + * @return OffAmazonPaymentsService_Model_OrderReferenceStatus instance","$this->_fields['ReasonDescription']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceStatus,withReasonDescription,"* Checks if ReasonCode is set + * + * @return bool true if ReasonCode is set","$this->setReasonDescription($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderReferenceStatus,isSetReasonDescription,"* Gets the value of the ReasonDescription property. + * + * @return string ReasonDescription",return !is_null($this->_fields['ReasonDescription']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderTotal,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'CurrencyCode' => array('FieldValue' => null, 'FieldType' => 'string'), + 'Amount' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_OrderTotal,getCurrencyCode,* @see OffAmazonPaymentsService_Model,return $this->_fields['CurrencyCode']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderTotal,setCurrencyCode,"* OffAmazonPaymentsService_Model_OrderTotal + * + * Properties: + * ","$this->_fields['CurrencyCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderTotal,withCurrencyCode,"* Construct new OffAmazonPaymentsService_Model_OrderTotal + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setCurrencyCode($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderTotal,isSetCurrencyCode,"* Gets the value of the CurrencyCode property. + * + * @return string CurrencyCode",return !is_null($this->_fields['CurrencyCode']['FieldValue']);,- +OffAmazonPaymentsService_Model_OrderTotal,getAmount,"* Sets the value of the CurrencyCode property. + * + * @param string CurrencyCode + * @return this instance",return $this->_fields['Amount']['FieldValue'];,- +OffAmazonPaymentsService_Model_OrderTotal,setAmount,"* Sets the value of the CurrencyCode and returns this instance + * + * @param string $value CurrencyCode + * @return OffAmazonPaymentsService_Model_OrderTotal instance","$this->_fields['Amount']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_OrderTotal,withAmount,"* Checks if CurrencyCode is set + * + * @return bool true if CurrencyCode is set","$this->setAmount($value); + return $this;",- +OffAmazonPaymentsService_Model_OrderTotal,isSetAmount,"* Gets the value of the Amount property. + * + * @return string Amount",return !is_null($this->_fields['Amount']['FieldValue']);,- +OffAmazonPaymentsService_Model_Price,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'Amount' => array('FieldValue' => null, 'FieldType' => 'string'), + 'CurrencyCode' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_Price,getAmount,* @see OffAmazonPaymentsService_Model,return $this->_fields['Amount']['FieldValue'];,- +OffAmazonPaymentsService_Model_Price,setAmount,"* OffAmazonPaymentsService_Model_Price + * + * Properties: + * ","$this->_fields['Amount']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Price,withAmount,"* Construct new OffAmazonPaymentsService_Model_Price + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setAmount($value); + return $this;",- +OffAmazonPaymentsService_Model_Price,isSetAmount,"* Gets the value of the Amount property. + * + * @return float Amount",return !is_null($this->_fields['Amount']['FieldValue']);,- +OffAmazonPaymentsService_Model_Price,getCurrencyCode,"* Sets the value of the Amount property. + * + * @param string Amount + * @return this instance",return $this->_fields['CurrencyCode']['FieldValue'];,- +OffAmazonPaymentsService_Model_Price,setCurrencyCode,"* Sets the value of the Amount and returns this instance + * + * @param string $value Amount + * @return OffAmazonPaymentsService_Model_Price instance","$this->_fields['CurrencyCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Price,withCurrencyCode,"* Checks if Amount is set + * + * @return bool true if Amount is set","$this->setCurrencyCode($value); + return $this;",- +OffAmazonPaymentsService_Model_Price,isSetCurrencyCode,"* Gets the value of the CurrencyCode property. + * + * @return string CurrencyCode",return !is_null($this->_fields['CurrencyCode']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundDetails,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'AmazonRefundId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'RefundReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'SellerRefundNote' => array('FieldValue' => null, 'FieldType' => 'string'), + 'RefundType' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'RefundAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), + + + 'FeeRefunded' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), + + 'CreationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'RefundStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Status'), + + 'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_RefundDetails,getAmazonRefundId,* @see OffAmazonPaymentsService_Model,return $this->_fields['AmazonRefundId']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundDetails,setAmazonRefundId,"* OffAmazonPaymentsService_Model_RefundDetails + * + * Properties: + * ","$this->_fields['AmazonRefundId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,withAmazonRefundId,"* Construct new OffAmazonPaymentsService_Model_RefundDetails + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setAmazonRefundId($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,isSetAmazonRefundId,"* Gets the value of the AmazonRefundId property. + * + * @return string AmazonRefundId",return !is_null($this->_fields['AmazonRefundId']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundDetails,getRefundReferenceId,"* Sets the value of the AmazonRefundId property. + * + * @param string AmazonRefundId + * @return this instance",return $this->_fields['RefundReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundDetails,setRefundReferenceId,"* Sets the value of the AmazonRefundId and returns this instance + * + * @param string $value AmazonRefundId + * @return OffAmazonPaymentsService_Model_RefundDetails instance","$this->_fields['RefundReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,withRefundReferenceId,"* Checks if AmazonRefundId is set + * + * @return bool true if AmazonRefundId is set","$this->setRefundReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,isSetRefundReferenceId,"* Gets the value of the RefundReferenceId property. + * + * @return string RefundReferenceId",return !is_null($this->_fields['RefundReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundDetails,getSellerRefundNote,"* Sets the value of the RefundReferenceId property. + * + * @param string RefundReferenceId + * @return this instance",return $this->_fields['SellerRefundNote']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundDetails,setSellerRefundNote,"* Sets the value of the RefundReferenceId and returns this instance + * + * @param string $value RefundReferenceId + * @return OffAmazonPaymentsService_Model_RefundDetails instance","$this->_fields['SellerRefundNote']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,withSellerRefundNote,"* Checks if RefundReferenceId is set + * + * @return bool true if RefundReferenceId is set","$this->setSellerRefundNote($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,isSetSellerRefundNote,"* Gets the value of the SellerRefundNote property. + * + * @return string SellerRefundNote",return !is_null($this->_fields['SellerRefundNote']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundDetails,getRefundType,"* Sets the value of the SellerRefundNote property. + * + * @param string SellerRefundNote + * @return this instance",return $this->_fields['RefundType']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundDetails,setRefundType,"* Sets the value of the SellerRefundNote and returns this instance + * + * @param string $value SellerRefundNote + * @return OffAmazonPaymentsService_Model_RefundDetails instance","$this->_fields['RefundType']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,withRefundType,"* Checks if SellerRefundNote is set + * + * @return bool true if SellerRefundNote is set","$this->setRefundType($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,isSetRefundType,"* Gets the value of the RefundType property. + * + * @return string RefundType",return !is_null($this->_fields['RefundType']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundDetails,getRefundAmount,"* Sets the value of the RefundType property. + * + * @param string RefundType + * @return this instance",return $this->_fields['RefundAmount']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundDetails,setRefundAmount,"* Sets the value of the RefundType and returns this instance + * + * @param string $value RefundType + * @return OffAmazonPaymentsService_Model_RefundDetails instance","$this->_fields['RefundAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_RefundDetails,withRefundAmount,"* Checks if RefundType is set + * + * @return bool true if RefundType is set","$this->setRefundAmount($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,isSetRefundAmount,"* Gets the value of the RefundAmount. + * + * @return OffAmazonPaymentsService_Model_Price RefundAmount",return !is_null($this->_fields['RefundAmount']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundDetails,getFeeRefunded,"* Sets the value of the RefundAmount. + * + * @param Price RefundAmount + * @return void",return $this->_fields['FeeRefunded']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundDetails,setFeeRefunded,"* Sets the value of the RefundAmount and returns this instance + * + * @param Price $value RefundAmount + * @return OffAmazonPaymentsService_Model_RefundDetails instance","$this->_fields['FeeRefunded']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_RefundDetails,withFeeRefunded,"* Checks if RefundAmount is set + * + * @return bool true if RefundAmount property is set","$this->setFeeRefunded($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,isSetFeeRefunded,"* Gets the value of the FeeRefunded. + * + * @return Price FeeRefunded",return !is_null($this->_fields['FeeRefunded']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundDetails,getCreationTimestamp,"* Sets the value of the FeeRefunded. + * + * @param Price FeeRefunded + * @return void",return $this->_fields['CreationTimestamp']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundDetails,setCreationTimestamp,"* Sets the value of the FeeRefunded and returns this instance + * + * @param Price $value FeeRefunded + * @return OffAmazonPaymentsService_Model_RefundDetails instance","$this->_fields['CreationTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,withCreationTimestamp,"* Checks if FeeRefunded is set + * + * @return bool true if FeeRefunded property is set","$this->setCreationTimestamp($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,isSetCreationTimestamp,"* Gets the value of the CreationTimestamp property. + * + * @return string CreationTimestamp",return !is_null($this->_fields['CreationTimestamp']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundDetails,getRefundStatus,"* Sets the value of the CreationTimestamp property. + * + * @param string CreationTimestamp + * @return this instance",return $this->_fields['RefundStatus']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundDetails,setRefundStatus,"* Sets the value of the CreationTimestamp and returns this instance + * + * @param string $value CreationTimestamp + * @return OffAmazonPaymentsService_Model_RefundDetails instance","$this->_fields['RefundStatus']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_RefundDetails,withRefundStatus,"* Checks if CreationTimestamp is set + * + * @return bool true if CreationTimestamp is set","$this->setRefundStatus($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,isSetRefundStatus,"* Gets the value of the RefundStatus. + * + * @return OffAmazonPaymentsService_Model_Status RefundStatus",return !is_null($this->_fields['RefundStatus']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundDetails,getSoftDescriptor,"* Sets the value of the RefundStatus. + * + * @param Status RefundStatus + * @return void",return $this->_fields['SoftDescriptor']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundDetails,setSoftDescriptor,"* Sets the value of the RefundStatus and returns this instance + * + * @param Status $value RefundStatus + * @return OffAmazonPaymentsService_Model_RefundDetails instance","$this->_fields['SoftDescriptor']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,withSoftDescriptor,"* Checks if RefundStatus is set + * + * @return bool true if RefundStatus property is set","$this->setSoftDescriptor($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundDetails,isSetSoftDescriptor,"* Gets the value of the SoftDescriptor property. + * + * @return string SoftDescriptor",return !is_null($this->_fields['SoftDescriptor']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AmazonCaptureId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'RefundReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'RefundAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), + + 'SellerRefundNote' => array('FieldValue' => null, 'FieldType' => 'string'), + 'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_RefundRequest,getSellerId,* @see OffAmazonPaymentsService_Model,return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundRequest,setSellerId,"* OffAmazonPaymentsService_Model_RefundRequest + * + * Properties: + * ","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_RefundRequest,withSellerId,"* Construct new OffAmazonPaymentsService_Model_RefundRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundRequest,isSetSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId",return !is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundRequest,getAmazonCaptureId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return $this->_fields['AmazonCaptureId']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundRequest,setAmazonCaptureId,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_RefundRequest instance","$this->_fields['AmazonCaptureId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_RefundRequest,withAmazonCaptureId,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->setAmazonCaptureId($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundRequest,isSetAmazonCaptureId,"* Gets the value of the AmazonCaptureId property. + * + * @return string AmazonCaptureId",return !is_null($this->_fields['AmazonCaptureId']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundRequest,getRefundReferenceId,"* Sets the value of the AmazonCaptureId property. + * + * @param string AmazonCaptureId + * @return this instance",return $this->_fields['RefundReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundRequest,setRefundReferenceId,"* Sets the value of the AmazonCaptureId and returns this instance + * + * @param string $value AmazonCaptureId + * @return OffAmazonPaymentsService_Model_RefundRequest instance","$this->_fields['RefundReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_RefundRequest,withRefundReferenceId,"* Checks if AmazonCaptureId is set + * + * @return bool true if AmazonCaptureId is set","$this->setRefundReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundRequest,isSetRefundReferenceId,"* Gets the value of the RefundReferenceId property. + * + * @return string RefundReferenceId",return !is_null($this->_fields['RefundReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundRequest,getRefundAmount,"* Sets the value of the RefundReferenceId property. + * + * @param string RefundReferenceId + * @return this instance",return $this->_fields['RefundAmount']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundRequest,setRefundAmount,"* Sets the value of the RefundReferenceId and returns this instance + * + * @param string $value RefundReferenceId + * @return OffAmazonPaymentsService_Model_RefundRequest instance","$this->_fields['RefundAmount']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_RefundRequest,withRefundAmount,"* Checks if RefundReferenceId is set + * + * @return bool true if RefundReferenceId is set","$this->setRefundAmount($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundRequest,isSetRefundAmount,"* Gets the value of the RefundAmount. + * + * @return OffAmazonPaymentsService_Model_Price RefundAmount",return !is_null($this->_fields['RefundAmount']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundRequest,getSellerRefundNote,"* Sets the value of the RefundAmount. + * + * @param OffAmazonPaymentsService_Model_Price RefundAmount + * @return void",return $this->_fields['SellerRefundNote']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundRequest,setSellerRefundNote,"* Sets the value of the RefundAmount and returns this instance + * + * @param Price $value RefundAmount + * @return OffAmazonPaymentsService_Model_RefundRequest instance","$this->_fields['SellerRefundNote']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_RefundRequest,withSellerRefundNote,"* Checks if RefundAmount is set + * + * @return bool true if RefundAmount property is set","$this->setSellerRefundNote($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundRequest,isSetSellerRefundNote,"* Gets the value of the SellerRefundNote property. + * + * @return string SellerRefundNote",return !is_null($this->_fields['SellerRefundNote']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundRequest,getSoftDescriptor,"* Sets the value of the SellerRefundNote property. + * + * @param string SellerRefundNote + * @return this instance",return $this->_fields['SoftDescriptor']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundRequest,setSoftDescriptor,"* Sets the value of the SellerRefundNote and returns this instance + * + * @param string $value SellerRefundNote + * @return OffAmazonPaymentsService_Model_RefundRequest instance","$this->_fields['SoftDescriptor']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_RefundRequest,withSoftDescriptor,"* Checks if SellerRefundNote is set + * + * @return bool true if SellerRefundNote is set","$this->setSoftDescriptor($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundRequest,isSetSoftDescriptor,"* Gets the value of the SoftDescriptor property. + * + * @return string SoftDescriptor",return !is_null($this->_fields['SoftDescriptor']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'RefundResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_RefundResult'), + + + 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_RefundResponse,getRefundResult,* @see OffAmazonPaymentsService_Model,return $this->_fields['RefundResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundResponse,setRefundResult,"* OffAmazonPaymentsService_Model_RefundResponse + * + * Properties: + * ","$this->_fields['RefundResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_RefundResponse,withRefundResult,"* Construct new OffAmazonPaymentsService_Model_RefundResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setRefundResult($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundResponse,isSetRefundResult,"* Construct OffAmazonPaymentsService_Model_RefundResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_RefundResponse",return !is_null($this->_fields['RefundResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundResponse,getResponseMetadata,"* Gets the value of the RefundResult. + * + * @return OffAmazonPaymentsService_Model_RefundResult RefundResult",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundResponse,setResponseMetadata,"* Sets the value of the RefundResult. + * + * @param RefundResult RefundResult + * @return void","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_RefundResponse,withResponseMetadata,"* Sets the value of the RefundResult and returns this instance + * + * @param RefundResult $value RefundResult + * @return OffAmazonPaymentsService_Model_RefundResponse instance","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundResponse,isSetResponseMetadata,"* Checks if RefundResult is set + * + * @return bool true if RefundResult property is set",return !is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_RefundResponse,toXML,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_RefundResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_RefundResponse,setResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_RefundResponse instance",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_RefundResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'RefundDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_RefundDetails'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_RefundResult,getRefundDetails,* @see OffAmazonPaymentsService_Model,return $this->_fields['RefundDetails']['FieldValue'];,- +OffAmazonPaymentsService_Model_RefundResult,setRefundDetails,"* OffAmazonPaymentsService_Model_RefundResult + * + * Properties: + * ","$this->_fields['RefundDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_RefundResult,withRefundDetails,"* Construct new OffAmazonPaymentsService_Model_RefundResult + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setRefundDetails($value); + return $this;",- +OffAmazonPaymentsService_Model_RefundResult,isSetRefundDetails,"* Gets the value of the RefundDetails. + * + * @return OffAmazonPaymentsService_Model_RefundDetails RefundDetails",return !is_null($this->_fields['RefundDetails']['FieldValue']);,- +OffAmazonPaymentsService_Model_ResponseHeaderMetadata,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->metadata[self::REQUEST_ID] = $requestId; + $this->metadata[self::RESPONSE_CONTEXT] = $responseContext; + $this->metadata[self::TIMESTAMP] = $timestamp;",- +OffAmazonPaymentsService_Model_ResponseMetadata,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'RequestId' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_ResponseMetadata,getRequestId,* @see OffAmazonPaymentsService_Model,return $this->_fields['RequestId']['FieldValue'];,- +OffAmazonPaymentsService_Model_ResponseMetadata,setRequestId,"* OffAmazonPaymentsService_Model_ResponseMetadata + * + * Properties: + * ","$this->_fields['RequestId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_ResponseMetadata,withRequestId,"* Construct new OffAmazonPaymentsService_Model_ResponseMetadata + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setRequestId($value); + return $this;",- +OffAmazonPaymentsService_Model_ResponseMetadata,isSetRequestId,"* Gets the value of the RequestId property. + * + * @return string RequestId",return !is_null($this->_fields['RequestId']['FieldValue']);,- +OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + 'SellerBillingAgreementId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'StoreName' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'CustomInformation' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,getSellerBillingAgreementId,"* OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes + * + * Properties: + * ",return $this->_fields['SellerBillingAgreementId']['FieldValue'];,- +OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,setSellerBillingAgreementId,"* Construct new OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['SellerBillingAgreementId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,withSellerBillingAgreementId,"* Gets the value of the SellerBillingAgreementId property. + * + * @return string SellerBillingAgreementId","$this->setSellerBillingAgreementId($value); + return $this;",- +OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,isSetSellerBillingAgreementId,"* Sets the value of the SellerBillingAgreementId property. + * + * @param string SellerBillingAgreementId + * @return this instance",return ! is_null($this->_fields['SellerBillingAgreementId']['FieldValue']);,- +OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,getStoreName,"* Sets the value of the SellerBillingAgreementId and returns this instance + * + * @param string $value SellerBillingAgreementId + * @return OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes instance",return $this->_fields['StoreName']['FieldValue'];,- +OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,setStoreName,"* Checks if SellerBillingAgreementId is set + * + * @return bool true if SellerBillingAgreementId is set","$this->_fields['StoreName']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,withStoreName,"* Gets the value of the StoreName property. + * + * @return string StoreName","$this->setStoreName($value); + return $this;",- +OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,isSetStoreName,"* Sets the value of the StoreName property. + * + * @param string StoreName + * @return this instance",return ! is_null($this->_fields['StoreName']['FieldValue']);,- +OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,getCustomInformation,"* Sets the value of the StoreName and returns this instance + * + * @param string $value StoreName + * @return OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes instance",return $this->_fields['CustomInformation']['FieldValue'];,- +OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,setCustomInformation,"* Checks if StoreName is set + * + * @return bool true if StoreName is set","$this->_fields['CustomInformation']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,withCustomInformation,"* Gets the value of the CustomInformation property. + * + * @return string CustomInformation","$this->setCustomInformation($value); + return $this;",- +OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,isSetCustomInformation,"* Sets the value of the CustomInformation property. + * + * @param string CustomInformation + * @return this instance",return ! is_null($this->_fields['CustomInformation']['FieldValue']);,- +OffAmazonPaymentsService_Model_SellerOrderAttributes,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'SellerOrderId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'StoreName' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'OrderItemCategories' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderItemCategories'), + + 'CustomInformation' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_SellerOrderAttributes,getSellerOrderId,* @see OffAmazonPaymentsService_Model,return $this->_fields['SellerOrderId']['FieldValue'];,- +OffAmazonPaymentsService_Model_SellerOrderAttributes,setSellerOrderId,"* OffAmazonPaymentsService_Model_SellerOrderAttributes + * + * Properties: + * ","$this->_fields['SellerOrderId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_SellerOrderAttributes,withSellerOrderId,"* Construct new OffAmazonPaymentsService_Model_SellerOrderAttributes + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setSellerOrderId($value); + return $this;",- +OffAmazonPaymentsService_Model_SellerOrderAttributes,isSetSellerOrderId,"* Gets the value of the SellerOrderId property. + * + * @return string SellerOrderId",return !is_null($this->_fields['SellerOrderId']['FieldValue']);,- +OffAmazonPaymentsService_Model_SellerOrderAttributes,getStoreName,"* Sets the value of the SellerOrderId property. + * + * @param string SellerOrderId + * @return this instance",return $this->_fields['StoreName']['FieldValue'];,- +OffAmazonPaymentsService_Model_SellerOrderAttributes,setStoreName,"* Sets the value of the SellerOrderId and returns this instance + * + * @param string $value SellerOrderId + * @return OffAmazonPaymentsService_Model_SellerOrderAttributes instance","$this->_fields['StoreName']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_SellerOrderAttributes,withStoreName,"* Checks if SellerOrderId is set + * + * @return bool true if SellerOrderId is set","$this->setStoreName($value); + return $this;",- +OffAmazonPaymentsService_Model_SellerOrderAttributes,isSetStoreName,"* Gets the value of the StoreName property. + * + * @return string StoreName",return !is_null($this->_fields['StoreName']['FieldValue']);,- +OffAmazonPaymentsService_Model_SellerOrderAttributes,getOrderItemCategories,"* Sets the value of the StoreName property. + * + * @param string StoreName + * @return this instance",return $this->_fields['OrderItemCategories']['FieldValue'];,- +OffAmazonPaymentsService_Model_SellerOrderAttributes,setOrderItemCategories,"* Sets the value of the StoreName and returns this instance + * + * @param string $value StoreName + * @return OffAmazonPaymentsService_Model_SellerOrderAttributes instance","$this->_fields['OrderItemCategories']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_SellerOrderAttributes,withOrderItemCategories,"* Checks if StoreName is set + * + * @return bool true if StoreName is set","$this->setOrderItemCategories($value); + return $this;",- +OffAmazonPaymentsService_Model_SellerOrderAttributes,isSetOrderItemCategories,"* Gets the value of the OrderItemCategories. + * + * @return OrderItemCategories OrderItemCategories",return !is_null($this->_fields['OrderItemCategories']['FieldValue']);,- +OffAmazonPaymentsService_Model_SellerOrderAttributes,getCustomInformation,"* Sets the value of the OrderItemCategories. + * + * @param OrderItemCategories OrderItemCategories + * @return void",return $this->_fields['CustomInformation']['FieldValue'];,- +OffAmazonPaymentsService_Model_SellerOrderAttributes,setCustomInformation,"* Sets the value of the OrderItemCategories and returns this instance + * + * @param OrderItemCategories $value OrderItemCategories + * @return OffAmazonPaymentsService_Model_SellerOrderAttributes instance","$this->_fields['CustomInformation']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_SellerOrderAttributes,withCustomInformation,"* Checks if OrderItemCategories is set + * + * @return bool true if OrderItemCategories property is set","$this->setCustomInformation($value); + return $this;",- +OffAmazonPaymentsService_Model_SellerOrderAttributes,isSetCustomInformation,"* Gets the value of the CustomInformation property. + * + * @return string CustomInformation",return !is_null($this->_fields['CustomInformation']['FieldValue']);,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + 'SellerId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'AmazonBillingAgreementId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + + 'BillingAgreementAttributes' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAgreementAttributes' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,getSellerId,"* OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest + * + * Properties: + * ",return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,setSellerId,"* Construct new OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,withSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,isSetSellerId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return ! is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,getAmazonBillingAgreementId,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest instance",return $this->_fields['AmazonBillingAgreementId']['FieldValue'];,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,setAmazonBillingAgreementId,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,withAmazonBillingAgreementId,"* Gets the value of the AmazonBillingAgreementId property. + * + * @return string AmazonBillingAgreementId","$this->setAmazonBillingAgreementId($value); + return $this;",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,isSetAmazonBillingAgreementId,"* Sets the value of the AmazonBillingAgreementId property. + * + * @param string AmazonBillingAgreementId + * @return this instance",return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']);,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,getBillingAgreementAttributes,"* Sets the value of the AmazonBillingAgreementId and returns this instance + * + * @param string $value AmazonBillingAgreementId + * @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest instance",return $this->_fields['BillingAgreementAttributes']['FieldValue'];,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,setBillingAgreementAttributes,"* Checks if AmazonBillingAgreementId is set + * + * @return bool true if AmazonBillingAgreementId is set","$this->_fields['BillingAgreementAttributes']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,withBillingAgreementAttributes,"* Gets the value of the BillingAgreementAttributes. + * + * @return BillingAgreementAttributes BillingAgreementAttributes","$this->setBillingAgreementAttributes($value); + return $this;",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,isSetBillingAgreementAttributes,"* Sets the value of the BillingAgreementAttributes. + * + * @param BillingAgreementAttributes BillingAgreementAttributes + * @return void",return ! is_null($this->_fields['BillingAgreementAttributes']['FieldValue']);,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + + 'SetBillingAgreementDetailsResult' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult' + ), + + 'ResponseMetadata' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,getSetBillingAgreementDetailsResult,"* OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse + * + * Properties: + * ",return $this->_fields['SetBillingAgreementDetailsResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,setSetBillingAgreementDetailsResult,"* Construct new OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['SetBillingAgreementDetailsResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,withSetBillingAgreementDetailsResult,"* Construct OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse","$this->setSetBillingAgreementDetailsResult($value); + return $this;",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,isSetSetBillingAgreementDetailsResult,"* Gets the value of the SetBillingAgreementDetailsResult. + * + * @return SetBillingAgreementDetailsResult SetBillingAgreementDetailsResult",return ! is_null($this->_fields['SetBillingAgreementDetailsResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,getResponseMetadata,"* Sets the value of the SetBillingAgreementDetailsResult. + * + * @param SetBillingAgreementDetailsResult SetBillingAgreementDetailsResult + * @return void",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,setResponseMetadata,"* Sets the value of the SetBillingAgreementDetailsResult and returns this instance + * + * @param SetBillingAgreementDetailsResult $value SetBillingAgreementDetailsResult + * @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse instance","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,withResponseMetadata,"* Checks if SetBillingAgreementDetailsResult is set + * + * @return bool true if SetBillingAgreementDetailsResult property is set","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,isSetResponseMetadata,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata",return ! is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,toXML,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse instance",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,setResponseHeaderMetadata,"* Checks if ResponseMetadata is set + * + * @return bool true if ResponseMetadata property is set",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + + 'BillingAgreementDetails' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAgreementDetails' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult,getBillingAgreementDetails,"* OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult + * + * Properties: + * ",return $this->_fields['BillingAgreementDetails']['FieldValue'];,- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult,setBillingAgreementDetails,"* Construct new OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['BillingAgreementDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult,withBillingAgreementDetails,"* Gets the value of the BillingAgreementDetails. + * + * @return BillingAgreementDetails BillingAgreementDetails","$this->setBillingAgreementDetails($value); + return $this;",- +OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult,isSetBillingAgreementDetails,"* Sets the value of the BillingAgreementDetails. + * + * @param BillingAgreementDetails BillingAgreementDetails + * @return void",return ! is_null($this->_fields['BillingAgreementDetails']['FieldValue']);,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), + 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), + + 'OrderReferenceAttributes' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceAttributes'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,getSellerId,* @see OffAmazonPaymentsService_Model,return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,setSellerId,"* OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest + * + * Properties: + * ","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,withSellerId,"* Construct new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,isSetSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId",return !is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,getAmazonOrderReferenceId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return $this->_fields['AmazonOrderReferenceId']['FieldValue'];,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,setAmazonOrderReferenceId,"* Sets the value of the SellerId and returns this instance + * + * @param string $value SellerId + * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest instance","$this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,withAmazonOrderReferenceId,"* Checks if SellerId is set + * + * @return bool true if SellerId is set","$this->setAmazonOrderReferenceId($value); + return $this;",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,isSetAmazonOrderReferenceId,"* Gets the value of the AmazonOrderReferenceId property. + * + * @return string AmazonOrderReferenceId",return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']);,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,getOrderReferenceAttributes,"* Sets the value of the AmazonOrderReferenceId property. + * + * @param string AmazonOrderReferenceId + * @return this instance",return $this->_fields['OrderReferenceAttributes']['FieldValue'];,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,setOrderReferenceAttributes,"* Sets the value of the AmazonOrderReferenceId and returns this instance + * + * @param string $value AmazonOrderReferenceId + * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest instance","$this->_fields['OrderReferenceAttributes']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,withOrderReferenceAttributes,"* Checks if AmazonOrderReferenceId is set + * + * @return bool true if AmazonOrderReferenceId is set","$this->setOrderReferenceAttributes($value); + return $this;",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,isSetOrderReferenceAttributes,"* Gets the value of the OrderReferenceAttributes. + * + * @return OffAmazonPaymentsService_Model_OrderReferenceAttributes OrderReferenceAttributes",return !is_null($this->_fields['OrderReferenceAttributes']['FieldValue']);,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'SetOrderReferenceDetailsResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult'), + + + 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,getSetOrderReferenceDetailsResult,* @see OffAmazonPaymentsService_Model,return $this->_fields['SetOrderReferenceDetailsResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,setSetOrderReferenceDetailsResult,"* OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse + * + * Properties: + * ","$this->_fields['SetOrderReferenceDetailsResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,withSetOrderReferenceDetailsResult,"* Construct new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setSetOrderReferenceDetailsResult($value); + return $this;",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,isSetSetOrderReferenceDetailsResult,"* Construct OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse",return !is_null($this->_fields['SetOrderReferenceDetailsResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,getResponseMetadata,"* Gets the value of the SetOrderReferenceDetailsResult. + * + * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult SetOrderReferenceDetailsResult",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,setResponseMetadata,"* Sets the value of the SetOrderReferenceDetailsResult. + * + * @param SetOrderReferenceDetailsResult SetOrderReferenceDetailsResult + * @return void","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,withResponseMetadata,"* Sets the value of the SetOrderReferenceDetailsResult and returns this instance + * + * @param SetOrderReferenceDetailsResult $value SetOrderReferenceDetailsResult + * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse instance","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,isSetResponseMetadata,"* Checks if SetOrderReferenceDetailsResult is set + * + * @return bool true if SetOrderReferenceDetailsResult property is set",return !is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,toXML,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,setResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse instance",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + + 'OrderReferenceDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceDetails'), + + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult,getOrderReferenceDetails,* @see OffAmazonPaymentsService_Model,return $this->_fields['OrderReferenceDetails']['FieldValue'];,- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult,setOrderReferenceDetails,"* OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult + * + * Properties: + * ","$this->_fields['OrderReferenceDetails']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult,withOrderReferenceDetails,"* Construct new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setOrderReferenceDetails($value); + return $this;",- +OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult,isSetOrderReferenceDetails,"* Gets the value of the OrderReferenceDetails. + * + * @return OrderReferenceDetails OrderReferenceDetails",return !is_null($this->_fields['OrderReferenceDetails']['FieldValue']);,- +OffAmazonPaymentsService_Model_Status,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array ( + 'State' => array('FieldValue' => null, 'FieldType' => 'string'), + 'LastUpdateTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), + 'ReasonCode' => array('FieldValue' => null, 'FieldType' => 'string'), + 'ReasonDescription' => array('FieldValue' => null, 'FieldType' => 'string'), + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_Status,getState,* @see OffAmazonPaymentsService_Model,return $this->_fields['State']['FieldValue'];,- +OffAmazonPaymentsService_Model_Status,setState,"* OffAmazonPaymentsService_Model_Status + * + * Properties: + * ","$this->_fields['State']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Status,withState,"* Construct new OffAmazonPaymentsService_Model_Status + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->setState($value); + return $this;",- +OffAmazonPaymentsService_Model_Status,isSetState,"* Gets the value of the State property. + * + * @return string State",return !is_null($this->_fields['State']['FieldValue']);,- +OffAmazonPaymentsService_Model_Status,getLastUpdateTimestamp,"* Sets the value of the State property. + * + * @param string State + * @return this instance",return $this->_fields['LastUpdateTimestamp']['FieldValue'];,- +OffAmazonPaymentsService_Model_Status,setLastUpdateTimestamp,"* Sets the value of the State and returns this instance + * + * @param string $value State + * @return OffAmazonPaymentsService_Model_Status instance","$this->_fields['LastUpdateTimestamp']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Status,withLastUpdateTimestamp,"* Checks if State is set + * + * @return bool true if State is set","$this->setLastUpdateTimestamp($value); + return $this;",- +OffAmazonPaymentsService_Model_Status,isSetLastUpdateTimestamp,"* Gets the value of the LastUpdateTimestamp property. + * + * @return string LastUpdateTimestamp",return !is_null($this->_fields['LastUpdateTimestamp']['FieldValue']);,- +OffAmazonPaymentsService_Model_Status,getReasonCode,"* Sets the value of the LastUpdateTimestamp property. + * + * @param string LastUpdateTimestamp + * @return this instance",return $this->_fields['ReasonCode']['FieldValue'];,- +OffAmazonPaymentsService_Model_Status,setReasonCode,"* Sets the value of the LastUpdateTimestamp and returns this instance + * + * @param string $value LastUpdateTimestamp + * @return OffAmazonPaymentsService_Model_Status instance","$this->_fields['ReasonCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Status,withReasonCode,"* Checks if LastUpdateTimestamp is set + * + * @return bool true if LastUpdateTimestamp is set","$this->setReasonCode($value); + return $this;",- +OffAmazonPaymentsService_Model_Status,isSetReasonCode,"* Gets the value of the ReasonCode property. + * + * @return string ReasonCode",return !is_null($this->_fields['ReasonCode']['FieldValue']);,- +OffAmazonPaymentsService_Model_Status,getReasonDescription,"* Sets the value of the ReasonCode property. + * + * @param string ReasonCode + * @return this instance",return $this->_fields['ReasonDescription']['FieldValue'];,- +OffAmazonPaymentsService_Model_Status,setReasonDescription,"* Sets the value of the ReasonCode and returns this instance + * + * @param string $value ReasonCode + * @return OffAmazonPaymentsService_Model_Status instance","$this->_fields['ReasonDescription']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_Status,withReasonDescription,"* Checks if ReasonCode is set + * + * @return bool true if ReasonCode is set","$this->setReasonDescription($value); + return $this;",- +OffAmazonPaymentsService_Model_Status,isSetReasonDescription,"* Gets the value of the ReasonDescription property. + * + * @return string ReasonDescription",return !is_null($this->_fields['ReasonDescription']['FieldValue']);,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + 'AmazonBillingAgreementId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'SellerId' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ) + ); + parent::__construct($data);",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,getAmazonBillingAgreementId,"* OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest + * + * Properties: + * ",return $this->_fields['AmazonBillingAgreementId']['FieldValue'];,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,setAmazonBillingAgreementId,"* Construct new OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,withAmazonBillingAgreementId,"* Gets the value of the AmazonBillingAgreementId property. + * + * @return string AmazonBillingAgreementId","$this->setAmazonBillingAgreementId($value); + return $this;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,isSetAmazonBillingAgreementId,"* Sets the value of the AmazonBillingAgreementId property. + * + * @param string AmazonBillingAgreementId + * @return this instance",return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']);,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,getSellerId,"* Sets the value of the AmazonBillingAgreementId and returns this instance + * + * @param string $value AmazonBillingAgreementId + * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest instance",return $this->_fields['SellerId']['FieldValue'];,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,setSellerId,"* Checks if AmazonBillingAgreementId is set + * + * @return bool true if AmazonBillingAgreementId is set","$this->_fields['SellerId']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,withSellerId,"* Gets the value of the SellerId property. + * + * @return string SellerId","$this->setSellerId($value); + return $this;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,isSetSellerId,"* Sets the value of the SellerId property. + * + * @param string SellerId + * @return this instance",return ! is_null($this->_fields['SellerId']['FieldValue']);,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + + 'ValidateBillingAgreementResult' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_ValidateBillingAgreementResult' + ), + + 'ResponseMetadata' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,getValidateBillingAgreementResult,"* OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse + * + * Properties: + * ",return $this->_fields['ValidateBillingAgreementResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,setValidateBillingAgreementResult,"* Construct new OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['ValidateBillingAgreementResult']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,withValidateBillingAgreementResult,"* Construct OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse from XML string + * + * @param string $xml XML string to construct from + * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse","$this->setValidateBillingAgreementResult($value); + return $this;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,isSetValidateBillingAgreementResult,"* Gets the value of the ValidateBillingAgreementResult. + * + * @return ValidateBillingAgreementResult ValidateBillingAgreementResult",return ! is_null($this->_fields['ValidateBillingAgreementResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,getResponseMetadata,"* Sets the value of the ValidateBillingAgreementResult. + * + * @param ValidateBillingAgreementResult ValidateBillingAgreementResult + * @return void",return $this->_fields['ResponseMetadata']['FieldValue'];,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,setResponseMetadata,"* Sets the value of the ValidateBillingAgreementResult and returns this instance + * + * @param ValidateBillingAgreementResult $value ValidateBillingAgreementResult + * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse instance","$this->_fields['ResponseMetadata']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,withResponseMetadata,"* Checks if ValidateBillingAgreementResult is set + * + * @return bool true if ValidateBillingAgreementResult property is set","$this->setResponseMetadata($value); + return $this;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,isSetResponseMetadata,"* Gets the value of the ResponseMetadata. + * + * @return ResponseMetadata ResponseMetadata",return ! is_null($this->_fields['ResponseMetadata']['FieldValue']);,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,toXML,"* Sets the value of the ResponseMetadata. + * + * @param ResponseMetadata ResponseMetadata + * @return void","$xml = """"; + $xml .= """"; + $xml .= $this->_toXMLFragment(); + $xml .= """"; + return $xml;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,getResponseHeaderMetadata,"* Sets the value of the ResponseMetadata and returns this instance + * + * @param ResponseMetadata $value ResponseMetadata + * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse instance",return $this->_responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,setResponseHeaderMetadata,"* Checks if ResponseMetadata is set + * + * @return bool true if ResponseMetadata property is set",return $this->_responseHeaderMetadata = $responseHeaderMetadata;,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_fields = array( + 'ValidationResult' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + 'FailureReasonCode' => array( + 'FieldValue' => null, + 'FieldType' => 'string' + ), + + 'BillingAgreementStatus' => array( + 'FieldValue' => null, + 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAgreementStatus' + ) + ) + ; + parent::__construct($data);",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,getValidationResult,"* OffAmazonPaymentsService_Model_ValidateBillingAgreementResult + * + * Properties: + * ",return $this->_fields['ValidationResult']['FieldValue'];,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,setValidationResult,"* Construct new OffAmazonPaymentsService_Model_ValidateBillingAgreementResult + * + * @param mixed $data DOMElement or Associative Array to construct from. + * + * Valid properties: + * ","$this->_fields['ValidationResult']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,withValidationResult,"* Gets the value of the ValidationResult property. + * + * @return string ValidationResult","$this->setValidationResult($value); + return $this;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,isSetValidationResult,"* Sets the value of the ValidationResult property. + * + * @param string ValidationResult + * @return this instance",return ! is_null($this->_fields['ValidationResult']['FieldValue']);,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,getFailureReasonCode,"* Sets the value of the ValidationResult and returns this instance + * + * @param string $value ValidationResult + * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResult instance",return $this->_fields['FailureReasonCode']['FieldValue'];,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,setFailureReasonCode,"* Checks if ValidationResult is set + * + * @return bool true if ValidationResult is set","$this->_fields['FailureReasonCode']['FieldValue'] = $value; + return $this;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,withFailureReasonCode,"* Gets the value of the FailureReasonCode property. + * + * @return string FailureReasonCode","$this->setFailureReasonCode($value); + return $this;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,isSetFailureReasonCode,"* Sets the value of the FailureReasonCode property. + * + * @param string FailureReasonCode + * @return this instance",return ! is_null($this->_fields['FailureReasonCode']['FieldValue']);,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,getBillingAgreementStatus,"* Sets the value of the FailureReasonCode and returns this instance + * + * @param string $value FailureReasonCode + * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResult instance",return $this->_fields['BillingAgreementStatus']['FieldValue'];,- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,setBillingAgreementStatus,"* Checks if FailureReasonCode is set + * + * @return bool true if FailureReasonCode is set","$this->_fields['BillingAgreementStatus']['FieldValue'] = $value; + return;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,withBillingAgreementStatus,"* Gets the value of the BillingAgreementStatus. + * + * @return BillingAgreementStatus BillingAgreementStatus","$this->setBillingAgreementStatus($value); + return $this;",- +OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,isSetBillingAgreementStatus,"* Sets the value of the BillingAgreementStatus. + * + * @param BillingAgreementStatus BillingAgreementStatus + * @return void",return ! is_null($this->_fields['BillingAgreementStatus']['FieldValue']);,- +AddressConsentSample,__construct,"* AddressConsentSample shows how to use an + * access token in order to return additional information about the buyer + * attached to a payment contract. + * + * This example is for US based customers only. + * + * Note that the token requires needs to be decoded before it can be passed + * into the service call + * + * The sample is run by passing in a draft order reference and the access token + * assocaited with this order reference object..","$this->_service = $service; + $this->_amazonOrderReferenceId = $amazonOrderReferenceId; + $this->_sellerId = $this->_service->getMerchantValues()->getMerchantId();",- +AddressConsentSample,validateOrderReferenceIsInACorrectState,"* Create a new instance of the Address consent sample + * + * @param OffAmazonPaymentsService_Client $service instance of the service + * client + * @param string $amazonOrderReferenceId an order reference object in + * draft state to use in + * the example + * + * @return new PayWithAmazonAddressConsentSample","validateOrderReferenceIsInACorrectState( + $getOrderReferenceDetailsResponse->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails(), + ""DRAFT"" + );",- +AddressConsentSample,getOrderReferenceDetails,"* Validate that the order reference is in the draft state + * + * @param OffAmazonPayments_Model_GetOrderReferenceDetailsResponse in an unverified state + * + * @return void + * @throws ErrorException if the state does not match the expected state","$getOrderReferenceDetailsRequest = new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest(); + $getOrderReferenceDetailsRequest->setSellerId($this->_sellerId); + $getOrderReferenceDetailsRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + + if (is_null($addressConsentToken) == FALSE) { + $decodedToken = urldecode($addressConsentToken); + $getOrderReferenceDetailsRequest->setAddressConsentToken($decodedToken);",- +AutomaticPaymentsSimpleCheckoutExample,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","$this->_service = $service; + + $this->_amazonBillingAgreementId = $amazonBillingAgreementId; + + $this->_sellerId = $this->_service->getMerchantValues()->getMerchantId(); + + $this->_shippingAndTaxCostHelper = new ShippingAndTaxCostHelper();",- +AutomaticPaymentsSimpleCheckoutExample,getBillingAgreementDetails,"* AutomaticPaymentsSimpleCheckoutExample includes the logic required to capture + * an order and perform all actions to capture the order amount fromthe buyer.","$getBillingAgreementDetailsRequest = new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest(); + $getBillingAgreementDetailsRequest->setSellerId($this->_sellerId); + $getBillingAgreementDetailsRequest->setAmazonBillingAgreementId( + $this->_amazonBillingAgreementId); + + return $this->_service->getBillingAgreementDetails($getBillingAgreementDetailsRequest);",- +AutomaticPaymentsSimpleCheckoutExample,"calculatePaymentAmountBasedOnBuyerDetails ($BillingAgreementDetails, + $orderAmountPreTaxAndShipping, $shippingType)","* Create a new instance of the automatic payment simple checkout example + * case + * + * @param OffAmazonPaymentsService_Client $service + * instance of the service client + * @param string $amazonBillingAgreementId + * an billing agreement object in draft state + * + * @return new AutomaticPaymentsSimpleCheckoutExample","return $this->_shippingAndTaxCostHelper->calculateTotalAmount($BillingAgreementDetails, + $orderAmountPreTaxAndShipping, $shippingType);",- +AutomaticPaymentsSimpleCheckoutExample,addSellerInformationToBillingAgreement,"* Use the billing agreement object to query the automatic payment + * information, including the current physical delivery address as selected + * by the buyer + * + * @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse + * service response","$sellerBillingAgreementAttributes = new OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes(); + $sellerBillingAgreementAttributes->setSellerBillingAgreementId( + $this->_amazonBillingAgreementId); + $sellerBillingAgreementAttributes->setStoreName(""Your store name here""); + $sellerBillingAgreementAttributes->setCustomInformation( + ""Additional information you wish to include with this billing agreement.""); + + $billingAgreementAttributes = new OffAmazonPaymentsService_Model_BillingAgreementAttributes(); + $billingAgreementAttributes->setSellerNote( + ""Description of the billing agreement that is displayed to the buyer in the emails.""); + $billingAgreementAttributes->setSellerBillingAgreementAttributes( + $sellerBillingAgreementAttributes); + + $setBillingAgreementDetailsRequest = new OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest(); + $setBillingAgreementDetailsRequest->setAmazonBillingAgreementId( + $this->_amazonBillingAgreementId); + $setBillingAgreementDetailsRequest->setSellerId($this->_sellerId); + $setBillingAgreementDetailsRequest->setBillingAgreementAttributes( + $billingAgreementAttributes); + return $this->_service->setBillingAgreementDetails($setBillingAgreementDetailsRequest);",- +AutomaticPaymentsSimpleCheckoutExample,confirmBillingAgreement,"* Calculate the amount to charge the buyer for each payment, based on the + * buyer destination address + * + * Note that until the billing agreement is confirmed, the name & address + * fields will not be returned to the client. + * + * @param OffAmazonPaymentsService_Model_BillingAgreementDetails $BillingAgreementDetails + * response + * @param string $orderAmountPreTaxAndShipping + * order amount + * @param int $shippingType + * shipping type + * + * @return float total amount for the order, with shipping and tax included","$confirmBillingAgreementRequest = new OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest(); + $confirmBillingAgreementRequest->setAmazonBillingAgreementId( + $this->_amazonBillingAgreementId); + $confirmBillingAgreementRequest->setSellerId($this->_sellerId); + + return $this->_service->confirmBillingAgreement($confirmBillingAgreementRequest);",- +AutomaticPaymentsSimpleCheckoutExample,validateBillingAgreement,"* Set seller specific information to the billing agreement details. + * + * @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse + * service response","$validateBillingAgreementRequest = new OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest(); + $validateBillingAgreementRequest->setAmazonBillingAgreementId( + $this->_amazonBillingAgreementId); + $validateBillingAgreementRequest->setSellerId($this->_sellerId); + + return $this->_service->validateBillingAgreement($validateBillingAgreementRequest);",- +AutomaticPaymentsSimpleCheckoutExample,authorizePaymentAmount,"* Confirm the billing agreement information, allowing for authorizations + * and captures to be created + * + * @return OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse + * service response","$authorizeOnBillingAgreementRequest = $this->_createAuthorizeOnBillingAgreementRequest( + $authorizationAmount, $authorizationReferenceId, false); + return $this->_service->authorizeOnBillingAgreement($authorizeOnBillingAgreementRequest);",- +AutomaticPaymentsSimpleCheckoutExample,"authorizePaymentAmountWithCaptureNow ($authorizationAmount, + $authorizationReferenceId)","* Check that the billing agreement is in valid status and the selected payment + * method is also valid. + * + * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse + * service response","$authorizeOnBillingAgreementRequest = $this->_createAuthorizeOnBillingAgreementRequest( + $authorizationAmount, $authorizationReferenceId, true); + return $this->_service->authorizeOnBillingAgreement($authorizeOnBillingAgreementRequest);",- +AutomaticPaymentsSimpleCheckoutExample,waitUntilAuthorizationProcessingIsCompleted,"* Perform the authorize call on the billing agreement + * + * @param float $authorizationAmount + * amount to authorize from the buyer + * + * @param string $authorizationReferenceId + * seller provided authorization reference id + * + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse + * service response","$getAuthorizationDetailsResponse = null; + do { + sleep(5); + $getAuthorizationDetailsResponse = $this->getAuthorizationDetails( + $amazonAuthorizationId);",- +AutomaticPaymentsSimpleCheckoutExample,getAuthorizationDetails,"* Authorize on the billing agreement with auto capture + * + * @param float $authorizationAmount + * amount to authorize from the buyer + * + * @param string $authorizationReferenceId + * seller provided authorization reference id + * + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse + * service response","$getAuthorizationDetailsRequest = new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest(); + $getAuthorizationDetailsRequest->setSellerId($this->_sellerId); + $getAuthorizationDetailsRequest->setAmazonAuthorizationId($amazonAuthorizationReferenceId); + + return $this->_service->getAuthorizationDetails($getAuthorizationDetailsRequest);",- +AutomaticPaymentsSimpleCheckoutExample,captureOrderAmount,"* Create AuthorizeOnBillingAgreement request + * + * @param float $authorizationAmount + * @param string $authorizationReferenceId + * @param bool $CaptureNow + * + * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest","$captureRequest = new OffAmazonPaymentsService_Model_CaptureRequest(); + $captureRequest->setSellerId($this->_sellerId); + $captureRequest->setAmazonAuthorizationId($amazonAuthorizationId); + $captureRequest->setCaptureReferenceId($amazonAuthorizationId . ""-c01""); + $captureRequest->setCaptureAmount(new OffAmazonPaymentsService_Model_Price()); + $captureRequest->getCaptureAmount()->setAmount($captureAmount); + $captureRequest->getCaptureAmount()->setCurrencyCode( + $this->_service->getMerchantValues() + ->getCurrency()); + + return $this->_service->capture($captureRequest);",- +AutomaticPaymentsSimpleCheckoutExample,getCaptureDetails,"* Poll the API for the status of the Authorization Request, and continue + * once the status has been updated. + * WARNING: This is not the way to integrate for production systems, + * instead merchants should use IPN to receive a callback once the + * processing has been completed. + * Note that Amazon reserves the right to throttle requests that + * ignore this advice and poll for a response + * + * @param string $amazonAuthorizationReferenceId + * authorization transaction to query + * + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse + * service response","$captureDetailsRequest = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest(); + $captureDetailsRequest->setSellerId($this->_sellerId); + $captureDetailsRequest->setAmazonCaptureId($amazonCaptureId); + + return $this->_service->getCaptureDetails($captureDetailsRequest);",- +AutomaticPaymentsSimpleCheckoutExample,closeBillingAgreement,"* Perform the getAuthroizationDetails request for the order + * + * @param string $amazonAuthorizationReferenceId + * authorization transaction + * to query + * + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse + * service response","$closeBillingAgreementRequest = new OffAmazonPaymentsService_Model_CloseBillingAgreementRequest(); + $closeBillingAgreementRequest->setSellerId($this->_sellerId); + $closeBillingAgreementRequest->setAmazonBillingAgreementId($this->_amazonBillingAgreementId); + $closeBillingAgreementRequest->setClosureReason(""Automatic payment complete""); + + return $this->_service->closeBillingAgreement($closeBillingAgreementRequest);",- +drives,__construct,"***************************************************************************** + * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License. + * *****************************************************************************","if (count($argv) < 1) { + print ""Missing mandatory argument: "" . ""please provide an amazonBillingAgreementId""; + exit(0);",- +drives,runSample,"* AutomaticPaymentsSimpleCheckoutExampleCLI class captures input from stdin and + * prints to stdout, and drives the automatic payment simple checkout example","// Calculate payment amount based on buyer selected shipping address + $paymentTotal = $this->_calculatePaymentAmountBasedOnBuyerDestinationAddress(); + + // Added custom information and seller note to the billing agreement + $this->_addSellerInformationToBillingAgreement(); + + /* + * Confirm billing agreement. The billing agreement has to be consented + * by buyer before you confirm the billing agreement. + */ + $this->_confirmBillingAgreement(); + + // Validate billing agreement (optional) + $this->_validateBillingAgreement(); + + // First payment + $amazonAuthorizationId1 = $this->_authorizePaymentAmount($paymentTotal, + $this->_amazonBillingAgreementId . ""-A01""); + $this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId1); + $this->_captureOrderAmount($paymentTotal, $amazonAuthorizationId1); + + // Second payment with capture now + $this->_authorizePaymentAmountWithCaptureNow($paymentTotal, + $this->_amazonBillingAgreementId . ""-A02""); + + // More payments here ... + + /* + * Confirm the billing agreement again if the buyer changes the shipping + * address or payments method through widgets. For details on how to render + * widgets for existing billing agreements, please see integration guide + * for details. + */ + $this->_confirmBillingAgreement(); + + // Validate billing agreement (optional) + $this->_validateBillingAgreement(); + + // Another payment here + $this->_authorizePaymentAmountWithCaptureNow($paymentTotal, + $this->_amazonBillingAgreementId . ""-A03""); + + // More payments here ... + + // Close the billing agreement when this automatic payment is no longer + // needed + $this->_closeBillingAgreement(); + + print ""Automatic payment simple checkout example completed"" . PHP_EOL;",- +CancellationExample,__construct,"* Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License.","$this->_service = $service; + $this->_amazonOrderReferenceId = $amazonOrderReferenceId; + + /* + * Setup shared identifiers for the series of transaction requests + */ + $this->_authorizationReferenceId + = str_replace(""-"", """", $this->_amazonOrderReferenceId) . ""a01""; + + $this->_sellerId + = $this->_service->getMerchantValues()->getMerchantId(); + + $this->_orderTotalAmount = $orderTotalAmount; + $this->_currencyCode = $service->getMerchantValues()->getCurrency();",- +CancellationExample,setupOrderReference,"* CancellationExample includes the logic + * requiere to cancel an order with open + * authorizations + *","$orderTotal = new OffAmazonPaymentsService_Model_OrderTotal(); + $orderTotal->setCurrencyCode($this->_currencyCode); + $orderTotal->setAmount($this->_orderTotalAmount); + + $setOrderReferenceDetailsRequest + = new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest(); + $setOrderReferenceDetailsRequest->setSellerId($this->_sellerId); + $setOrderReferenceDetailsRequest + ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + $setOrderReferenceDetailsRequest + ->setOrderReferenceAttributes( + new OffAmazonPaymentsService_Model_OrderReferenceAttributes() + ); + $setOrderReferenceDetailsRequest + ->getOrderReferenceAttributes()->setOrderTotal($orderTotal); + + return $this->_service->setOrderReferenceDetails( + $setOrderReferenceDetailsRequest + );",- +CancellationExample,confirmOrderReference,"* Create a new instance of the simple checkout example + * case + * + * @param OffAmazonPaymentsService_Client $service instance of the + * service client + * @param string $amazonOrderReferenceId an order reference + * object in draft + * state to use in the example + * @param string $orderTotalAmount amount to authorize + * from the buyer + * + * @return new CancellationExample","$confirmOrderReferenceRequest + = new OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest(); + $confirmOrderReferenceRequest + ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + $confirmOrderReferenceRequest->setSellerId($this->_sellerId); + + return $this->_service->confirmOrderReference($confirmOrderReferenceRequest);",- +CancellationExample,performAuthorization,"* Add information to the payment contract so that it can be confirmed + * in a later step + * Simulates a merchant adding the order details to the payment contract + * + * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse + * response","$authorizationAmountPrice = new OffAmazonPaymentsService_Model_Price(); + $authorizationAmountPrice->setCurrencyCode($this->_currencyCode); + $authorizationAmountPrice->setAmount($this->_orderTotalAmount); + + $authorizeRequest = new OffAmazonPaymentsService_Model_AuthorizeRequest(); + $authorizeRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + $authorizeRequest->setSellerId($this->_sellerId); + $authorizeRequest->setAuthorizationReferenceId( + $this->_authorizationReferenceId + ); + $authorizeRequest->setAuthorizationAmount($authorizationAmountPrice); + + return $this->_service->authorize($authorizeRequest);",- +CancellationExample,waitUntilAuthorizationProcessingIsCompleted,"* Confirm the order reference information, allowing for + * authorizations and captures to be created + * + * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse response","$getAuthorizationDetailsResponse = null; + do { + sleep(5); + $getAuthorizationDetailsResponse + = $this->getAuthorizationDetails($amazonAuthorizationId);",- +CancellationExample,getAuthorizationDetails,"* Perform the authorize call for the order + * + * Cancel order reference can now be called at any point between a + * ConfirmOrderReference call and a cancelOrderReference call + * In this example we will call it following a single authorization for + * half of the order total + * + * @return OffAmazonPaymentsService_Model_AuthorizeResponse service response","$getAuthorizationDetailsRequest + = new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest(); + $getAuthorizationDetailsRequest + ->setSellerId($this->_sellerId); + $getAuthorizationDetailsRequest + ->setAmazonAuthorizationId($amazonAuthorizationReferenceId); + + return $this->_service->getAuthorizationDetails( + $getAuthorizationDetailsRequest + );",- +CancellationExample,cancelOrderReference,"* Poll the API for the status of the Authorization Request, and continue + * once the status has been updated + * WARNING: This is not the way to integrate for production systems, + * instead merchants should use IPN to receive a callback once the + * processing has been completed. + * Note that Amazon reserves the right to throttle requests that + * ignore this advice and poll for a response + * + * @param string $amazonAuthorizationId authorization transaction to query + * + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse + * response","$cancelOrderReferenceRequest + = new OffAmazonPaymentsService_Model_CancelOrderReferenceRequest(); + $cancelOrderReferenceRequest->setSellerId($this->_sellerId); + $cancelOrderReferenceRequest + ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + + return $this->_service->cancelOrderReference($cancelOrderReferenceRequest);",- +CancellationExample,getOrderReferenceDetails,"* Perform the getAuthroizationDetails request for the order + * + * @param string $amazonAuthorizationReferenceId authorization transaction + * to query + * + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse + * response","$getOrderReferenceDetailsRequest + = new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest(); + $getOrderReferenceDetailsRequest + ->setSellerId($this->_sellerId); + $getOrderReferenceDetailsRequest + ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + + return $this->_service->getOrderReferenceDetails( + $getOrderReferenceDetailsRequest + );",- +drives,__construct,"***************************************************************************** +* Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved. +* Licensed under the Apache License, Version 2.0 (the ""License""); +* +* You may not use this file except in compliance with the License. +* You may obtain a copy of the License at: +* http://aws.amazon.com/apache2.0 +* This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR +* CONDITIONS OF ANY KIND, either express or implied. See the License +* for the +* specific language governing permissions and limitations under the +* License. +*****************************************************************************","if (count($argv) < 1) { + print ""Missing mandatory argument: "" . + ""please provide an amazonOrderReferenceId""; + exit(0);",- +drives,runSample,"***************************************************************************** +* Cancellation command line example +* +* This class drives the cancellation example from a command line iterface +* See CancellationExample.php for more information +*****************************************************************************","$this->_setupOrderReference(); + $this->_confirmOrderReference(); + $amazonAuthorizationId = $this->_performAuthorization(); + $this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId); + $this->_cancelOrder(); + $this->_getOrderReferenceDetails(); + + print ""Cancellation completed"" . PHP_EOL;",- +RefundExample,__construct,"* Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the ""License""); + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * http://aws.amazon.com/apache2.0 + * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License + * for the + * specific language governing permissions and limitations under the + * License.","$this->_service = $service; + $this->_amazonOrderReferenceId = $amazonOrderReferenceId; + $this->_amazonCaptureId = $amazonCaptureId; + $this->_refundReferenceId + = str_replace(""-"", """", $amazonCaptureId) . ""c"" . $refundIdSuffix; + + $this->_sellerId + = $this->_service->getMerchantValues()->getMerchantId();",- +RefundExample,getOrderReferenceDetails,"* RefundExample includes the logic + * required to refund a capture, + * which transfers the funds from + * the merchant back to the buyer + *","$getOrderReferenceDetailsRequest + = new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest(); + $getOrderReferenceDetailsRequest->setSellerId($this->_sellerId); + $getOrderReferenceDetailsRequest->setAmazonOrderReferenceId( + $this->_amazonOrderReferenceId + ); + + return $this->_service->getOrderReferenceDetails( + $getOrderReferenceDetailsRequest + );",- +RefundExample,getCaptureDetailsRequest,"* Create a new instance of the refund example case + * + * @param OffAmazonPaymentsService_Client $service instance of the service + * client + * @param string $amazonOrderReferenceId an order reference object in + * open or closed state to use in + * the example + * @param string $amazonCaptureId a completed capture that was + * performed on the order reference id + * @param string $refundIdSuffix suffixForTheRefundIdentifier + * + * @return new RefundExample","$getCaptureDetailsRequest + = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest(); + $getCaptureDetailsRequest->setSellerId($this->_sellerId); + $getCaptureDetailsRequest->setAmazonCaptureId($this->_amazonCaptureId); + + return $this->_service->getCaptureDetails($getCaptureDetailsRequest);",- +RefundExample,refundToBuyer,"* Get the order reference details to find to the state + * of the order reference + * + * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse response","$refund = new OffAmazonPaymentsService_Model_Price(); + $refund->setCurrencyCode($refundCurrency); + $refund->setAmount($refundAmount); + + $refundRequest = new OffAmazonPaymentsService_Model_RefundRequest(); + $refundRequest->setSellerId($this->_sellerId); + $refundRequest->setAmazonCaptureId($this->_amazonCaptureId); + $refundRequest->setRefundReferenceId($this->_refundReferenceId); + $refundRequest->setRefundAmount($refund); + + return $this->_service->refund($refundRequest);",- +RefundExample,waitUntilRefundProcessingIsCompleted,"* Get the capture details to find out the + * maximum amount that can be refunded + * + * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse response","$getRefundDetailsResponse = null; + do { + sleep(5); + $getRefundDetailsResponse + = $this->getRefundDetails($amazonRefundId);",- +RefundExample,getRefundDetails,"* Perform the refund to transfer the amount from seller + * to buyer + * + * @param string $refundAmount amount to refund to the buyer + * @param string $refundCurrency currency of the refund + * + * @return void","$getRefundDetailsRequest + = new OffAmazonPaymentsService_Model_GetRefundDetailsRequest(); + $getRefundDetailsRequest->setSellerId($this->_sellerId); + $getRefundDetailsRequest->setAmazonRefundId($amazonRefundId); + return $this->_service->getRefundDetails($getRefundDetailsRequest);",- +RefundExample,getCaptureDetails,"* Poll the API for the status of the Refund Request, and continue + * once the status has been updated + * WARNING: This is not the way to integrate for production systems, + * instead merchants should use IOPN to receive a callback once the + * processing has been completed. + * Note that Amazon reserves the right to throttle requests that + * ignore this advice and poll for a response + * + * @param string $amazonRefundId refund id to query status of + * + * @return OffAmazonPaymentsService_Model_GetRefundDetailsResponse response","$captureDetailsRequest + = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest(); + $captureDetailsRequest->setSellerId($this->_sellerId); + $captureDetailsRequest->setAmazonCaptureId($this->_amazonCaptureId); + + return $this->_service->getCaptureDetails($captureDetailsRequest);",- +captures,__construct,"* RefundExampleCLI class captures input from stdin and prints to stdout, + * and drives the refund example + *","if (count($argv) < 3) { + print ""Missing mandatory argument: "" . + ""please provide an amazonOrderReferenceId, a"" . + ""captureId that you want to refund, and"" . + ""a refund id suffix for the refund reference id""; + exit(0);",- +captures,runSample,"* Create a new instance of the cli example and validate command line arguments + * + * @param array $argv arguments to the application passed from the command line","$this->_getOrderReferenceDetails(); + $this->_getAmountToRefund(); + $refundAmount = $this->_getRefundAmount(); + $refundCurrency = $this->_getRefundCurrency(); + $amazonRefundReferenceId = $this->_refundToBuyer($refundAmount, $refundCurrency); + $this->_waitUntilRefundProcessingIsCompleted($amazonRefundReferenceId); + + print ""Refund completed"" . PHP_EOL;",- +SimpleCheckoutExample,__construct,"* SimpleCheckoutExample includes the logic + * required to capture an order and perform + * all actions to capture the order amount from + * the buyer + *","$this->_service = $service; + $this->_amazonOrderReferenceId = $amazonOrderReferenceId; + $this->_sellerId = $this->_service->getMerchantValues()->getMerchantId(); + $this->_shippingAndTaxCostHelper = new ShippingAndTaxCostHelper(); + + /* + * Setup shared identifiers for the series of transaction requests + */ + $this->_authorizationReferenceId + = str_replace(""-"", """", $this->_amazonOrderReferenceId) . ""A01""; + $this->_captureReferenceId = $this->_authorizationReferenceId . ""C01"";",- +SimpleCheckoutExample,getOrderReferenceDetails,"* Create a new instance of the simple checkout example + * case + * + * @param OffAmazonPaymentsService_Client $service instance of the service + * client + * @param string $amazonOrderReferenceId an order reference object in + * draft state to use in + * the example + * + * @return new SimpleCheckoutExample","$getOrderReferenceDetailsRequest = new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest(); + $getOrderReferenceDetailsRequest->setSellerId($this->_sellerId); + $getOrderReferenceDetailsRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + + return $this->_service->getOrderReferenceDetails($getOrderReferenceDetailsRequest);",- +SimpleCheckoutExample,calculateOrderTotalBasedOnBuyerDetails,"* Use the order reference object to query the order information, including + * the current physical delivery address as selected by the buyer + * + * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse service response","return $this->_shippingAndTaxCostHelper->calculateTotalAmount($orderReferenceDetails, + $orderAmountPreTaxAndShipping, $shippingType);",- +SimpleCheckoutExample,addOrderTotalAndSellerInformationToOrder,"* Calculate the total amount to charge the buyer for this order, + * based on the buyer destination address + * + * Note that until the order is confirmed, the name & address fields will + * not be returned to the client + * + * @param OffAmazonPaymentsService_Model_OrderReferenceDetails $orderReferenceDetails response + * @param string $orderAmountPreTaxAndShipping order amount + * @param int $shippingType shipping type + * + * @return float total amount for the order, with shipping and tax included","/* + * Setup request parameters and uncomment invoke to try out + * sample for Set Order Reference Details Action + */ + $setOrderReferenceDetailsRequest = new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest(); + $setOrderReferenceDetailsRequest->setSellerId($this->_sellerId); + $setOrderReferenceDetailsRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + $setOrderReferenceDetailsRequest->setOrderReferenceAttributes(new OffAmazonPaymentsService_Model_OrderReferenceAttributes()); + $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->setOrderTotal(new OffAmazonPaymentsService_Model_OrderTotal()); + $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getOrderTotal()->setCurrencyCode($this->_service->getMerchantValues()->getCurrency()); + $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getOrderTotal()->setAmount($orderTotal); + $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->setSellerNote(""Red widgets""); + $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->setSellerOrderAttributes(new OffAmazonPaymentsService_Model_SellerOrderAttributes()); + $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getSellerOrderAttributes()->setSellerOrderId(""AD32333432212""); + $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getSellerOrderAttributes()->setStoreName(""Domestic site""); + $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getSellerOrderAttributes()->setCustomInformation(""Add blue stripe""); + + return $this->_service->setOrderReferenceDetails($setOrderReferenceDetailsRequest);",- +SimpleCheckoutExample,confirmOrderReference,"* Add order information by making the call to setOrderReferenceDetails with + * the total order amount, as well as notes describing the order information + * + * @param float $orderTotal total value of the order, incl shipping and tax + * + * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse service response","$confirmOrderReferenceRequest + = new OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest(); + $confirmOrderReferenceRequest + ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + $confirmOrderReferenceRequest->setSellerId($this->_sellerId); + + return $this->_service->confirmOrderReference($confirmOrderReferenceRequest);",- +SimpleCheckoutExample,authorizeOrderAmount,"* Confirm the order reference information, allowing for + * authorizations and captures to be created + * + * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse service response","$authorizeRequest = new OffAmazonPaymentsService_Model_AuthorizeRequest(); + $authorizeRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + $authorizeRequest->setSellerId($this->_sellerId); + $authorizeRequest->setAuthorizationReferenceId($this->_authorizationReferenceId); + $authorizeRequest->setAuthorizationAmount(new OffAmazonPaymentsService_Model_Price()); + $authorizeRequest->getAuthorizationAmount()->setAmount($authorizationAmount); + $authorizeRequest->getAuthorizationAmount()->setCurrencyCode($this->_service->getMerchantValues()->getCurrency()); + + return $this->_service->authorize($authorizeRequest);",- +SimpleCheckoutExample,waitUntilAuthorizationProcessingIsCompleted,"* Perform the authorize call for the order + * + * @param float $authorizationAmount amount to authorize from the buyer + * + * @return OffAmazonPaymentsService_Model_AuthorizeResponse service response","$getAuthorizationDetailsResponse = null; + do { + sleep(5); + $getAuthorizationDetailsResponse + = $this->getAuthorizationDetails($amazonAuthorizationId);",- +SimpleCheckoutExample,getAuthorizationDetails,"* Poll the API for the status of the Authorization Request, and continue + * once the status has been updated + * WARNING: This is not the way to integrate for production systems, + * instead merchants should use IPN to receive a callback once the + * processing has been completed. + * Note that Amazon reserves the right to throttle requests that + * ignore this advice and poll for a response + * + * @param string $amazonAuthorizationReferenceId authorization transaction to query + * + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse service response","$getAuthorizationDetailsRequest = new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest(); + $getAuthorizationDetailsRequest->setSellerId($this->_sellerId); + $getAuthorizationDetailsRequest->setAmazonAuthorizationId($amazonAuthorizationReferenceId); + + return $this->_service->getAuthorizationDetails($getAuthorizationDetailsRequest);",- +SimpleCheckoutExample,captureOrderAmount,"* Perform the getAuthroizationDetails request for the order + * + * @param string $amazonAuthorizationReferenceId authorization transaction + * to query + * + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse service response","$captureRequest = new OffAmazonPaymentsService_Model_CaptureRequest(); + $captureRequest->setSellerId($this->_sellerId); + $captureRequest->setAmazonAuthorizationId($amazonAuthorizationId); + $captureRequest->setCaptureReferenceId($this->_captureReferenceId); + $captureRequest->setCaptureAmount(new OffAmazonPaymentsService_Model_Price()); + $captureRequest->getCaptureAmount()->setAmount($captureAmount); + $captureRequest->getCaptureAmount()->setCurrencyCode($this->_service->getMerchantValues()->getCurrency()); + + return $this->_service->capture($captureRequest);",- +SimpleCheckoutExample,getCaptureDetails,"* Perform the capture call for the order + * + * @param float $captureAmount amount to capture from the buyer + * @param string $amazonAuthorizationId auth id to perform the capture on + * + * @return OffAmazonPaymentsService_Model_CaptureResponse service response","$captureDetailsRequest + = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest(); + $captureDetailsRequest->setSellerId($this->_sellerId); + $captureDetailsRequest->setAmazonCaptureId($amazonCaptureId); + + return $this->_service->getCaptureDetails($captureDetailsRequest);",- +SimpleCheckoutExample,closeOrderReference,"* Perform the get capture details call for the order + * + * @param string $amazonCaptureId capture it to get details for + * + * @return OffAmazonPaymentsService_Model_CaptureResponse service response","$closeOrderReferenceRequest = new OffAmazonPaymentsService_Model_CloseOrderReferenceRequest(); + $closeOrderReferenceRequest->setSellerId($this->_sellerId); + $closeOrderReferenceRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + $closeOrderReferenceRequest->setClosureReason(""Order complete""); + + return $this->_service->closeOrderReference($closeOrderReferenceRequest);",- +drives,__construct,"* Create a new instance of the cli example and + * validate command line arguments + * + * @param array $argv arguments to the appplication passed from the command line","if (count($argv) < 1) { + print ""Missing mandatory argument: "" . + ""please provide an amazonOrderReferenceId""; + exit(0);",- +drives,runSample,"* Run all the steps for the sample in sequence + *","$orderTotal = $this->_calculateOrderTotalBasedOnBuyerDestinationAddress(); + $this->_addOrderTotalAndSellerInformationToOrder($orderTotal); + $this->_confirmOrderReference(); + $amazonAuthorizationId = $this->_authorizeOrderAmount($orderTotal); + $this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId); + $this->_captureOrderAmount($orderTotal, $amazonAuthorizationId); + $this->_closeOrderReference(); + print ""Payment capture completed"" . PHP_EOL;",- +SplitShipmentsCheckoutExample,__construct,"* Create a new instance of the split shipments + * checkout example + * + * @param OffAmazonPaymentsService_Client $service instance of the service client + * + * @param string $amazonOrderReferenceId an order reference object in + * draft state to use in + * the example + * + * @return new SplitShipmentsCheckoutExample","$this->_service = $service; + $this->_amazonOrderReferenceId = $amazonOrderReferenceId; + + /* + * Setup shared identifiers for the series of transaction requests + */ + $this->_authorizationReferenceIdBase + = str_replace(""-"", """", $this->_amazonOrderReferenceId) . ""a01""; + $this->_captureReferenceIdBase = $this->_authorizationReferenceIdBase . ""c01""; + + $this->_sellerId + = $this->_service->getMerchantValues()->getMerchantId(); + + /* + * Initialize the variable holding the shipments that are part + * of the order + */ + $this->_orderShipments = array(); + $this->_itemsInStock = array( + new Item(""Apple"", 3.20), + new Item(""Pinapple"", 1.8), + new Item(""Banana"", 0.9), + new Item(""Orange"", 1.2), + new Item(""Pear"", 2.1) + );",- +SplitShipmentsCheckoutExample,addOrderAmountToOrderReference,"* Step 1: calcaulte the total value of the order and set the amount on the order + * reference + *","$setOrderReferenceDetailsRequest = new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest(); + $setOrderReferenceDetailsRequest->setSellerId($this->_sellerId); + $setOrderReferenceDetailsRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + $setOrderReferenceDetailsRequest->setOrderReferenceAttributes(new OffAmazonPaymentsService_Model_OrderReferenceAttributes()); + $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->setOrderTotal(new OffAmazonPaymentsService_Model_OrderTotal()); + $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getOrderTotal()->setCurrencyCode($this->_service->getMerchantValues()->getCurrency()); + $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getOrderTotal()->setAmount($this->_getOrderTotal()); + + return $this->_service->setOrderReferenceDetails($setOrderReferenceDetailsRequest);",- +SplitShipmentsCheckoutExample,confirmOrderReference,"* Confirm the order reference information, allowing for + * authorizations and captures to be created + * + * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse service response","$confirmOrderReferenceRequest + = new OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest(); + $confirmOrderReferenceRequest + ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + $confirmOrderReferenceRequest->setSellerId($this->_sellerId); + + return $this->_service->confirmOrderReference($confirmOrderReferenceRequest);",- +SplitShipmentsCheckoutExample,performAuthorizationForShipment,"* Perform the authorization for the shipment at the given index + * + * @param int $shipmentNumber order item index to authorize + * + * @return OffAmazonPaymentsService_Model_AuthorizeResponse service response","$item = $this->_orderShipments[$shipmentNumber]; + + $authorizeRequest = new OffAmazonPaymentsService_Model_AuthorizeRequest(); + $authorizeRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + $authorizeRequest->setSellerId($this->_sellerId); + $authorizeRequest + ->setAuthorizationReferenceId($this->_authorizationReferenceIdBase . $shipmentNumber); + $authorizeRequest->setAuthorizationAmount(new OffAmazonPaymentsService_Model_Price()); + $authorizeRequest->getAuthorizationAmount()->setAmount($item->price); + $authorizeRequest->getAuthorizationAmount()->setCurrencyCode($this->_service->getMerchantValues()->getCurrency()); + + // Set the application timeout so that the polling request will + // get a definitive response within this period of time + $authorizeRequest->setTransactionTimeout(5); + + return $this->_service->authorize($authorizeRequest);",- +SplitShipmentsCheckoutExample,waitUntilAuthorizationProcessingIsCompleted,"* Poll the API for the status of the Authorization Request, and continue + * once the status has been updated + * WARNING: This is not the way to integrate for production systems, + * instead merchants should use IPN to receive a callback once the + * processing has been completed. + * Note that Amazon reserves the right to throttle requests that + * ignore this advice and poll for a response + * + * @param string $amazonAuthorizationReferenceId authorization transaction to query + * + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse service response","$getAuthorizationDetailsResponse = null; + do { + sleep(5); + $getAuthorizationDetailsResponse + = $this->getAuthorizationDetails($amazonAuthorizationId);",- +SplitShipmentsCheckoutExample,getAuthorizationDetails,"* Perform the getAuthroizationDetails request for the order + * + * @param string $amazonAuthorizationReferenceId authorization transaction + * to query + * + * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse service response","$getAuthorizationDetailsRequest = new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest(); + $getAuthorizationDetailsRequest->setSellerId($this->_sellerId); + $getAuthorizationDetailsRequest->setAmazonAuthorizationId($amazonAuthorizationId); + + return $this->_service->getAuthorizationDetails($getAuthorizationDetailsRequest);",- +SplitShipmentsCheckoutExample,performCaptureForShipment,"* Perform the capture for a single shipment + * + * @param int $shipmentNumber order item index to capture + * @param string $amazonAuthorizationId authorization to capture + * + * @return OffAmazonPayments_Model_CaptureResponse service response","$item = $this->_orderShipments[$shipmentNumber]; + + $captureRequest = new OffAmazonPaymentsService_Model_CaptureRequest(); + $captureRequest->setSellerId($this->_sellerId); + $captureRequest->setAmazonAuthorizationId($amazonAuthorizationId); + $captureRequest + ->setCaptureReferenceId($this->_captureReferenceIdBase . $shipmentNumber); + $captureRequest->setCaptureAmount(new OffAmazonPaymentsService_Model_Price()); + $captureRequest->getCaptureAmount()->setAmount($item->price); + $captureRequest->getCaptureAmount()->setCurrencyCode($this->_service->getMerchantValues()->getCurrency()); + + return $this->_service->capture($captureRequest);",- +SplitShipmentsCheckoutExample,getCaptureDetails,"* Perform the get capture details call for the order + * + * @param string $amazonCaptureId capture it to get details for + * + * @return OffAmazonPaymentsService_Model_CaptureResponse service response","$captureDetailsRequest + = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest(); + $captureDetailsRequest->setSellerId($this->_sellerId); + $captureDetailsRequest->setAmazonCaptureId($amazonCaptureId); + + return $this->_service->getCaptureDetails($captureDetailsRequest);",- +SplitShipmentsCheckoutExample,closeOrderReference,"* Close this order reference to indicate that the order is complete, and + * no further authorizations and captures will be performed on this order + * + * @return OffAmazonPaymentsService_Model_CloseOrderReferenceResponse service response","$closeOrderReferenceRequest = new OffAmazonPaymentsService_Model_CloseOrderReferenceRequest(); + $closeOrderReferenceRequest->setSellerId($this->_sellerId); + $closeOrderReferenceRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); + $closeOrderReferenceRequest->setClosureReason(""Order complete""); + + return $this->_service->closeOrderReference($closeOrderReferenceRequest);",- +SplitShipmentsCheckoutExample,addShipmentToOrder,"* Add a new shipment of an item to the order + * + * @param int $itemIndex index of the item to place in this order + *","array_push($this->_orderShipments, $this->_itemsInStock[$itemIndex]);",- +SplitShipmentsCheckoutExample,getItemNames,"* Return the names of the items available to place into the order + * + * @return array names of available items","return array_map( + function($item) { + return $item->name;",- +SplitShipmentsCheckoutExample,__construct,"* Return the total amount for the order + * + * @return int order total","$this->price = $price; + $this->name = $name;",- +captures,__construct,"* Create a new instance of the cli example and + * validate command line arguments + * + * @param array $argv arguments to the application passed to the command line","if (count($argv) < 1) { + print ""Missing mandatory argument: "" . + ""please provide an amazonOrderReferenceId""; + exit(0);",- +captures,runSample,"* Run all the steps for the sample in sequence + *","$shipments = $this->_getNumberOfShipmentsInOrder(); + $this->_addShipmentsToOrder($shipments); + $this->_addOrderAmountToOrderReference(); + $this->_confirmOrderReference(); + $this->_performAuthAndCaptureForOrderShipments($shipments); + $this->_closeOrderReference(); + print ""Split shipments checkout example completed"" . PHP_EOL;",- +to,__construct,* Utility class to help store data required for our payment scenario,"$this->shippingRates = $shippingRates; + $this->taxRates = $taxRates;",- +AmazonButtonWidgetMapper,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('amazonActionPluginSpotName', 'string', 'amazonActionPlugin'); + $oRequirements->NeedsSourceObject('amazonPaymentMethodInternalName', 'string', 'amazon');",- +AmazonButtonWidgetMapper,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",* {@inheritdoc},"if (false === \TdbShopShippingGroupList::GetShippingGroupsThatAllowPaymentWith($oVisitor->GetSourceObject('amazonPaymentMethodInternalName'))) { + $oVisitor->SetMappedValue('amazonPayment', array('amazonPaymentEnabled' => false)); + + return;",- +AmazonWidgetMapper,GetRequirements,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the + * needed information and returning it. + * + * example: + * + * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); + * $oRequirements->NeedsSourceObject(""bar""); + * $oRequirements->NeedsMappedValue(""baz""); + * + * @param IMapperRequirementsRestricted $oRequirements","$oRequirements->NeedsSourceObject('basket', 'TShopBasket', TShopBasket::GetInstance()); + $oRequirements->NeedsSourceObject( + 'config', + '\\ChameleonSystem\\AmazonPaymentBundle\\AmazonPaymentGroupConfig', + AmazonPaymentConfigFactory::createConfig($this->getActivePortalId()) + );",- +AmazonWidgetMapper,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",* {@inheritdoc},"/** @var TShopBasket $basket */ + $basket = $oVisitor->GetSourceObject('basket'); + /** @var AmazonPaymentGroupConfig $config */ + $config = $oVisitor->GetSourceObject('config'); + + $errorURL = array('module_fnc' => array('amazonActionPlugin' => 'widgetError')); + $data = array( + 'sellerId' => $config->getMerchantId(), + 'amazonOrderReferenceId' => $basket->getAmazonOrderReferenceId(), + 'errorURL' => \TTools::GetArrayAsURL($errorURL, '?'), + ); + + $oVisitor->SetMappedValueFromArray($data);",- +AmazonPaymentExtranetAddress,getIsAmazonShippingAddress,* @return bool,return $this->isAmazonShippingAddress;,- +AmazonPaymentExtranetAddress,setIsAmazonShippingAddress,* @param bool $isAmazonShippingAddress,$this->isAmazonShippingAddress = $isAmazonShippingAddress;,- +AmazonPaymentExtranetUser,__sleep,* @var \TdbDataExtranetUserAddress|null,"$paramList = parent::__sleep(); + $this->amazonSleepData = array(); + $this->amazonSleepData['amazonPaymentEnabled'] = $this->amazonPaymentEnabled; + $this->amazonSleepData['originalShippingAddress'] = $this->originalShippingAddress; + $this->amazonSleepData['originalBillingAddress'] = $this->originalBillingAddress; + $paramList[] = 'amazonSleepData'; + + return $paramList;",- +AmazonPaymentExtranetUser,__wakeup,* @var \TdbDataExtranetUserAddress|null,"parent::__wakeup(); + if (is_array($this->amazonSleepData)) { + $this->amazonPaymentEnabled = $this->amazonSleepData['amazonPaymentEnabled']; + $this->originalShippingAddress = $this->amazonSleepData['originalShippingAddress']; + $this->originalBillingAddress = $this->amazonSleepData['originalBillingAddress']; + $this->amazonSleepData = null;",- +AmazonPaymentExtranetUser,isAmazonPaymentUser,"* we need this to store our private properties during sleep (php does not support private vars). + * + * @var array",return true === $this->getAmazonPaymentEnabled();,- +AmazonPaymentExtranetUser,resetAmazonAddresses,* @return bool,"if (true === $this->oShippingAddress->getIsAmazonShippingAddress()) { + $oldShippingAddress = $this->GetShippingAddress(); + if (null !== $this->originalShippingAddress) { + $newShippingAddress = $this->originalShippingAddress;",- +AmazonPaymentExtranetUser,setAmazonShippingAddress,* @param bool $amazonPaymentEnabled,"if (null === $this->oShippingAddress || false === $this->oShippingAddress->getIsAmazonShippingAddress()) { + $this->originalShippingAddress = $this->oShippingAddress;",- +AmazonPaymentBasket,getAmazonOrderReferenceId,"* If an error occurs during the Amazon Pay checkout, this variable is set to true. + * + * @var bool",return $this->amazonOrderReferenceId;,- +AmazonPaymentBasket,setAmazonOrderReferenceId,* @return string|null,"$this->amazonOrderReferenceId = $amazonOrderReferenceId; + if (null === $this->amazonOrderReferenceId) { + $this->resetAmazonPaymentReferenceData(); + $user->setAmazonPaymentEnabled(false);",- +AmazonPaymentBasket,resetAmazonPaymentReferenceData,"* @param null $amazonOrderReferenceId + * @param TdbDataExtranetUser $user the user for whom the Amazon payment will be enabled. + * Note that the user object will be changed in memory, but not persistent + * + * @throws TPkgCmsException_LogAndMessage","$this->amazonOrderReferenceId = null; + $this->amazonOrderReferenceValue = null;",- +AmazonPaymentBasket,hasAmazonPaymentError,* @return bool,return $this->errorDuringAmazonCheckout;,- +AmazonPaymentBasket,RecalculateBasket,* @throws TPkgCmsException_LogAndMessage,"parent::RecalculateBasket(); + if (null !== $this->amazonOrderReferenceValue && round($this->amazonOrderReferenceValue, 2) === round($this->dCostTotal, 2)) { + return;",- +AmazonPaymentHandler,PostSelectPaymentHook,* @var AmazonPaymentGroupConfig,"if (false === parent::PostSelectPaymentHook($sMessageConsumer)) { + return false;",- +AmazonPaymentHandler,ExecutePayment,* @return string,"if (false === parent::ExecutePayment($oOrder, $sMessageConsumer)) { + return false;",- +AmazonPaymentHandler,getAmazonOrderReferenceId,* {@inheritdoc},return $this->GetUserPaymentDataItem(self::PARAMETER_ORDER_REFERENCE_ID);,- +AmazonPaymentHandler,paymentTransactionHandlerFactory,"* return true if capture on shipment is active. + * + * @return bool",return new AmazonPayment($this->getAmazonPaymentGroupConfig($portalId));,- +AmazonPaymentHandler,isCaptureOnShipment,"* hook is called before the payment data is committed to the database. use it to cleanup/filter/add data you may + * want to include/exclude from the database. + * + * @param array $aPaymentData + * + * @return array","$isPaymentOnShipmentStored = $this->GetUserPaymentDataItem(self::PARAMETER_IS_PAYMENT_ON_SHIPMENT); + if (false !== $isPaymentOnShipmentStored) { + return '1' === $isPaymentOnShipmentStored;",- +AmazonPaymentHandler,getAmazonPaymentGroupConfig,@var PortalDomainServiceInterface $portalDomainService,"if (null !== $this->amazonPaymentGroupConfig) { + return $this->amazonPaymentGroupConfig;",- +AmazonPaymentHandler,setAmazonPaymentGroupConfig,* @return AmazonPaymentGroupConfig,$this->amazonPaymentGroupConfig = $amazonPaymentGroupConfig;,- +AmazonPaymentHandler,GetExternalPaymentReferenceIdentifier,* @param AmazonPaymentGroupConfig $amazonPaymentGroupConfig,return $this->getAmazonOrderReferenceId();,- +AmazonPaymentHandler,isBlockForUserSelection,"* some payment methods (such as paypal) get a reference number from the external + * service, that allows the shop owner to identify the payment executed in their + * Webservice. Since it is sometimes necessary to provided this identifier. + * + * every payment method that provides such an identifier needs to overwrite this method + * + * returns an empty string, if the method has no identifier. + * + * @return string","if (null === TShopBasket::GetInstance()->getAmazonOrderReferenceId()) { + return true;",- +AmazonShopOrder,getAmazonOrderReferenceId,"* returns amazon order reference id if the order was paid with amazon. throws an InvalidArgumentException if the + * order was not paid with amazon. + * + * @throws \InvalidArgumentException + * + * @return string","$paymentHandler = $this->GetPaymentHandler(); + if (false === ($paymentHandler instanceof AmazonPaymentHandler)) { + throw new \InvalidArgumentException('order was not paid with amazon payment');",- +AmazonShopOrder,CreateOrderInDatabaseCompleteHook,@var $paymentHandler AmazonPaymentHandler,"parent::CreateOrderInDatabaseCompleteHook(); + TdbDataExtranetUser::GetInstance()->setAmazonPaymentEnabled(false);",- +AmazonShopPaymentHandlerGroup,validateIPNRequestData,* @var AmazonPaymentGroupConfig,"$payload = $oRequest->getRequestPayload(); + if (isset($payload['amazonNotificationObject']) && $payload['amazonNotificationObject'] instanceof \OffAmazonPaymentsNotifications_InvalidMessageException) { + throw new AmazonPaymentIPNInvalidException($oRequest, 'there was an error parsing the Amazon IPN', 0, $payload['amazonNotificationObject']);",- +AmazonShopPaymentHandlerGroup,getOrderFromRequestData,* @var Request,"if (!is_array($aRequestData) || false === isset($aRequestData['amazonReferenceIdManager'])) { + return null;",- +AmazonShopPaymentHandlerGroup,processRawRequestData,* @var Connection,"$request = $this->getRequest(); + $headers = $this->getRequestHeader(); + $body = $request->getContent(); + $aRequestData['raw'] = array('header' => $headers, 'body' => $body); + try { + $config = $this->getAmazonConfig($this->getActivePortalId()); + + $client = $config->getAmazonIPNAPI(); + $aRequestData['amazonNotificationObject'] = $client->parseRawMessage($headers, $body); + + $localId = null; + /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Notification */ + $amazonNotificationObject = $aRequestData['amazonNotificationObject']; + switch ($amazonNotificationObject->getNotificationType()) { + case 'OrderReferenceNotification': + /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_OrderReferenceNotification */ + $details = $amazonNotificationObject->getOrderReference(); + $idManager = $config->amazonReferenceIdManagerFactory( + $this->getDatabaseConnection(), + AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_AMAZON_ORDER_REFERENCE_ID, + $details->getAmazonOrderReferenceId() + ); + $aRequestData['amazonReferenceIdManager'] = $idManager; + break; + case 'AuthorizationNotification': + /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_AuthorizationNotification */ + $details = $amazonNotificationObject->getAuthorizationDetails(); + $idManager = $config->amazonReferenceIdManagerFactory( + $this->getDatabaseConnection(), + AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID, + $details->getAuthorizationReferenceId() + ); + $aRequestData['amazonLocalReferenceId'] = $idManager->findFromLocalReferenceId( + $details->getAuthorizationReferenceId(), + IAmazonReferenceId::TYPE_AUTHORIZE + ); + $aRequestData['amazonReferenceIdManager'] = $idManager; + + break; + case 'CaptureNotification': + /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_CaptureNotification */ + $details = $amazonNotificationObject->getCaptureDetails(); + $idManager = $config->amazonReferenceIdManagerFactory( + $this->getDatabaseConnection(), + AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID, + $details->getCaptureReferenceId() + ); + $aRequestData['amazonLocalReferenceId'] = $idManager->findFromLocalReferenceId( + $details->getCaptureReferenceId(), + IAmazonReferenceId::TYPE_CAPTURE + ); + $aRequestData['amazonReferenceIdManager'] = $idManager; + break; + case 'RefundNotification': + /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_RefundNotification */ + $details = $amazonNotificationObject->getRefundDetails(); + $idManager = $config->amazonReferenceIdManagerFactory( + $this->getDatabaseConnection(), + AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID, + $details->getRefundReferenceId() + ); + $aRequestData['amazonLocalReferenceId'] = $idManager->findFromLocalReferenceId( + $details->getRefundReferenceId(), + IAmazonReferenceId::TYPE_REFUND + ); + $aRequestData['amazonReferenceIdManager'] = $idManager; + break;",- +AmazonShopPaymentHandlerGroup,getIPNStatus,* {@inheritdoc},"$aPayload = $oRequest->getRequestPayload(); + /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Notification */ + $amazonNotificationObject = $aPayload['amazonNotificationObject']; + $oStatus = \TdbPkgShopPaymentIpnStatus::GetNewInstance(); + if (false === $oStatus->LoadFromFields( + array( + 'code' => $amazonNotificationObject->getNotificationType(), + 'shop_payment_handler_group_id' => $this->id, + ) + ) + ) { + return null;",- +AmazonShopPaymentHandlerGroup,setDatabaseConnection,* {@inheritdoc},$this->databaseConnection = $connection;,- +AmazonAddressStep,Init,* {@inheritdoc},"parent::Init(); + $oUser = TdbDataExtranetUser::GetInstance(); + $shippingAddress = $oUser->GetShippingAddress(); + if (true === $shippingAddress->getIsAmazonShippingAddress()) { + $oUser->resetAmazonAddresses(); + $basket = $this->getShopService()->getActiveBasket(); + $basket->RecalculateBasket(); // need to recalculate maybe changing address can change basket amount (gross net change)",- +AmazonAddressStep,GetHtmlFooterIncludes,@var PortalDomainServiceInterface $portalDomainService,"$includes = parent::GetHtmlFooterIncludes(); + $includes[] = """"; + + return $includes;",- +AmazonBasketOrderStep,Init,* @return ExtranetUserProviderInterface,"parent::Init(); + $user = $this->getExtranetUserProvider()->getActiveUser(); + $user->setAmazonPaymentEnabled(false); + TShopBasket::GetInstance()->resetAmazonPaymentReferenceData();",- +AmazonConfirmOrderStep,GetHtmlFooterIncludes,* {@inheritdoc},"$includes = parent::GetHtmlFooterIncludes(); + + $includes[] = """"; + $includes[] = """"; + + return $includes;",- +AmazonShippingStep,GetHtmlFooterIncludes,* {@inheritdoc},"$includes = parent::GetHtmlFooterIncludes(); + + $includes[] = """"; + + return $includes;",- +AmazonShippingStep,ChangeShippingGroup,* {@inheritdoc},"parent::ChangeShippingGroup(); + TShopBasket::GetInstance()->RecalculateBasket(); // need to recalculate so that the new value is sent to amazon",- +AmazonShippingStep,Init,* @return ExtranetUserProviderInterface,"parent::Init(); + if (false === $this->AllowAccessToStep(true)) { + $this->JumpToStep($this->GetPreviousStep());",- +AmazonShopBasket,GetHtmlFooterIncludes,@var PortalDomainServiceInterface $portalDomainService,"$includes = parent::GetHtmlFooterIncludes(); + $activePortal = $this->getActivePortal(); + /* + * Always load Amazon payment JS if it is active for the current portal. Otherwise the button links would not + * work if the user just added a product via Ajax to the previously empty basket. + */ + if (false === $this->getPaymentInfoService()->isPaymentMethodActive('amazon', $activePortal)) { + return $includes;",- +AmazonShopOrderWizard,GetHtmlFooterIncludes,@var PortalDomainServiceInterface $portalDomainService,"$footerIncludes = array(); + try { + if (false === TdbShopShippingGroupList::GetShippingGroupsThatAllowPaymentWith('amazon')) { + return parent::GetHtmlFooterIncludes();",- +AmazonReferenceId,getLocalId,* @var int,return $this->localId;,- +AmazonReferenceId,getAmazonId,* @var string,return $this->amazonId;,- +AmazonReferenceId,getValue,"* return the transaction id associated with the counter. + * + * @return string",return $this->value;,- +AmazonReferenceId,__construct,* @param bool $captureNow,"$this->localId = $localId; + $this->value = $value; + $this->type = $type; + $this->transactionId = $transactionId; + $this->captureNow = false; + $this->requestMode = IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS;",- +AmazonReferenceId,setAmazonId,* @return bool,$this->amazonId = $amazonId;,- +AmazonReferenceId,getType,"* returns self::REQUEST_MODE_SYNCHRONOUS or self::REQUEST_MODE_ASYNCHRONOUS. + * + * @return int",return $this->type;,- +AmazonReferenceId,getTransactionId,"* @param int $requestMode - one of self::REQUEST_MODE_ASYNCHRONOUS + * + * @throws \InvalidArgumentException",return $this->transactionId;,- +AmazonReferenceIdList,__construct,* @var string,"$this->type = $type; + $this->amazonOrderReferenceId = $amazonOrderReferenceId;",- +AmazonReferenceIdList,getNew,* @var,"$item = new AmazonReferenceId($this->type, $this->generateLocalId(), $value, $transactionId); + $this->mappingList[] = $item; + + return $item;",- +AmazonReferenceIdList,getIterator: Traversable,* {@inheritdoc},return new \ArrayIterator($this->mappingList);,- +AmazonReferenceIdList,count: int,"* (PHP 5 >= 5.0.0)
+ * Retrieve an external iterator. + * + * @see http://php.net/manual/en/iteratoraggregate.getiterator.php + * + * @return Traversable An instance of an object implementing Iterator or + * Traversable + * @return \ArrayIterator",return count($this->mappingList);,- +AmazonReferenceIdList,addItem,"* (PHP 5 >= 5.1.0)
+ * Count elements of an object. + * + * @see http://php.net/manual/en/countable.count.php + * + * @return int the custom count as an integer. + *

+ *

+ * The return value is cast to an integer","if ($item->getType() !== $this->type) { + throw new \InvalidArgumentException(""expecting item of type {$this->type",- +AmazonReferenceIdList,getLast,"* returns the last element in the list. + * + * @return IAmazonReferenceId",return $this->mappingList[count($this->mappingList) - 1];,- +AmazonReferenceIdManager,__construct,* @var AmazonReferenceIdList[],"$this->amazonOrderReferenceId = $amazonOrderReferenceId; + $this->shopOrderId = $shopOrderId; + $this->idLists = array( + IAmazonReferenceId::TYPE_AUTHORIZE => new AmazonReferenceIdList($amazonOrderReferenceId, IAmazonReferenceId::TYPE_AUTHORIZE), + IAmazonReferenceId::TYPE_CAPTURE => new AmazonReferenceIdList($amazonOrderReferenceId, IAmazonReferenceId::TYPE_CAPTURE), + IAmazonReferenceId::TYPE_REFUND => new AmazonReferenceIdList($amazonOrderReferenceId, IAmazonReferenceId::TYPE_REFUND), + );",- +AmazonReferenceIdManager,createLocalAuthorizationReferenceId,* @var string,"/** @var $item IAmazonReferenceId */ + $item = $this->idLists[IAmazonReferenceId::TYPE_AUTHORIZE]->getNew($value, null); + $item->setRequestMode($requestMode); + + return $item;",- +AmazonReferenceIdManager,createLocalAuthorizationReferenceIdWithCaptureNow,* @var string,"/** @var $item IAmazonReferenceId */ + $item = $this->idLists[IAmazonReferenceId::TYPE_AUTHORIZE]->getNew($value, $transactionId); + $item->setRequestMode($requestMode); + $item->setCaptureNow(true); + + $captureItem = $this->createLocalCaptureReferenceId($item->getValue(), $transactionId); + $captureItem->setLocalId( + $item->getLocalId() + ); // captures created via capture now have the same id as the auth request + $captureItem->setRequestMode($requestMode); + $captureItem->setCaptureNow(true); + + return $item;",- +AmazonReferenceIdManager,createLocalCaptureReferenceId,"* @param int $requestMode IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS or IAmazonReferenceId::REQUEST_MODE_SYNCHRONOUS + * @param float $value + * + * @return IAmazonReferenceId","return $this->idLists[IAmazonReferenceId::TYPE_CAPTURE]->getNew($value, $transactionId);",- +AmazonReferenceIdManager,createLocalRefundReferenceId,@var $item IAmazonReferenceId,"return $this->idLists[IAmazonReferenceId::TYPE_REFUND]->getNew($value, $transactionId);",- +AmazonReferenceIdManager,findFromLocalReferenceId,"* @param int $requestMode IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS or IAmazonReferenceId::REQUEST_MODE_SYNCHRONOUS + * @param float $value + * @param string $transactionId - shop payment transaction id + * + * @return IAmazonReferenceId","/** @var $item IAmazonReferenceId */ + foreach ($this->idLists[$itemType] as $item) { + if ($localId === $item->getLocalId()) { + reset($this->idLists); + + return $item;",- +AmazonReferenceIdManager,persist,@var $item IAmazonReferenceId,"$dbal->beginTransaction(); + + $dbal->delete(self::PERSIST_TABLE, array('shop_order_id' => $this->getShopOrderId())); + reset($this->idLists); + /** @var $list IAmazonReferenceIdList */ + foreach ($this->idLists as $list) { + /** @var $item IAmazonReferenceId */ + foreach ($list as $item) { + $dbal->insert( + self::PERSIST_TABLE, + array( + 'id' => \TTools::GetUUID(), + 'local_id' => $item->getLocalId(), + 'shop_order_id' => $this->getShopOrderId(), + 'amazon_order_reference_id' => $this->amazonOrderReferenceId, + 'amazon_id' => (null !== $item->getAmazonId()) ? $item->getAmazonId() : '', + 'value' => $item->getValue(), + 'type' => $item->getType(), + 'request_mode' => (null !== $item->getRequestMode()) ? (string) $item->getRequestMode() : '', + 'capture_now' => (true === $item->getCaptureNow()) ? '1' : '0', + 'pkg_shop_payment_transaction_id' => (null !== $item->getTransactionId( + )) ? $item->getTransactionId() : '', + ) + );",- +AmazonReferenceIdManager,delete,"* @param $value + * @param string $transactionId - the transaction id associated with the counter + * + * @return IAmazonReferenceId","$dbal->delete( + self::PERSIST_TABLE, + array( + 'amazon_order_reference_id' => $this->amazonOrderReferenceId, + 'shop_order_id' => $this->getShopOrderId(), + ) + );",- +AmazonReferenceIdManager,getAmazonOrderReferenceId,"* @param $value + * @param $transactionId + * + * @return IAmazonReferenceId",return $this->amazonOrderReferenceId;,- +AmazonReferenceIdManager,getShopOrderId,"* @param $localId + * @param int $itemType one of IAmazonReferenceId::TYPE_* + * + * @return IAmazonReferenceId|null",return $this->shopOrderId;,- +AmazonReferenceIdManager,getListOfAuthorizations,@var $item IAmazonReferenceId,"if (0 === count($this->idLists[IAmazonReferenceId::TYPE_AUTHORIZE])) { + return null;",- +AmazonReferenceIdManager,getListOfCaptures,@var $list IAmazonReferenceIdList,"if (0 === count($this->idLists[IAmazonReferenceId::TYPE_CAPTURE])) { + return null;",- +AbstractAmazonPaymentCaptureOrder,test_amazon_api_error_on_set_order_reference_details,"* @param $includePhysicalProducts + * @param $includeDownloads + * + * @return \PHPUnit_Framework_MockObject_MockObject|\TdbShopOrder","$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); + + $order = $this->createOrderMock(true, true); + + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->never())->method('SaveFieldsFast'); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails')->will($this->throwException($expectedException)); + $amazonOrderRef->expects($this->never())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->never())->method('getOrderReferenceDetails'); + $amazonOrderRef->expects($this->never())->method('authorize'); + $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); + + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); + $transactionManager->expects($this->never())->method('addTransaction'); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + + /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ + $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); + $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); + + $exception = null; + try { + $amazonPayment->captureOrder($transactionManager, $order);",- +AbstractAmazonPaymentCaptureOrder,test_amazon_api_error_on_confirm_order_reference,@var \PHPUnit_Framework_MockObject_MockObject|\TdbShopOrder $order,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); + + $order = $this->createOrderMock(true, true); + + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->never())->method('SaveFieldsFast'); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); + $amazonOrderRef->expects($this->once())->method('confirmOrderReference')->will($this->throwException($expectedException)); + $amazonOrderRef->expects($this->never())->method('getOrderReferenceDetails'); + $amazonOrderRef->expects($this->never())->method('authorize'); + $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); + + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); + $transactionManager->expects($this->never())->method('addTransaction'); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + + /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ + $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); + $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); + + $exception = null; + try { + $amazonPayment->captureOrder($transactionManager, $order);",- +AbstractAmazonPaymentCaptureOrder,test_amazon_api_error_on_get_order_reference_details,@var $paymentHandler AmazonPaymentHandler|\PHPUnit_Framework_MockObject_MockObject,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); + + $order = $this->createOrderMock(true, true); + + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->never())->method('SaveFieldsFast'); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); + $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails')->will($this->throwException($expectedException)); + $amazonOrderRef->expects($this->never())->method('authorize'); + $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); + + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); + $transactionManager->expects($this->never())->method('addTransaction'); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + + /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ + $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); + $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); + + $exception = null; + try { + $amazonPayment->captureOrder($transactionManager, $order);",- +AbstractAmazonPaymentCaptureOrder,test_shippingAddressNotSet_constraint_error,@var \TdbShopOrderItem $orderItem,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_NO_SHIPPING_ADDRESS); + + $order = $this->createOrderMock(true, true); + + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->never())->method('SaveFieldsFast'); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails')->will($this->throwException($expectedException)); + $amazonOrderRef->expects($this->never())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->never())->method('getOrderReferenceDetails'); + $amazonOrderRef->expects($this->never())->method('authorize'); + $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); + + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); + $transactionManager->expects($this->never())->method('addTransaction'); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + + /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ + $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); + $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); + + $exception = null; + try { + $amazonPayment->captureOrder($transactionManager, $order);",- +AbstractAmazonPaymentCaptureOrder,test_paymentPlanNotSet_constraint_error,@var \TdbShopOrderItem $orderItem,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_NO_PAYMENT_PLAN_SET); + + $order = $this->createOrderMock(true, true); + + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->never())->method('SaveFieldsFast'); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails')->will($this->throwException($expectedException)); + $amazonOrderRef->expects($this->never())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->never())->method('getOrderReferenceDetails'); + $amazonOrderRef->expects($this->never())->method('authorize'); + $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); + + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); + $transactionManager->expects($this->never())->method('addTransaction'); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + + /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ + $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); + $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); + + $exception = null; + try { + $amazonPayment->captureOrder($transactionManager, $order);",- +AbstractAmazonPaymentCaptureOrder,test_AmountNotSet_constraint_error,@var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_NO_AMOUNT_SET); + + $order = $this->createOrderMock(true, true); + + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->never())->method('SaveFieldsFast'); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails')->will($this->throwException($expectedException)); + $amazonOrderRef->expects($this->never())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->never())->method('getOrderReferenceDetails'); + $amazonOrderRef->expects($this->never())->method('authorize'); + $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); + + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); + $transactionManager->expects($this->never())->method('addTransaction'); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + + /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ + $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); + $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); + + $exception = null; + try { + $amazonPayment->captureOrder($transactionManager, $order);",- +AbstractAmazonPaymentCaptureOrder,test_Unknown_constraint_error,"* @param \TdbShopOrder $order + * @param $includePhysicalProducts + * @param $includeDownloads + * + * @return \TPkgShopPaymentTransactionData","$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_UNKNOWN_CONSTRAINT); + + $order = $this->createOrderMock(true, true); + + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->never())->method('SaveFieldsFast'); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails')->will($this->throwException($expectedException)); + $amazonOrderRef->expects($this->never())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->never())->method('getOrderReferenceDetails'); + $amazonOrderRef->expects($this->never())->method('authorize'); + $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); + + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); + $transactionManager->expects($this->never())->method('addTransaction'); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + + /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ + $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); + $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); + + $exception = null; + try { + $amazonPayment->captureOrder($transactionManager, $order);",- +AbstractAmazonPaymentCaptureOrder,test_InvalidCountry_error,@var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_INVALID_ADDRESS); + + $order = $this->createOrderMock(true, true); + + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->never())->method('SaveFieldsFast'); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); + $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails')->will($this->throwException($expectedException)); + $amazonOrderRef->expects($this->never())->method('authorize'); + $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); + + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); + $transactionManager->expects($this->never())->method('addTransaction'); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + + /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ + $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); + $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); + + $exception = null; + try { + $amazonPayment->captureOrder($transactionManager, $order);",- +ConvertAddressFromAmazonToLocalTest,it_converts_partial_amazon_address_to_local,* @test,"$sourceAddress = array( + 'City' => 'Freiburg', + 'PostalCode' => '79098', + 'CountryCode' => 'de', + ); + $expectedAddress = array( + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'data_country_id' => '1', + ); + /** @var \PHPUnit_Framework_MockObject_MockObject|AmazonDataConverter $amazonConverter */ + $amazonConverter = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonDataConverter')->setMethods( + array('getCountryIdFromAmazonCountryCode') + )->getMock(); + $amazonConverter->expects($this->any())->method('getCountryIdFromAmazonCountryCode')->will( + $this->returnValue('1') + ); + + $convertedAddress = $amazonConverter->convertAddressFromAmazonToLocal($sourceAddress, AmazonDataConverter::ORDER_ADDRESS_TYPE_SHIPPING); + + $this->assertEquals($expectedAddress, $convertedAddress);",- +ConvertAddressFromAmazonToLocalTest,it_converts_full_amazon_address_to_local,@var \PHPUnit_Framework_MockObject_MockObject|AmazonDataConverter $amazonConverter,"$sourceAddress = array( + 'Name' => 'Mr. Dev', + 'AddressLine1' => 'ESONO AG', + 'AddressLine2' => 'Grünwälderstr. 10-14', + 'AddressLine3' => '2 OG', + 'City' => 'Freiburg', + 'County' => '', + 'District' => '', + 'StateOrRegion' => '', + 'PostalCode' => '79098', + 'CountryCode' => 'de', + 'Phone' => '0761 15 18 28 0', + ); + $expectedAddress = array( + 'lastname' => 'Mr. Dev', + 'company' => 'ESONO AG', + 'street' => 'Grünwälderstr. 10-14', + 'address_additional_info' => '2 OG', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'data_country_id' => '1', + 'telefon' => '0761 15 18 28 0', + ); + $amazonPayment = new AmazonPayment($this->getConfig()); + + /** @var \PHPUnit_Framework_MockObject_MockObject|AmazonDataConverter $amazonConverter */ + $amazonConverter = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonDataConverter')->setMethods( + array('getCountryIdFromAmazonCountryCode') + )->getMock(); + $amazonConverter->expects($this->any())->method('getCountryIdFromAmazonCountryCode')->will( + $this->returnValue('1') + ); + + $convertedAddress = $amazonConverter->convertAddressFromAmazonToLocal($sourceAddress, AmazonDataConverter::ORDER_ADDRESS_TYPE_SHIPPING); + $this->assertEquals($expectedAddress, $convertedAddress);",- +ConvertAddressFromAmazonToLocalTest,it_fails_on_invalid_address,* @test,"$sourceData = array('foo' => 'bar'); + $amazonPayment = new AmazonDataConverter(); + + $amazonPayment->convertAddressFromAmazonToLocal($sourceData, AmazonDataConverter::ORDER_ADDRESS_TYPE_SHIPPING);",- +ConvertAddressFromAmazonToLocalTest,test_get_local_from_amazon_address_lines,@var \PHPUnit_Framework_MockObject_MockObject|AmazonDataConverter $amazonConverter,"// line1 = company + // line2 = street+nr + $sourceList = array( + array( + 'source' => array( + 'AddressLine1' => 'ESONO AG', + 'AddressLine2' => 'Grünwälderstr. 10-14', + 'AddressLine3' => '2 OG', + ), + 'target' => array( + 'company' => 'ESONO AG', + 'street' => 'Grünwälderstr. 10-14', + 'address_additional_info' => '2 OG', + ), + ), + array( + 'source' => array( + 'AddressLine1' => '', + 'AddressLine2' => 'Grünwälderstr. 10-14', + 'AddressLine3' => '2 OG', + ), + 'target' => array( + 'company' => '', + 'street' => 'Grünwälderstr. 10-14', + 'address_additional_info' => '2 OG', + ), + ), + array( + 'source' => array( + 'AddressLine1' => '', + 'AddressLine2' => 'Grünwälderstr. 10-14', + 'AddressLine3' => '', + ), + 'target' => array( + 'company' => '', + 'street' => 'Grünwälderstr. 10-14', + 'address_additional_info' => '', + ), + ), + ); + + foreach ($sourceList as $testCase) { + $amazonPayment = new AmazonDataConverter(); + $converted = $amazonPayment->convertAddressFromAmazonToLocal($testCase['source'], AmazonDataConverter::ORDER_ADDRESS_TYPE_SHIPPING); + ksort($converted); + ksort($testCase['target']); + $this->assertEquals($testCase['target'], $converted);",- +ConvertAddressFromAmazonToLocalTest,test_convert_localToOrderAddressBilling,"* @test + * @expectedException \InvalidArgumentException","$prefixList = array( + AmazonDataConverter::ORDER_ADDRESS_TYPE_BILLING => array( + 'adr_billing_salutation_id' => '', + 'adr_billing_firstname' => '', + 'adr_billing_streetnr' => '', + 'adr_billing_fax' => '', + 'adr_billing_lastname' => 'Mr. Dev', + 'adr_billing_company' => 'ESONO AG', + 'adr_billing_street' => 'Grünwälderstr. 10-14', + 'adr_billing_additional_info' => '2 OG', + 'adr_billing_city' => 'Freiburg', + 'adr_billing_postalcode' => '79098', + 'adr_billing_country_id' => '1', + 'adr_billing_telefon' => '0761 15 18 28 0', + ), + AmazonDataConverter::ORDER_ADDRESS_TYPE_SHIPPING => array( + 'adr_shipping_salutation_id' => '', + 'adr_shipping_firstname' => '', + 'adr_shipping_streetnr' => '', + 'adr_shipping_fax' => '', + 'adr_shipping_lastname' => 'Mr. Dev', + 'adr_shipping_company' => 'ESONO AG', + 'adr_shipping_street' => 'Grünwälderstr. 10-14', + 'adr_shipping_additional_info' => '2 OG', + 'adr_shipping_city' => 'Freiburg', + 'adr_shipping_postalcode' => '79098', + 'adr_shipping_country_id' => '1', + 'adr_shipping_telefon' => '0761 15 18 28 0', + ), + ); + $sourceAddress = array( + 'lastname' => 'Mr. Dev', + 'company' => 'ESONO AG', + 'street' => 'Grünwälderstr. 10-14', + 'address_additional_info' => '2 OG', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'data_country_id' => '1', + 'telefon' => '0761 15 18 28 0', + ); + $converter = new AmazonDataConverter(); + foreach ($prefixList as $type => $expectedAddress) { + $result = $converter->convertLocalToOrderAddress($type, $sourceAddress); + $this->assertEquals($expectedAddress, $result);",- +FindBestCaptureMatchForRefundTest,test_refund_matched_in_sum_by_one,* expecting an exception.,"$expectedItemListFound = array('P01-1234567-1234567-0000004' => 30.00); + + $itemsInMatchList = array( + 'P01-1234567-1234567-0000001', // pending + 'P01-1234567-1234567-0000002', // success + 'P01-1234567-1234567-0000003', // closed + 'P01-1234567-1234567-0000004', // success-two + 'P01-1234567-1234567-0000005', // success-partial-refund + 'P01-1234567-1234567-0000006', // declined-ProcessingFailure + 'P01-1234567-1234567-0000007', // declined-AmazonRejected.xml + ); + + $captureList = $this->fixtureCaptureList(); + $orderRefObject = $this->helperOrderReferenceObjectFactory($captureList, $itemsInMatchList); + $list = $this->helperAmazonReferenceIdList($captureList, $itemsInMatchList); + $refundValue = $this->helperGetRefundValue($expectedItemListFound, $captureList); + + $itemListFound = $orderRefObject->findBestCaptureMatchForRefund($list, $refundValue); + + $this->assertEquals($expectedItemListFound, $itemListFound);",- +FindBestCaptureMatchForRefundTest,test_refund_matched_in_sum_by_two,* @return array,"$expectedItemListFound = array('P01-1234567-1234567-0000004' => 30.00, 'P01-1234567-1234567-0000002' => 94.50); + + $itemsInMatchList = array( + 'P01-1234567-1234567-0000001', // pending + 'P01-1234567-1234567-0000002', // success + 'P01-1234567-1234567-0000003', // closed + 'P01-1234567-1234567-0000004', // success-two + 'P01-1234567-1234567-0000005', // success-partial-refund + 'P01-1234567-1234567-0000006', // declined-ProcessingFailure + 'P01-1234567-1234567-0000007', // declined-AmazonRejected.xml + ); + + $captureList = $this->fixtureCaptureList(); + $orderRefObject = $this->helperOrderReferenceObjectFactory($captureList, $itemsInMatchList); + $list = $this->helperAmazonReferenceIdList($captureList, $itemsInMatchList); + $refundValue = $this->helperGetRefundValue($expectedItemListFound, $captureList); + + $itemListFound = $orderRefObject->findBestCaptureMatchForRefund($list, $refundValue); + + $this->assertEquals($expectedItemListFound, $itemListFound);",- +FindBestCaptureMatchForRefundTest,test_refund_matched_in_sum_by_one_larger_than_refund,@var $responseObject \OffAmazonPaymentsService_Model_CaptureDetails,"$expectedItemListFound = array('P01-1234567-1234567-0000002' => 94.50); + + $itemsInMatchList = array( + 'P01-1234567-1234567-0000001', // pending + 'P01-1234567-1234567-0000002', // success + 'P01-1234567-1234567-0000003', // closed + 'P01-1234567-1234567-0000004', // success-two + 'P01-1234567-1234567-0000005', // success-partial-refund + 'P01-1234567-1234567-0000006', // declined-ProcessingFailure + 'P01-1234567-1234567-0000007', // declined-AmazonRejected.xml + ); + + $captureList = $this->fixtureCaptureList(); + $orderRefObject = $this->helperOrderReferenceObjectFactory($captureList, $itemsInMatchList); + $list = $this->helperAmazonReferenceIdList($captureList, $itemsInMatchList); + $refundValue = $this->helperGetRefundValue($expectedItemListFound, $captureList); + + $refundValue = $refundValue - 10; + + $itemListFound = $orderRefObject->findBestCaptureMatchForRefund($list, $refundValue); + + $this->assertEquals($expectedItemListFound, $itemListFound);",- +FindBestCaptureMatchForRefundTest,test_refund_matched_in_sum_by_two_larger_than_refund,* @return AmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject,"$expectedItemListFound = array('P01-1234567-1234567-0000005' => 50.00, 'P01-1234567-1234567-0000002' => 94.50); + + $itemsInMatchList = array( + 'P01-1234567-1234567-0000001', // pending + 'P01-1234567-1234567-0000002', // success + 'P01-1234567-1234567-0000003', // closed + 'P01-1234567-1234567-0000004', // success-two + 'P01-1234567-1234567-0000005', // success-partial-refund + 'P01-1234567-1234567-0000006', // declined-ProcessingFailure + 'P01-1234567-1234567-0000007', // declined-AmazonRejected.xml + ); + + $captureList = $this->fixtureCaptureList(); + $orderRefObject = $this->helperOrderReferenceObjectFactory($captureList, $itemsInMatchList); + $list = $this->helperAmazonReferenceIdList($captureList, $itemsInMatchList); + $refundValue = $this->helperGetRefundValue($expectedItemListFound, $captureList); + + $refundValue = $refundValue - 10; + + $itemListFound = $orderRefObject->findBestCaptureMatchForRefund($list, $refundValue); + + $this->assertEquals($expectedItemListFound, $itemListFound);",- +FindBestCaptureMatchForRefundTest,test_refund_larger_then_remaining_captures,@var $orderRefObject AmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject,"$expectedItemListFound = array(); + + $itemsInMatchList = array( + 'P01-1234567-1234567-0000001', // pending + 'P01-1234567-1234567-0000002', // success + 'P01-1234567-1234567-0000003', // closed + 'P01-1234567-1234567-0000004', // success-two + 'P01-1234567-1234567-0000005', // success-partial-refund + 'P01-1234567-1234567-0000006', // declined-ProcessingFailure + 'P01-1234567-1234567-0000007', // declined-AmazonRejected.xml + ); + + $captureList = $this->fixtureCaptureList(); + $orderRefObject = $this->helperOrderReferenceObjectFactory($captureList, $itemsInMatchList); + $list = $this->helperAmazonReferenceIdList($captureList, $itemsInMatchList); + + $refundValue = 500; + + $expectedException = new \TPkgCmsException_LogAndMessage( + AmazonPayment::ERROR_NO_CAPTURE_FOUND_FOR_REFUND, + array('refundValue' => $refundValue, 'amazonIdListChecked' => implode(', ', $itemsInMatchList)) + ); + $exception = null; + + try { + $itemListFound = $orderRefObject->findBestCaptureMatchForRefund($list, $refundValue);",- +FindBestCaptureMatchForRefundTest,test_api_error,"* @param $captureList + * @param $itemsInMatchList + * + * @return AmazonReferenceIdList","$amazonApiErrorThrown = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR, array( + 'responseCode' => '123', + 'errorCode' => 'InternalServerError', + 'errorType' => 'Unknown', + 'message' => 'There was an unknown error in the service', + )); + + $expectedItemListFound = array('P01-1234567-1234567-0000004' => 30); + + $itemsInMatchList = array( + 'P01-1234567-1234567-0000001', // pending + 'P01-1234567-1234567-0000002', // success + 'P01-1234567-1234567-0000003', // closed + 'P01-1234567-1234567-0000004', // success-two + 'P01-1234567-1234567-0000005', // success-partial-refund + 'P01-1234567-1234567-0000006', // declined-ProcessingFailure + 'P01-1234567-1234567-0000007', // declined-AmazonRejected.xml + ); + + $captureList = $this->fixtureCaptureList(); + $orderRefObject = $this->helperOrderReferenceObjectFactory($captureList, $itemsInMatchList, $amazonApiErrorThrown); + $list = $this->helperAmazonReferenceIdList($captureList, $itemsInMatchList); + $refundValue = $this->helperGetRefundValue($expectedItemListFound, $captureList); + + $expectedException = new \TPkgCmsException_LogAndMessage( + AmazonPayment::ERROR_NO_CAPTURE_FOUND_FOR_REFUND, + array('refundValue' => $refundValue, 'amazonIdListChecked' => implode(', ', $itemsInMatchList)) + ); + $exception = null; + + try { + $itemListFound = $orderRefObject->findBestCaptureMatchForRefund($list, $refundValue);",- +GetOrderReferenceDetailsTest,test_success_before_order_was_confirmed,* @expectedException \InvalidArgumentException,"$expectedResponse = AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('partial.xml'); + $config = $this->helperGetConfig($expectedResponse, null); + + $object = new AmazonOrderReferenceObject($config, 'ORDER-REFERENCE-ID'); + + $orderReferenceDetails = $object->getOrderReferenceDetails( + array( + IAmazonOrderReferenceObject::CONSTRAINT_AMOUNT_NOT_SET, + IAmazonOrderReferenceObject::CONSTRAINT_PAYMENT_PLAN_NOT_SET, + ) + ); + + $this->assertEquals($expectedResponse->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails(), $orderReferenceDetails);",- +SetOrderReferenceDetailsTest,test_success,* @test,"$expectedResponse = AmazonPaymentFixturesFactory::setOrderReferenceDetailsResponse('success.xml', 1234.56); + + $config = $this->helperGetConfig($expectedResponse); + + $amazonOrderReferenceObject = new AmazonOrderReferenceObject($config, $this->order->getAmazonOrderReferenceId()); + $response = $amazonOrderReferenceObject->setOrderReferenceDetails($this->order); + + $this->assertEquals($expectedResponse->getSetOrderReferenceDetailsResult()->getOrderReferenceDetails(), $response);",- +SetOrderReferenceOrderValueTest,test_success,* @test,"$expectedResponse = AmazonPaymentFixturesFactory::setOrderReferenceDetailsResponse('success.xml', 1234.56); + + $config = $this->helperGetConfig($expectedResponse); + + $amazonOrderReferenceObject = new AmazonOrderReferenceObject($config, $this->order->getAmazonOrderReferenceId()); + $response = $amazonOrderReferenceObject->setOrderReferenceOrderValue(1234.56); + + $this->assertEquals($expectedResponse->getSetOrderReferenceDetailsResult()->getOrderReferenceDetails(), $response);",- +CancelOrderTest,test_success,@var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject,"$config = $this->getConfig(); + /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ + $amazonOrderReferenceObject = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); + $amazonOrderReferenceObject->expects($this->once())->method('cancelOrderReference') + ->with($this->equalTo(self::FIXTURE_CANCELLATION_REASON)); + + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderReferenceObject)); + $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); + /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ + $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); + + $amazonPayment = new AmazonPayment($config); + $amazonPayment->cancelOrder($transactionManager, $order, self::FIXTURE_CANCELLATION_REASON);",- +CancelOrderTest,test_api_error,@var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR, array( + 'responseCode' => '123', + 'errorCode' => 'InternalServerError', + 'errorType' => 'Unknown', + 'message' => 'There was an unknown error in the service', + )); + $config = $this->getConfig(); + /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ + $amazonOrderReferenceObject = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); + $amazonOrderReferenceObject->expects($this->once())->method('cancelOrderReference') + ->with($this->equalTo(self::FIXTURE_CANCELLATION_REASON)) + ->will($this->throwException($expectedException)); + + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderReferenceObject)); + $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); + /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ + $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); + + $amazonPayment = new AmazonPayment($config); + + $exception = null; + try { + $amazonPayment->cancelOrder($transactionManager, $order, self::FIXTURE_CANCELLATION_REASON);",- +CaptureOrder_PayOnOrderCompletionTest,test_CaptureSuccessButSynchronousAuthReturnsPending,"* we expect the same results for every basket type, so create on helper method to cover all 3 cases. + * + * @param bool $physicalProducts + * @param bool $downloads","$physicalProducts = false; + $downloads = true; + $order = $this->createOrderMock($physicalProducts, $downloads); + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->once())->method('SaveFieldsFast')->with( + $this->equalTo( + array( + 'user_email' => 'amazonpayment@rn.esono.de', + 'adr_billing_lastname' => 'Mr. Dev', + 'adr_billing_telefon' => '+49 761 15 18 28 0', + 'adr_shipping_use_billing' => '0', + 'adr_shipping_salutation_id' => '', + 'adr_shipping_company' => 'ESONO AG', + 'adr_shipping_additional_info' => '2 OG', + 'adr_shipping_firstname' => '', + 'adr_shipping_lastname' => 'Mr. Dev', + 'adr_shipping_street' => 'Grünwälderstr. 10-14', + 'adr_shipping_streetnr' => '', + 'adr_shipping_city' => 'Freiburg', + 'adr_shipping_postalcode' => '79098', + 'adr_shipping_country_id' => '1', + 'adr_shipping_telefon' => '0761 15 18 28 0', + ) + ) + ); + + // - one transaction for the complete amount + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction', 'getTransactionDataFromOrder', 'confirmTransaction')); + $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, $physicalProducts, $downloads); + + $transactionManager->expects($this->once())->method('getTransactionDataFromOrder')->will($this->returnValue($expectedTransactionData)); + /** @var $mockTransactionResponse \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ + $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); + $mockTransactionResponse->id = 'MOCK-TRANSACTION'; + $mockTransactionResponse->fieldSequenceNumber = 123; + $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( + $mockTransactionResponse + ) + ); + + // the sync part should have its transaction confirmed + $transactionManager->expects($this->never())->method('confirmTransaction'); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + + // - an auth + capture for the complete order + // \TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous, $invoiceNumber + $amazonOrderRef->expects($this->once())->method('authorizeAndCapture')->with( + $this->equalTo($order), // \TdbShopOrder $order + $this->equalTo('LOCAL-AUTH-ID-WITH-CAPTURE'), // $localAuthorizationReferenceId + $this->equalTo($order->fieldValueTotal), // $amount + $this->equalTo(true), // $synchronous + $this->equalTo(null) // $invoiceNumber + )->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('pending.xml')->getAuthorizeResult()->getAuthorizationDetails())); + $amazonOrderRef->expects($this->never())->method('authorize'); + + // mock amazonOrderRef Object methods so we get the expected response + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); + $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') + ->will( + $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() + ) + ); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + + $mockLocalWithCaptureId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalWithCaptureId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID-WITH-CAPTURE')); + $mockLocalWithCaptureId->expects($this->once())->method('setAmazonId')->with($this->equalTo('P01-1234567-1234567-0000001')); + $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalWithCaptureId)); + $mockLocalWithCaptureAuthId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalWithCaptureAuthId->expects($this->once())->method('setAmazonId')->with($this->equalTo('AMAZON-CAPTURE-ID')); + $amazonReferenceIdManagerMock->expects($this->once())->method('findFromLocalReferenceId')->with($this->equalTo('LOCAL-AUTH-ID-WITH-CAPTURE'), $this->equalTo(IAmazonReferenceId::TYPE_CAPTURE))->will($this->returnValue($mockLocalWithCaptureAuthId)); + + $amazonReferenceIdManagerMock->expects($this->exactly(2))->method('persist'); + + $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); + + // expect a transaction t + + $amazonPayment = new AmazonPayment($config); + $amazonPayment->setDb(self::$dbal); + $transaction = $amazonPayment->captureOrder($transactionManager, $order); + $this->assertEquals($mockTransactionResponse, $transaction);",- +CaptureOrder_PayOnOrderCompletionTest,test_capture_downloads_only,@var $mockTransactionResponse \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"$this->helperCaptureSuccess(false, true);",- +CaptureOrder_PayOnOrderCompletionTest,test_capture_physical_products_only,"* we expect the same results for every basket type, so create on helper method to cover all 3 cases. + * + * @param bool $physicalProducts + * @param bool $downloads","$this->helperCaptureSuccess(true, false);",- +CaptureOrder_PayOnOrderCompletionTest,test_capture_mixed_basket,@var $mockTransactionResponse \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"$this->helperCaptureSuccess(true, true);",- +CaptureOrder_PayOnOrderCompletionTest,test_amazon_api_error_downloads_only,"* we always expect the order details to be set and the order reference to be confirmed. + * + * the order contains only downloads, so we expect + * - one transaction for the complete amount + * - an auth + capture for the complete order + * - the orders shipping address to be updated + * - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed)","$this->helperAmazonApiErrorOnAuthorize(false, true);",- +CaptureOrder_PayOnOrderCompletionTest,test_amazon_api_error_physical_only,@var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject,"$this->helperAmazonApiErrorOnAuthorize(true, false);",- +CaptureOrder_PayOnOrderCompletionTest,test_amazon_api_error_mixed,"* we expect the order to be canceled and otherwise unchanged. There should be no transaction, and neither auth nor auth+capture calls.","$this->helperAmazonApiErrorOnAuthorize(true, true);",- +CaptureOrder_PayOnOrderCompletionTest,test_synchronous_auth_declined_invalidPaymentMethod,* we expect the order to be canceled but otherwise unchanged. there should be no auth or auth+capture and no transactions.,"$this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_INVALID_PAYMENT_METHOD, AmazonPayment::ERROR_AUTHORIZATION_DECLINED);",- +CaptureOrder_PayOnOrderCompletionTest,test_synchronous_auth_declined_amazonRejected,"* the order reference was confirmed but not used. so we expect + * - the order ref object to be canceled + * - the order to be canceled and unchanged + * - no calls to auth or auth+capture + * - no transactions.","$this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_AMAZON_REJECTED, AmazonPayment::ERROR_AUTHORIZATION_DECLINED);",- +CaptureOrder_PayOnOrderCompletionTest,test_synchronous_auth_declined_processingFailure,"* the error should be thrown when trying to setOrderReferenceDetails, so we expect the method to cancel the order.","$this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_PROCESSING_FAILURE, AmazonPayment::ERROR_AUTHORIZATION_DECLINED);",- +CaptureOrder_PayOnOrderCompletionTest,test_synchronous_auth_declined_transactionTimedOut,* expect the same as test_shippingAddressNotSet_constraint_error.,"$this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_TRANSACTION_TIMED_OUT, AmazonPayment::ERROR_AUTHORIZATION_DECLINED);",- +CaptureOrder_PayOnOrderCompletionTest,test_amazon_api_error_on_set_order_reference_details,* expect order to be canceled.,parent::test_amazon_api_error_on_set_order_reference_details(); // expect same as paymentOnShipment,- +CaptureOrder_PayOnOrderCompletionTest,test_amazon_api_error_on_confirm_order_reference,* expect order to be canceled.,parent::test_amazon_api_error_on_confirm_order_reference(); // expect same as paymentOnShipment,- +CaptureOrder_PayOnOrderCompletionTest,test_amazon_api_error_on_get_order_reference_details,* expect order to be canceled.,parent::test_amazon_api_error_on_get_order_reference_details(); // expect same as paymentOnShipment,- +CaptureOrder_PayOnShipmentTest,test_capture_downloads_only,"* we always expect the order details to be set and the order reference to be confirmed. + * + * the order contains only downloads, so we expect + * - one transaction for the complete amount + * - an auth + capture for the complete order + * - the orders shipping address to be updated + * - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed)","$order = $this->createOrderMock(false, true); + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->once())->method('SaveFieldsFast')->with( + $this->equalTo( + array( + 'user_email' => 'amazonpayment@rn.esono.de', + 'adr_billing_lastname' => 'Mr. Dev', + 'adr_billing_telefon' => '+49 761 15 18 28 0', + 'adr_shipping_use_billing' => '0', + 'adr_shipping_salutation_id' => '', + 'adr_shipping_company' => 'ESONO AG', + 'adr_shipping_additional_info' => '2 OG', + 'adr_shipping_firstname' => '', + 'adr_shipping_lastname' => 'Mr. Dev', + 'adr_shipping_street' => 'Grünwälderstr. 10-14', + 'adr_shipping_streetnr' => '', + 'adr_shipping_city' => 'Freiburg', + 'adr_shipping_postalcode' => '79098', + 'adr_shipping_country_id' => '1', + 'adr_shipping_telefon' => '0761 15 18 28 0', + ) + ) + ); + + // - one transaction for the complete amount + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction', 'getTransactionDataFromOrder', 'confirmTransaction')); + $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, false, true); + $transactionManager->expects($this->once())->method('getTransactionDataFromOrder')->will($this->returnValue($expectedTransactionData)); + $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); + $mockTransactionResponse->id = 'MOCK-TRANSACTION'; + $mockTransactionResponse->fieldSequenceNumber = 123; + $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( + $mockTransactionResponse + ) + ); + $transactionManager->expects($this->once())->method('confirmTransaction')->with($this->equalTo(123), $this->anything())->will($this->returnValue($mockTransactionResponse)); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + + // - an auth + capture for the complete order + // \TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous, $invoiceNumber + $amazonOrderRef->expects($this->once())->method('authorizeAndCapture')->with( + $this->equalTo($order), // \TdbShopOrder $order + $this->equalTo('LOCAL-AUTH-ID'), // $localAuthorizationReferenceId + $this->equalTo($order->fieldValueTotal), // $amount + $this->equalTo(true), // $synchronous + $this->equalTo(null) // $invoiceNumber + )->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success-synchronous.xml')->getAuthorizeResult()->getAuthorizationDetails())); + + // mock amazonOrderRef Object methods so we get the expected response + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); + $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') + ->will( + $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() + ) + ); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + + $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); + $mockLocalId->expects($this->once())->method('setAmazonId')->with($this->equalTo('P01-1234567-1234567-0000001')); + $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + //$amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceId')->will($this->returnValue($mockLocalId)); + $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalId)); + $mockLocalWithCaptureAuthId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalWithCaptureAuthId->expects($this->once())->method('setAmazonId')->with($this->equalTo('AMAZON-CAPTURE-ID')); + $amazonReferenceIdManagerMock->expects($this->once())->method('findFromLocalReferenceId')->with($this->equalTo('LOCAL-AUTH-ID'), $this->equalTo(IAmazonReferenceId::TYPE_CAPTURE))->will($this->returnValue($mockLocalWithCaptureAuthId)); + $amazonReferenceIdManagerMock->expects($this->exactly(2))->method('persist'); + $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); + + $amazonPayment = new AmazonPayment($config); + $amazonPayment->setDb(self::$dbal); + $transaction = $amazonPayment->captureOrder($transactionManager, $order); + $this->assertEquals($mockTransactionResponse, $transaction);",- +CaptureOrder_PayOnShipmentTest,test_capture_physical_products_only,* we expect to get an authorize only.,"$order = $this->createOrderMock(true, false); + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->once())->method('SaveFieldsFast')->with( + $this->equalTo( + array( + 'user_email' => 'amazonpayment@rn.esono.de', + 'adr_billing_lastname' => 'Mr. Dev', + 'adr_billing_telefon' => '+49 761 15 18 28 0', + 'adr_shipping_use_billing' => '0', + 'adr_shipping_salutation_id' => '', + 'adr_shipping_company' => 'ESONO AG', + 'adr_shipping_additional_info' => '2 OG', + 'adr_shipping_firstname' => '', + 'adr_shipping_lastname' => 'Mr. Dev', + 'adr_shipping_street' => 'Grünwälderstr. 10-14', + 'adr_shipping_streetnr' => '', + 'adr_shipping_city' => 'Freiburg', + 'adr_shipping_postalcode' => '79098', + 'adr_shipping_country_id' => '1', + 'adr_shipping_telefon' => '0761 15 18 28 0', + ) + ) + ); + + // - one transaction for the complete amount + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction', 'confirmTransaction')); + $transactionManager->expects($this->never())->method('addTransaction'); + $transactionManager->expects($this->never())->method('confirmTransaction'); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + + // - an auth + capture for the complete order + // \TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous, $invoiceNumber + $amazonOrderRef->expects($this->once())->method('authorize')->with( + $this->equalTo($order), // \TdbShopOrder $order + $this->equalTo('LOCAL-AUTH-ID'), // $localAuthorizationReferenceId + $this->equalTo($order->fieldValueTotal), // $amount + $this->equalTo(false) // $synchronous + )->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); + $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); + // mock amazonOrderRef Object methods so we get the expected response + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); + $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') + ->will( + $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() + ) + ); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); + $mockLocalId->expects($this->once())->method('setAmazonId')->with($this->equalTo('P01-1234567-1234567-0000001')); + $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceId')->will($this->returnValue($mockLocalId)); + $amazonReferenceIdManagerMock->expects($this->exactly(2))->method('persist'); + + $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); + + $amazonPayment = new AmazonPayment($config); + $amazonPayment->setDb(self::$dbal); + $transaction = $amazonPayment->captureOrder($transactionManager, $order); + $this->assertNull($transaction);",- +CaptureOrder_PayOnShipmentTest,test_capture_mixed_basket,@var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject,"$order = $this->createOrderMock(true, true); + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->once())->method('SaveFieldsFast')->with( + $this->equalTo( + array( + 'user_email' => 'amazonpayment@rn.esono.de', + 'adr_billing_lastname' => 'Mr. Dev', + 'adr_billing_telefon' => '+49 761 15 18 28 0', + 'adr_shipping_use_billing' => '0', + 'adr_shipping_salutation_id' => '', + 'adr_shipping_company' => 'ESONO AG', + 'adr_shipping_additional_info' => '2 OG', + 'adr_shipping_firstname' => '', + 'adr_shipping_lastname' => 'Mr. Dev', + 'adr_shipping_street' => 'Grünwälderstr. 10-14', + 'adr_shipping_streetnr' => '', + 'adr_shipping_city' => 'Freiburg', + 'adr_shipping_postalcode' => '79098', + 'adr_shipping_country_id' => '1', + 'adr_shipping_telefon' => '0761 15 18 28 0', + ) + ) + ); + + // - one transaction for the complete amount + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction', 'confirmTransaction')); + $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, false, true); + $expectedTransactionData->setContext(new \TPkgShopPaymentTransactionContext('amazon auth+capture on order completion (only downloads or pay on order completion)')); + $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); + $mockTransactionResponse->id = 'MOCK-TRANSACTION'; + $mockTransactionResponse->fieldSequenceNumber = 123; + $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( + $mockTransactionResponse + ) + ); + $transactionManager->expects($this->once())->method('confirmTransaction')->with($this->equalTo(123), $this->anything())->will($this->returnValue($mockTransactionResponse)); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + + // - an auth + capture for the complete order + // \TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous, $invoiceNumber + $amazonOrderRef->expects($this->once())->method('authorizeAndCapture')->with( + $this->equalTo($order), // \TdbShopOrder $order + $this->equalTo('LOCAL-AUTH-ID-WITH-CAPTURE'), // $localAuthorizationReferenceId + $this->equalTo($expectedTransactionData->getTotalValue()), // $amount + $this->equalTo(true), // $synchronous + $this->equalTo(null) // $invoiceNumber + )->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success-synchronous.xml')->getAuthorizeResult()->getAuthorizationDetails())); + + $amazonOrderRef->expects($this->once())->method('authorize')->with( + $this->equalTo($order), // \TdbShopOrder $order + $this->equalTo('LOCAL-AUTH-ID'), // $localAuthorizationReferenceId + $this->equalTo($order->fieldValueTotal - $expectedTransactionData->getTotalValue()), // $amount + $this->equalTo(false) // $synchronous + )->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); + + // mock amazonOrderRef Object methods so we get the expected response + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); + $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') + ->will( + $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() + ) + ); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); + $mockLocalId->expects($this->once())->method('setAmazonId')->with($this->equalTo('P01-1234567-1234567-0000001')); + $mockLocalWithCaptureId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalWithCaptureId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID-WITH-CAPTURE')); + $mockLocalWithCaptureId->expects($this->once())->method('setAmazonId')->with($this->equalTo('P01-1234567-1234567-0000001')); + $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceId')->will($this->returnValue($mockLocalId)); + $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalWithCaptureId)); + $mockLocalWithCaptureAuthId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalWithCaptureAuthId->expects($this->once())->method('setAmazonId')->with($this->equalTo('AMAZON-CAPTURE-ID')); + $amazonReferenceIdManagerMock->expects($this->once())->method('findFromLocalReferenceId')->with($this->equalTo('LOCAL-AUTH-ID-WITH-CAPTURE'), $this->equalTo(IAmazonReferenceId::TYPE_CAPTURE))->will($this->returnValue($mockLocalWithCaptureAuthId)); + $amazonReferenceIdManagerMock->expects($this->exactly(4))->method('persist'); + + $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); + + $amazonPayment = new AmazonPayment($config); + $amazonPayment->setDb(self::$dbal); + $transaction = $amazonPayment->captureOrder($transactionManager, $order); + $this->assertEquals($mockTransactionResponse, $transaction);",- +CaptureOrder_PayOnShipmentTest,test_amazon_api_error_downloads_only,@var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); + + $order = $this->createOrderMock(false, true); + + // there should be no transaction + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); + $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, false, true); + $expectedTransactionData->setContext(new \TPkgShopPaymentTransactionContext('amazon auth+capture on order completion (only downloads or pay on order completion)')); + $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); + $mockTransactionResponse->id = 'MOCK-TRANSACTION'; + $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( + $mockTransactionResponse + ) + ); + + // throw the exception + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); + $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') + ->will( + $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() + ) + ); + + $amazonOrderRef->expects($this->once())->method('authorizeAndCapture')->will($this->throwException($expectedException)); + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); + $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalId)); + + $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); + + /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ + $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); + $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); + $amazonPayment->setDb(self::$dbal); + + $exception = null; + try { + $amazonPayment->captureOrder($transactionManager, $order);",- +CaptureOrder_PayOnShipmentTest,test_amazon_api_error_physical_only,@var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); + + $order = $this->createOrderMock(true, false); + + // there should be no transaction + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); + $transactionManager->expects($this->never())->method('addTransaction'); + // throw the exception + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); + $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') + ->will( + $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() + ) + ); + + $amazonOrderRef->expects($this->once())->method('authorize')->will($this->throwException($expectedException)); + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); + $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceId')->will($this->returnValue($mockLocalId)); + + $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); + + /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ + $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); + $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); + $amazonPayment->setDb(self::$dbal); + $exception = null; + try { + $amazonPayment->captureOrder($transactionManager, $order);",- +CaptureOrder_PayOnShipmentTest,test_amazon_api_error_mixed,"* a mixed basket may generate an auth + capture and an auth without capture. if the aut without capture fails, but + * the auth with capture does not, then the order should NOT be marked as canceled.","$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); + + $order = $this->createOrderMock(true, true); + + // there should be no transaction + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); + $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, false, true); + $expectedTransactionData->setContext(new \TPkgShopPaymentTransactionContext('amazon auth+capture on order completion (only downloads or pay on order completion)')); + $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); + $mockTransactionResponse->id = 'MOCK-TRANSACTION'; + $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( + $mockTransactionResponse + ) + ); + + // throw the exception + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); + $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') + ->will( + $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() + ) + ); + + $amazonOrderRef->expects($this->any())->method('authorizeAndCapture')->will($this->throwException($expectedException)); + $amazonOrderRef->expects($this->any())->method('authorize')->will($this->throwException($expectedException)); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); + $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceId')->will($this->returnValue($mockLocalId)); + $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalId)); + + $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); + + /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ + $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); + $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); + $amazonPayment->setDb(self::$dbal); + $exception = null; + try { + $amazonPayment->captureOrder($transactionManager, $order);",- +CaptureOrder_PayOnShipmentTest,test_amazon_api_error_on_auth_without_capture_on_mixed_basket,@var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); + + $order = $this->createOrderMock(true, true); + + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->once())->method('SaveFieldsFast')->with( + $this->equalTo( + array( + 'user_email' => 'amazonpayment@rn.esono.de', + 'adr_billing_lastname' => 'Mr. Dev', + 'adr_billing_telefon' => '+49 761 15 18 28 0', + 'adr_shipping_use_billing' => '0', + 'adr_shipping_salutation_id' => '', + 'adr_shipping_company' => 'ESONO AG', + 'adr_shipping_additional_info' => '2 OG', + 'adr_shipping_firstname' => '', + 'adr_shipping_lastname' => 'Mr. Dev', + 'adr_shipping_street' => 'Grünwälderstr. 10-14', + 'adr_shipping_streetnr' => '', + 'adr_shipping_city' => 'Freiburg', + 'adr_shipping_postalcode' => '79098', + 'adr_shipping_country_id' => '1', + 'adr_shipping_telefon' => '0761 15 18 28 0', + ) + ) + ); + + // - one transaction for the complete amount + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); + $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, false, true); + $expectedTransactionData->setContext(new \TPkgShopPaymentTransactionContext('amazon auth+capture on order completion (only downloads or pay on order completion)')); + $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); + $mockTransactionResponse->id = 'MOCK-TRANSACTION'; + $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( + $mockTransactionResponse + ) + ); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + + // - an auth + capture for the complete order + // \TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous, $invoiceNumber + $amazonOrderRef->expects($this->once())->method('authorizeAndCapture')->with( + $this->equalTo($order), // \TdbShopOrder $order + $this->equalTo('LOCAL-AUTH-ID-WITH-CAPTURE'), // $localAuthorizationReferenceId + $this->equalTo($expectedTransactionData->getTotalValue()), // $amount + $this->equalTo(true), // $synchronous + $this->equalTo(null) // $invoiceNumber + )->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success-synchronous.xml')->getAuthorizeResult()->getAuthorizationDetails())); + + $amazonOrderRef->expects($this->once())->method('authorize')->with( + $this->equalTo($order), // \TdbShopOrder $order + $this->equalTo('LOCAL-AUTH-ID'), // $localAuthorizationReferenceId + $this->equalTo($order->fieldValueTotal - $expectedTransactionData->getTotalValue()), // $amount + $this->equalTo(false) // $synchronous + )->will($this->throwException($expectedException)); + + // mock amazonOrderRef Object methods so we get the expected response + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); + $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') + ->will( + $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() + ) + ); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); + $mockLocalWithCaptureId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalWithCaptureId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID-WITH-CAPTURE')); + $mockLocalWithCaptureId->expects($this->once())->method('setAmazonId')->will($this->returnValue('P01-1234567-1234567-0000001')); + $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceId')->will($this->returnValue($mockLocalId)); + $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalWithCaptureId)); + $mockLocalWithCaptureAuthId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalWithCaptureAuthId->expects($this->once())->method('setAmazonId')->with($this->equalTo('AMAZON-CAPTURE-ID')); + $amazonReferenceIdManagerMock->expects($this->once())->method('findFromLocalReferenceId')->with($this->equalTo('LOCAL-AUTH-ID-WITH-CAPTURE'), $this->equalTo(IAmazonReferenceId::TYPE_CAPTURE))->will($this->returnValue($mockLocalWithCaptureAuthId)); + $amazonReferenceIdManagerMock->expects($this->exactly(3))->method('persist'); + + $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); + + /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ + $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); + $amazonPayment->expects($this->never())->method('cancelOrder'); + $amazonPayment->setDb(self::$dbal); + $exception = null; + try { + $amazonPayment->captureOrder($transactionManager, $order);",- +CaptureOrder_PayOnShipmentTest,test_amazon_api_error_on_auth_with_capture_on_mixed_basket,"* the capture + auth fails - since this is always called first, we expect the order to be canceled after this exception.","$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); + + $order = $this->createOrderMock(true, true); + + // - the orders shipping address to be updated + // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) + $order->expects($this->once())->method('SaveFieldsFast')->with( + $this->equalTo( + array( + 'user_email' => 'amazonpayment@rn.esono.de', + 'adr_billing_lastname' => 'Mr. Dev', + 'adr_billing_telefon' => '+49 761 15 18 28 0', + 'adr_shipping_use_billing' => '0', + 'adr_shipping_salutation_id' => '', + 'adr_shipping_company' => 'ESONO AG', + 'adr_shipping_additional_info' => '2 OG', + 'adr_shipping_firstname' => '', + 'adr_shipping_lastname' => 'Mr. Dev', + 'adr_shipping_street' => 'Grünwälderstr. 10-14', + 'adr_shipping_streetnr' => '', + 'adr_shipping_city' => 'Freiburg', + 'adr_shipping_postalcode' => '79098', + 'adr_shipping_country_id' => '1', + 'adr_shipping_telefon' => '0761 15 18 28 0', + ) + ) + ); + + // - one transaction for the complete amount + $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); + $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, false, true); + $expectedTransactionData->setContext(new \TPkgShopPaymentTransactionContext('amazon auth+capture on order completion (only downloads or pay on order completion)')); + $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); + $mockTransactionResponse->id = 'MOCK-TRANSACTION'; + $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( + $mockTransactionResponse + ) + ); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + + // - an auth + capture for the complete order + // \TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous, $invoiceNumber + $amazonOrderRef->expects($this->once())->method('authorizeAndCapture')->with( + $this->equalTo($order), // \TdbShopOrder $order + $this->equalTo('LOCAL-AUTH-ID'), // $localAuthorizationReferenceId + $this->equalTo($expectedTransactionData->getTotalValue()), // $amount + $this->equalTo(true), // $synchronous + $this->equalTo(null) // $invoiceNumber + )->will($this->throwException($expectedException)); + + $amazonOrderRef->expects($this->never())->method('authorize'); + + // mock amazonOrderRef Object methods so we get the expected response + $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); + $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); + $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') + ->will( + $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() + ) + ); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); + $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); + + $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalId)); + $amazonReferenceIdManagerMock->expects($this->once())->method('persist'); + + $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); + + /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ + $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); + $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); + $amazonPayment->setDb(self::$dbal); + $exception = null; + try { + $amazonPayment->captureOrder($transactionManager, $order);",- +CaptureOrder_PayOnShipmentTest,test_synchronous_auth_declined_invalidPaymentMethod,@var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject,"$this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_INVALID_PAYMENT_METHOD, AmazonPayment::ERROR_AUTHORIZATION_DECLINED);",- +CaptureOrder_PayOnShipmentTest,test_synchronous_auth_declined_amazonRejected,"* we expect the order to be canceled and otherwise unchanged. There should be no transaction, and neither auth nor auth+capture calls.","$this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_AMAZON_REJECTED, AmazonPayment::ERROR_AUTHORIZATION_DECLINED);",- +CaptureOrder_PayOnShipmentTest,test_synchronous_auth_declined_processingFailure,* we expect the order to be canceled but otherwise unchanged. there should be no auth or auth+capture and no transactions.,"$this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_PROCESSING_FAILURE, AmazonPayment::ERROR_AUTHORIZATION_DECLINED);",- +CaptureOrder_PayOnShipmentTest,test_synchronous_auth_declined_transactionTimedOut,"* the order reference was confirmed but not used. so we expect + * - the order ref object to be canceled + * - the order to be canceled and unchanged + * - no calls to auth or auth+capture + * - no transactions.","$this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_TRANSACTION_TIMED_OUT, AmazonPayment::ERROR_AUTHORIZATION_DECLINED);",- +CaptureOrder_PayOnShipmentTest,test_amazon_api_error_on_set_order_reference_details,"* the error should be thrown when trying to setOrderReferenceDetails, so we expect the method to cancel the order.",parent::test_amazon_api_error_on_set_order_reference_details(); // expect same as paymentOnShipment,- +CaptureOrder_PayOnShipmentTest,test_amazon_api_error_on_confirm_order_reference,* expect the same as test_shippingAddressNotSet_constraint_error.,parent::test_amazon_api_error_on_confirm_order_reference(); // expect same as paymentOnShipment,- +CaptureOrder_PayOnShipmentTest,test_amazon_api_error_on_get_order_reference_details,* expect order to be canceled.,parent::test_amazon_api_error_on_get_order_reference_details(); // expect same as paymentOnShipment,- +CaptureOrder_PayOnShipmentTest,test_shippingAddressNotSet_constraint_error,* expect order to be canceled.,parent::test_shippingAddressNotSet_constraint_error(); // expect same as paymentOnShipment,- +CaptureOrder_PayOnShipmentTest,test_paymentPlanNotSet_constraint_error,* expect order to be canceled.,parent::test_paymentPlanNotSet_constraint_error(); // expect same as paymentOnShipment,- +CaptureShipmentTest,test_capture_valid_existing_authorization,* a transaction is created and returned [will wait for the ipn for confirmation].,"$fixtureAmazonCaptureApiResponse = AmazonPaymentFixturesFactory::capture('pending.xml')->getCaptureResult()->getCaptureDetails(); + $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; + $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; + + $fixtureOrderValue = 200.99; + $fixtureAuthorizationValue = 150.99; + $fixtureCaptureValue = $fixtureAmazonCaptureApiResponse->getCaptureAmount()->getAmount(); + $fixtureCaptureReferenceId = 'CAPTURE-REFERENCE-ID'; + $fixtureAmazonCaptureId = 'P01-1234567-1234567-0000001'; + $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; + $fixtureSoftDescription = 'SOFT-DESCRIPTION'; + + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->fixtureOrderMock($fixtureOrderValue); + + /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ + $expectedTransaction = $this->fixtureTransactionMock(); + + $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); + + /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ + $idManager = $this->fixtureIdManagerMock( + $fixtureAmazonAuthorizationId, + $fixtureAuthorizationReferenceId, + $fixtureCaptureReferenceId, + $fixtureCaptureValue, + $expectedTransaction, + $fixtureAmazonCaptureId, + $fixtureAuthorizationValue, + $fixtureAmazonOrderRefId + ); + + $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); + $amazonOrderRef->expects($this->once()) + ->method('captureExistingAuthorization') + ->with( + $this->equalTo($order), + $this->equalTo($fixtureAmazonAuthorizationId), + $this->equalTo($fixtureCaptureReferenceId), + $this->equalTo($fixtureCaptureValue), + $this->equalTo($fixtureSoftDescription)) + ->will($this->returnValue($fixtureAmazonCaptureApiResponse)); + + $amazonOrderRef->expects($this->once()) + ->method('getAuthorizationDetails') + ->with($this->equalTo($fixtureAmazonAuthorizationId)) + ->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); + + $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); + + $transactionManager = $this->getTransactionManager($order); + $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') + ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) + ->will($this->returnValue($expectedTransactionData)); + $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); + + $payment = new AmazonPayment($config); + + $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); + $this->assertEquals($expectedTransaction, $transaction);",- +CaptureShipmentTest,test_capture_success_with_completed_status,@var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"$fixtureAmazonCaptureApiResponse = AmazonPaymentFixturesFactory::capture('success.xml')->getCaptureResult()->getCaptureDetails(); + $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; + $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; + + $fixtureOrderValue = 200.99; + $fixtureAuthorizationValue = 150.99; + $fixtureCaptureValue = $fixtureAmazonCaptureApiResponse->getCaptureAmount()->getAmount(); + $fixtureCaptureReferenceId = 'CAPTURE-REFERENCE-ID'; + $fixtureAmazonCaptureId = 'P01-1234567-1234567-0000002'; + $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; + $fixtureSoftDescription = 'SOFT-DESCRIPTION'; + + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->fixtureOrderMock($fixtureOrderValue); + + /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ + $expectedTransaction = $this->fixtureTransactionMock(); + + $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); + + /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ + $idManager = $this->fixtureIdManagerMock( + $fixtureAmazonAuthorizationId, + $fixtureAuthorizationReferenceId, + $fixtureCaptureReferenceId, + $fixtureCaptureValue, + $expectedTransaction, + $fixtureAmazonCaptureId, + $fixtureAuthorizationValue, + $fixtureAmazonOrderRefId + ); + + $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); + $amazonOrderRef->expects($this->once()) + ->method('getAuthorizationDetails') + ->with($this->equalTo($fixtureAmazonAuthorizationId)) + ->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); + + $amazonOrderRef->expects($this->once()) + ->method('captureExistingAuthorization') + ->with( + $this->equalTo($order), + $this->equalTo($fixtureAmazonAuthorizationId), + $this->equalTo($fixtureCaptureReferenceId), + $this->equalTo($fixtureCaptureValue), + $this->equalTo($fixtureSoftDescription)) + ->will($this->returnValue($fixtureAmazonCaptureApiResponse)); + + $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); + + $transactionManager = $this->getTransactionManager($order); + $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') + ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) + ->will($this->returnValue($expectedTransactionData)); + $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); + //confirmTransaction($iSequenceNumber, $iConfirmedDate) + $expectedConfirmedTransaction = $expectedTransaction; + $expectedConfirmedTransaction->fieldConfirmed = true; + + $transactionManager->expects($this->once()) + ->method('confirmTransaction') + ->with($this->equalTo($expectedTransaction->fieldSequenceNumber), $this->greaterThanOrEqual(time()))->will($this->returnValue($expectedConfirmedTransaction)); + $order->expects($this->once())->method('Load')->with($this->equalTo($order->id))->will($this->returnValue(true)); // if the transaction is confirmed, then the order will be refreshed + + $payment = new AmazonPayment($config); + + $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); + $this->assertEquals($expectedConfirmedTransaction, $transaction);",- +CaptureShipmentTest,test_capture_with_product_item_list,@var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"$fixtureAmazonCaptureApiResponse = AmazonPaymentFixturesFactory::capture('pending.xml')->getCaptureResult()->getCaptureDetails(); + $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; + $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; + $fixtureOrderValue = 200.99; + $fixtureAuthorizationValue = 150.99; + $fixtureCaptureValue = $fixtureAmazonCaptureApiResponse->getCaptureAmount()->getAmount(); + $fixtureCaptureReferenceId = 'CAPTURE-REFERENCE-ID'; + $fixtureAmazonCaptureId = 'P01-1234567-1234567-0000001'; + $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; + $fixtureSoftDescription = 'SOFT-DESCRIPTION'; + $fixtureCaptureProductList = array( + 'ORDER-ITEM-ID-1' => 2, + 'ORDER-ITEM-ID-2' => 1, + ); + + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->fixtureOrderMock($fixtureOrderValue); + + /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ + $expectedTransaction = $this->fixtureTransactionMock(); + + $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue, $fixtureCaptureProductList); + + /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ + $idManager = $this->fixtureIdManagerMock( + $fixtureAmazonAuthorizationId, + $fixtureAuthorizationReferenceId, + $fixtureCaptureReferenceId, + $fixtureCaptureValue, + $expectedTransaction, + $fixtureAmazonCaptureId, + $fixtureAuthorizationValue, + $fixtureAmazonOrderRefId + ); + + $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); + $amazonOrderRef->expects($this->once()) + ->method('captureExistingAuthorization') + ->with($this->equalTo($order), $this->equalTo($fixtureAmazonAuthorizationId), $this->equalTo($fixtureCaptureReferenceId), $this->equalTo($fixtureCaptureValue), $this->equalTo($fixtureSoftDescription)) + ->will($this->returnValue($fixtureAmazonCaptureApiResponse)); + + $amazonOrderRef->expects($this->once()) + ->method('getAuthorizationDetails') + ->with($this->equalTo($fixtureAmazonAuthorizationId)) + ->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); + + $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); + + $transactionManager = $this->getTransactionManager($order); + $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') + ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo($fixtureCaptureProductList)) + ->will($this->returnValue($expectedTransactionData)); + $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); + + $payment = new AmazonPayment($config); + + $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription, $fixtureCaptureProductList); + $this->assertEquals($expectedTransaction, $transaction);",- +CaptureShipmentTest,test_capture_closed_authorization,@var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject,"// try to capture - the only auth we find is one that is marked as closed. + // we expect a new auth to be created + $fixtureAmazonAuthorizeApiResponse = AmazonPaymentFixturesFactory::authorize('closed-MaxCapturesProcessed.xml')->getAuthorizeResult()->getAuthorizationDetails(); + + $fixtureAmazonAuthWithCaptureApiResponse = AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails(); + $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; + $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; + + $fixtureOrderValue = 200.99; + $fixtureAuthorizationValue = 150.99; + $fixtureCaptureValue = 100; + $fixtureAuthorizeReferenceId = 'AUTHORIZE-REFERENCE-ID'; + $fixtureAmazonAuthorizationWithCaptureId = 'P01-1234567-1234567-0000001'; + $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; + $fixtureSoftDescription = 'SOFT-DESCRIPTION'; + + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->fixtureOrderMock($fixtureOrderValue); + + /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ + $expectedTransaction = $this->fixtureTransactionMock(); + + $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); + + /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ + $idManager = $this->fixtureIdManagerCreateAuthWithCaptureMock( + $fixtureAmazonAuthorizationId, + $fixtureAuthorizationReferenceId, + $fixtureAuthorizeReferenceId, + $fixtureCaptureValue, + $expectedTransaction, + $fixtureAmazonAuthorizationWithCaptureId, + $fixtureAuthorizationValue, + $fixtureAmazonOrderRefId + ); + + $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); + + $amazonOrderRef->expects($this->once()) + ->method('getAuthorizationDetails') + ->with($this->equalTo($fixtureAmazonAuthorizationId)) + ->will($this->returnValue($fixtureAmazonAuthorizeApiResponse)); + + $amazonOrderRef->expects($this->once()) + ->method('authorizeAndCapture') + ->with( + $this->equalTo($order), + $this->equalTo($fixtureAuthorizeReferenceId), + $this->equalTo($fixtureCaptureValue), + $this->equalTo(false), + $this->equalTo($fixtureSoftDescription) + ) + ->will($this->returnValue($fixtureAmazonAuthWithCaptureApiResponse)); + + $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); + + $transactionManager = $this->getTransactionManager($order); + $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') + ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) + ->will($this->returnValue($expectedTransactionData)); + $transactionManager->expects($this->any())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); + + $payment = new AmazonPayment($config); + + $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); + $this->assertEquals($expectedTransaction, $transaction);",- +CaptureShipmentTest,test_capture_expired_authorization,"* the capture returns the state immediately - so we don't need to wait for the ipn confirm, but can confirm the transaction + * immediately.","$fixtureAmazonAuthorizeApiResponse = AmazonPaymentFixturesFactory::authorize('declined-TransactionTimedOut.xml')->getAuthorizeResult()->getAuthorizationDetails(); + + $fixtureAmazonAuthWithCaptureApiResponse = AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails(); + $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; + $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; + + $fixtureOrderValue = 200.99; + $fixtureAuthorizationValue = 150.99; + $fixtureCaptureValue = 100; + $fixtureAuthorizeReferenceId = 'AUTHORIZE-REFERENCE-ID'; + $fixtureAmazonAuthorizationWithCaptureId = 'P01-1234567-1234567-0000001'; + $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; + $fixtureSoftDescription = 'SOFT-DESCRIPTION'; + + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->fixtureOrderMock($fixtureOrderValue); + + /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ + $expectedTransaction = $this->fixtureTransactionMock(); + + $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); + + /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ + $idManager = $this->fixtureIdManagerCreateAuthWithCaptureMock( + $fixtureAmazonAuthorizationId, + $fixtureAuthorizationReferenceId, + $fixtureAuthorizeReferenceId, + $fixtureCaptureValue, + $expectedTransaction, + $fixtureAmazonAuthorizationWithCaptureId, + $fixtureAuthorizationValue, + $fixtureAmazonOrderRefId + ); + + $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); + + $amazonOrderRef->expects($this->once()) + ->method('getAuthorizationDetails') + ->with($this->equalTo($fixtureAmazonAuthorizationId)) + ->will($this->returnValue($fixtureAmazonAuthorizeApiResponse)); + + $amazonOrderRef->expects($this->once()) + ->method('authorizeAndCapture') + ->with( + $this->equalTo($order), + $this->equalTo($fixtureAuthorizeReferenceId), + $this->equalTo($fixtureCaptureValue), + $this->equalTo(false), + $this->equalTo($fixtureSoftDescription) + ) + ->will($this->returnValue($fixtureAmazonAuthWithCaptureApiResponse)); + + $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); + + $transactionManager = $this->getTransactionManager($order); + $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') + ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) + ->will($this->returnValue($expectedTransactionData)); + $transactionManager->expects($this->any())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); + + $payment = new AmazonPayment($config); + + $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); + $this->assertEquals($expectedTransaction, $transaction);",- +CaptureShipmentTest,test_capture_pending_authorization,@var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"$fixtureAmazonAuthorizeApiResponse = AmazonPaymentFixturesFactory::authorize('pending.xml')->getAuthorizeResult()->getAuthorizationDetails(); + + $fixtureAmazonAuthWithCaptureApiResponse = AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails(); + $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; + $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; + + $fixtureOrderValue = 200.99; + $fixtureAuthorizationValue = 150.99; + $fixtureCaptureValue = 100; + $fixtureAuthorizeReferenceId = 'AUTHORIZE-REFERENCE-ID'; + $fixtureAmazonAuthorizationWithCaptureId = 'P01-1234567-1234567-0000001'; + $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; + $fixtureSoftDescription = 'SOFT-DESCRIPTION'; + + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->fixtureOrderMock($fixtureOrderValue); + + /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ + $expectedTransaction = $this->fixtureTransactionMock(); + + $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); + + /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ + $idManager = $this->fixtureIdManagerCreateAuthWithCaptureMock( + $fixtureAmazonAuthorizationId, + $fixtureAuthorizationReferenceId, + $fixtureAuthorizeReferenceId, + $fixtureCaptureValue, + $expectedTransaction, + $fixtureAmazonAuthorizationWithCaptureId, + $fixtureAuthorizationValue, + $fixtureAmazonOrderRefId + ); + + $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); + + $amazonOrderRef->expects($this->once()) + ->method('getAuthorizationDetails') + ->with($this->equalTo($fixtureAmazonAuthorizationId)) + ->will($this->returnValue($fixtureAmazonAuthorizeApiResponse)); + + $amazonOrderRef->expects($this->once()) + ->method('authorizeAndCapture') + ->with( + $this->equalTo($order), + $this->equalTo($fixtureAuthorizeReferenceId), + $this->equalTo($fixtureCaptureValue), + $this->equalTo(false), + $this->equalTo($fixtureSoftDescription) + ) + ->will($this->returnValue($fixtureAmazonAuthWithCaptureApiResponse)); + + $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); + + $transactionManager = $this->getTransactionManager($order); + $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') + ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) + ->will($this->returnValue($expectedTransactionData)); + $transactionManager->expects($this->any())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); + + $payment = new AmazonPayment($config); + + $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); + $this->assertEquals($expectedTransaction, $transaction);",- +CaptureShipmentTest,test_capture_no_existing_authorization,@var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"$fixtureAmazonAuthWithCaptureApiResponse = AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails(); + + $fixtureOrderValue = 200.99; + $fixtureAuthorizationValue = 150.99; + $fixtureCaptureValue = 100; + $fixtureAuthorizeReferenceId = 'AUTHORIZE-REFERENCE-ID'; + $fixtureAmazonAuthorizationWithCaptureId = 'P01-1234567-1234567-0000001'; + $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; + $fixtureSoftDescription = 'SOFT-DESCRIPTION'; + + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->fixtureOrderMock($fixtureOrderValue); + + /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ + $expectedTransaction = $this->fixtureTransactionMock(); + + $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); + + /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ + $idManager = $this->fixtureIdManagerCreateAuthWithCaptureNoAuthFoundMock( + $fixtureAuthorizeReferenceId, + $fixtureCaptureValue, + $expectedTransaction, + $fixtureAmazonAuthorizationWithCaptureId + ); + + $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); + + $amazonOrderRef->expects($this->never()) + ->method('getAuthorizationDetails'); + + $amazonOrderRef->expects($this->once()) + ->method('authorizeAndCapture') + ->with( + $this->equalTo($order), + $this->equalTo($fixtureAuthorizeReferenceId), + $this->equalTo($fixtureCaptureValue), + $this->equalTo(false), + $this->equalTo($fixtureSoftDescription) + ) + ->will($this->returnValue($fixtureAmazonAuthWithCaptureApiResponse)); + + $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); + + $transactionManager = $this->getTransactionManager($order); + $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') + ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) + ->will($this->returnValue($expectedTransactionData)); + $transactionManager->expects($this->any())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); + + $payment = new AmazonPayment($config); + + $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); + $this->assertEquals($expectedTransaction, $transaction);",- +CaptureShipmentTest,test_capture_auth_ok_but_capture_declined,@var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject,"$fixtureAmazonCaptureApiResponse = AmazonPaymentFixturesFactory::capture('declined-AmazonRejected.xml')->getCaptureResult()->getCaptureDetails(); + $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; + $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; + + $fixtureOrderValue = 200.99; + $fixtureAuthorizationValue = 150.99; + $fixtureCaptureValue = $fixtureAmazonCaptureApiResponse->getCaptureAmount()->getAmount(); + $fixtureCaptureReferenceId = 'CAPTURE-REFERENCE-ID'; + $fixtureAmazonCaptureId = 'P01-1234567-1234567-0000002'; + $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; + $fixtureSoftDescription = 'SOFT-DESCRIPTION'; + + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->fixtureOrderMock($fixtureOrderValue); + + /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ + $expectedTransaction = $this->fixtureTransactionMock(); + + $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); + + /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ + $idManager = $this->fixtureIdManagerForFailedCapturesMock( + $fixtureAmazonAuthorizationId, + $fixtureAuthorizationReferenceId, + $fixtureCaptureReferenceId, + $fixtureCaptureValue, + $expectedTransaction, + $fixtureAmazonCaptureId, + $fixtureAuthorizationValue, + $fixtureAmazonOrderRefId + ); + + $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); + $amazonOrderRef->expects($this->once()) + ->method('captureExistingAuthorization') + ->with($this->equalTo($order), $this->equalTo($fixtureAmazonAuthorizationId), $this->equalTo($fixtureCaptureReferenceId), $this->equalTo($fixtureCaptureValue), $this->equalTo($fixtureSoftDescription)) + ->will($this->throwException(new AmazonCaptureDeclinedException(AmazonCaptureDeclinedException::REASON_CODE_AMAZON_REJECTED))); + + $amazonOrderRef->expects($this->once()) + ->method('getAuthorizationDetails') + ->with($this->equalTo($fixtureAmazonAuthorizationId)) + ->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); + + $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); + + $transactionManager = $this->getTransactionManager($order); + $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') + ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) + ->will($this->returnValue($expectedTransactionData)); + $transactionManager->expects($this->any())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); + + $payment = new AmazonPayment($config); + + $exception = null; + try { + $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription);",- +CaptureShipmentTest,test_api_error_on_getAuthorizationDetails,* same as test_capture_valid_existing_authorization but the items should be connected to the transaction.,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); + + $fixtureAmazonCaptureApiResponse = AmazonPaymentFixturesFactory::capture('pending.xml')->getCaptureResult()->getCaptureDetails(); + $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; + $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; + $fixtureSoftDescription = 'SOFT-DESCRIPTION'; + + $fixtureOrderValue = 200.99; + $fixtureAuthorizationValue = 150.99; + $fixtureCaptureValue = $fixtureAmazonCaptureApiResponse->getCaptureAmount()->getAmount(); + $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; + + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->fixtureOrderMock($fixtureOrderValue); + + // setup local id manager + $item = new AmazonReferenceId(IAmazonReferenceId::TYPE_AUTHORIZE, $fixtureAuthorizationReferenceId, $fixtureAuthorizationValue, null); + $item->setAmazonId($fixtureAmazonAuthorizationId); + $idList = new AmazonReferenceIdList($fixtureAmazonOrderRefId, IAmazonReferenceId::TYPE_AUTHORIZE); + $idList->addItem($item); + + /** @var $idManager AmazonReferenceIdManager|\PHPUnit_Framework_MockObject_MockObject */ + $idManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager') + ->setMethods(array('persist', 'createLocalCaptureReferenceId', 'getListOfAuthorizations', 'findFromLocalReferenceId')) + ->setConstructorArgs(array(self::FIXTURE_AMAZON_ORDER_REFERENCE_ID, self::FIXTURE_SHOP_ORDER_ID)) + + ->getMock(); + + $idManager->expects($this->never())->method('createLocalCaptureReferenceId'); + $idManager->expects($this->once())->method('getListOfAuthorizations')->will($this->returnValue($idList)); + $idManager->expects($this->never())->method('persist'); + + /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ + $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); + $amazonOrderRef->expects($this->never()) + ->method('captureExistingAuthorization'); + $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); + $amazonOrderRef->expects($this->once()) + ->method('getAuthorizationDetails') + ->with($this->equalTo($fixtureAmazonAuthorizationId)) + ->will($this->throwException($expectedException)); + + $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); + + $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); + $transactionManager = $this->getTransactionManager($order); + $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') + ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) + ->will($this->returnValue($expectedTransactionData)); + + $transactionManager->expects($this->never())->method('addTransaction'); + + $payment = new AmazonPayment($config); + $exception = null; + try { + $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription);",- +CaptureShipmentTest,test_api_error_on_captureExistingAuthorization,@var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); + + $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; + $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; + + $fixtureOrderValue = 200.99; + $fixtureAuthorizationValue = 150.99; + $fixtureCaptureValue = 100; + $fixtureCaptureReferenceId = 'CAPTURE-REFERENCE-ID'; + $fixtureAmazonCaptureId = 'P01-1234567-1234567-0000002'; + $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; + $fixtureSoftDescription = 'SOFT-DESCRIPTION'; + + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->fixtureOrderMock($fixtureOrderValue); + + /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ + $expectedTransaction = $this->fixtureTransactionMock(); + + $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); + + /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ + $idManager = $this->fixtureIdManagerForFailedCapturesMock( + $fixtureAmazonAuthorizationId, + $fixtureAuthorizationReferenceId, + $fixtureCaptureReferenceId, + $fixtureCaptureValue, + $expectedTransaction, + $fixtureAmazonCaptureId, + $fixtureAuthorizationValue, + $fixtureAmazonOrderRefId + ); + + $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); + $amazonOrderRef->expects($this->once()) + ->method('captureExistingAuthorization') + ->with($this->equalTo($order), $this->equalTo($fixtureAmazonAuthorizationId), $this->equalTo($fixtureCaptureReferenceId), $this->equalTo($fixtureCaptureValue), $this->equalTo($fixtureSoftDescription)) + ->will($this->throwException($expectedException)); + + $amazonOrderRef->expects($this->once()) + ->method('getAuthorizationDetails') + ->with($this->equalTo($fixtureAmazonAuthorizationId)) + ->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); + + $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); + + $transactionManager = $this->getTransactionManager($order); + $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') + ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) + ->will($this->returnValue($expectedTransactionData)); + $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); + + $payment = new AmazonPayment($config); + + $exception = null; + try { + $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription);",- +CaptureShipmentTest,test_api_error_on_authorizeAndCapture,@var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); + $fixtureAmazonAuthWithCaptureApiResponse = AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails(); + + $fixtureOrderValue = 200.99; + $fixtureAuthorizationValue = 150.99; + $fixtureCaptureValue = 100; + $fixtureAuthorizeReferenceId = 'AUTHORIZE-REFERENCE-ID'; + $fixtureAmazonAuthorizeId = 'P01-1234567-1234567-0000002'; + $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; + $fixtureSoftDescription = 'SOFT-DESCRIPTION'; + + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->fixtureOrderMock($fixtureOrderValue); + + /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ + $expectedTransaction = $this->fixtureTransactionMock(); + + $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); + + /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ + $idManager = $this->fixtureIdManagerCreateAuthWithCaptureNoAuthFoundAndFailedAuthMock( + $fixtureAuthorizeReferenceId, + $fixtureCaptureValue, + $expectedTransaction, + $fixtureAmazonAuthorizeId + ); + + $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); + + $amazonOrderRef->expects($this->never()) + ->method('getAuthorizationDetails'); + + $amazonOrderRef->expects($this->once()) + ->method('authorizeAndCapture') + ->with( + $this->equalTo($order), + $this->equalTo($fixtureAuthorizeReferenceId), + $this->equalTo($fixtureCaptureValue), + $this->equalTo(false), + $this->equalTo($fixtureSoftDescription) + ) + ->will($this->throwException($expectedException)); + + $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); + + $transactionManager = $this->getTransactionManager($order); + $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') + ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) + ->will($this->returnValue($expectedTransactionData)); + $transactionManager->expects($this->any())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); + + $payment = new AmazonPayment($config); + + $exception = null; + try { + $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription);",- +RefundTest,test_pending,"* GIVEN I have a transactionManager + * AND I have an order + * AND I have a refundValue ""1234.56"" + * AND I have an invoiceNumber ""INVOICE"" + * WHEN I call ""refund"" + * THEN I should get a response ""Pending"".","$expectedTransactions = array( + 'TRANSACTION-ID-1' => array( + 'amazonCaptureId' => 'AMAZON-CAPTURE-ID', + 'response' => AmazonPaymentFixturesFactory::refund('pending-1.xml')->getRefundResult()->getRefundDetails(), + ), + ); + + // ------------------------------------------------------------------------------------------------------------- + $config = $this->getConfig(); + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); + $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonIdManager = $this->helperAddIdManagerExpectations($expectedTransactions, $amazonIdManager); + + $expectedTransactionList = $this->helperGetExpectedTransactionList($expectedTransactions); + + /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ + $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); + $transactionManager = $this->helperAddExpectedAddTransactionCallsToManager($expectedTransactionList, $order, $transactionManager); + $transactionManager = $this->helperAddConfirmTransactionToTransactionManager($transactionManager, $expectedTransactionList, $expectedTransactions); + + $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); + $amazonIdManager->expects($this->once())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); + + /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); + $amazonOrderRef = $this->helperAddExpectedCaptureList($amazonOrderRef, $expectedTransactions, $amazonCaptureList); + $amazonOrderRef = $this->helperAddExpectedRefundCallsToOrderRefObject($amazonOrderRef, $expectedTransactions, $order); + + $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); + + // ------------------------------------------------------------------------------------------------------------- + $amazonPayment = new AmazonPayment($config); + $transactionList = $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE); + + $this->assertEquals($expectedTransactionList, $transactionList); + // -------------------------------------------------------------------------------------------------------------",- +RefundTest,test_pending_with_orderItemList,@var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"$expectedTransactions = array( + 'TRANSACTION-ID-1' => array( + 'amazonCaptureId' => 'AMAZON-CAPTURE-ID', + 'response' => AmazonPaymentFixturesFactory::refund('pending-1.xml')->getRefundResult()->getRefundDetails(), + ), + ); + + $refundItemList = array('SHOP-ORDER-ITEM-ID-1' => 1); + + // ------------------------------------------------------------------------------------------------------------- + $config = $this->getConfig(); + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); + $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonIdManager = $this->helperAddIdManagerExpectations($expectedTransactions, $amazonIdManager); + + $expectedTransactionList = $this->helperGetExpectedTransactionList($expectedTransactions); + + $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); + $transactionManager = $this->helperAddExpectedAddTransactionCallsToManager($expectedTransactionList, $order, $transactionManager, $refundItemList); + + $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); + $amazonIdManager->expects($this->once())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); + + /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); + $amazonOrderRef = $this->helperAddExpectedCaptureList($amazonOrderRef, $expectedTransactions, $amazonCaptureList); + $amazonOrderRef = $this->helperAddExpectedRefundCallsToOrderRefObject($amazonOrderRef, $expectedTransactions, $order); + + $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); + + // ------------------------------------------------------------------------------------------------------------- + $amazonPayment = new AmazonPayment($config); + $transactionList = $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE, $refundItemList); + + $this->assertEquals($expectedTransactionList, $transactionList); + // -------------------------------------------------------------------------------------------------------------",- +RefundTest,test_multi_capture_refund,@var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject,"$expectedTransactions = array( + 'TRANSACTION-ID-1' => array( + 'amazonCaptureId' => 'AMAZON-CAPTURE-ID-1', + 'response' => AmazonPaymentFixturesFactory::refund('pending-1.xml')->getRefundResult()->getRefundDetails(), + ), + 'TRANSACTION-ID-2' => array( + 'amazonCaptureId' => 'AMAZON-CAPTURE-ID-2', + 'response' => AmazonPaymentFixturesFactory::refund('pending-2.xml')->getRefundResult()->getRefundDetails(), + ), + ); + + // ------------------------------------------------------------------------------------------------------------- + $config = $this->getConfig(); + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); + $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonIdManager = $this->helperAddIdManagerExpectations($expectedTransactions, $amazonIdManager); + + $expectedTransactionList = $this->helperGetExpectedTransactionList($expectedTransactions); + + /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ + $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); + $transactionManager = $this->helperAddExpectedAddTransactionCallsToManager($expectedTransactionList, $order, $transactionManager); + + $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); + $amazonIdManager->expects($this->once())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); + + /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); + $amazonOrderRef = $this->helperAddExpectedCaptureList($amazonOrderRef, $expectedTransactions, $amazonCaptureList); + $amazonOrderRef = $this->helperAddExpectedRefundCallsToOrderRefObject($amazonOrderRef, $expectedTransactions, $order); + + $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); + + // ------------------------------------------------------------------------------------------------------------- + $amazonPayment = new AmazonPayment($config); + $transactionList = $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE); + + $this->assertEquals($expectedTransactionList, $transactionList); + // -------------------------------------------------------------------------------------------------------------",- +RefundTest,test_completed,@var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject,"$expectedTransactions = array( + 'TRANSACTION-ID-1' => array( + 'amazonCaptureId' => 'AMAZON-CAPTURE-ID', + 'response' => AmazonPaymentFixturesFactory::refund('success.xml')->getRefundResult()->getRefundDetails(), + ), + ); + + // ------------------------------------------------------------------------------------------------------------- + $config = $this->getConfig(); + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); + $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonIdManager = $this->helperAddIdManagerExpectations($expectedTransactions, $amazonIdManager); + + $expectedTransactionList = $this->helperGetExpectedTransactionList($expectedTransactions); + + /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ + $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); + $transactionManager = $this->helperAddExpectedAddTransactionCallsToManager($expectedTransactionList, $order, $transactionManager); + $transactionManager = $this->helperAddConfirmTransactionToTransactionManager($transactionManager, $expectedTransactionList, $expectedTransactions); + + $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); + $amazonIdManager->expects($this->once())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); + + /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); + $amazonOrderRef = $this->helperAddExpectedCaptureList($amazonOrderRef, $expectedTransactions, $amazonCaptureList); + $amazonOrderRef = $this->helperAddExpectedRefundCallsToOrderRefObject($amazonOrderRef, $expectedTransactions, $order); + + $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); + + // ------------------------------------------------------------------------------------------------------------- + $amazonPayment = new AmazonPayment($config); + $transactionList = $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE); + + $this->assertEquals($expectedTransactionList, $transactionList); + // -------------------------------------------------------------------------------------------------------------",- +RefundTest,test_declined,@var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_REFUND_DECLINED, + array( + 'reasonCode' => 'AmazonRejected', + 'reasonDescription' => 'REASON DESCRIPTION', + ) + ); + + $expectedTransactions = array( + 'TRANSACTION-ID-1' => array( + 'amazonCaptureId' => 'AMAZON-CAPTURE-ID', + 'response' => AmazonPaymentFixturesFactory::refund('declined-AmazonRejected.xml')->getRefundResult()->getRefundDetails(), + 'exception' => new AmazonRefundDeclinedException(AmazonRefundDeclinedException::REASON_CODE_AMAZON_REJECTED, array( + 'reasonCode' => 'AmazonRejected', + 'reasonDescription' => 'REASON DESCRIPTION', + )), + ), + ); + + // ------------------------------------------------------------------------------------------------------------- + $config = $this->getConfig(); + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); + $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonIdManager = $this->helperAddIdManagerExpectations($expectedTransactions, $amazonIdManager); + + $expectedTransactionList = $this->helperGetExpectedTransactionList($expectedTransactions); + + /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ + $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); + $transactionManager = $this->helperAddExpectedAddTransactionCallsToManager($expectedTransactionList, $order, $transactionManager); + + $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); + $amazonIdManager->expects($this->once())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); + + /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); + $amazonOrderRef = $this->helperAddExpectedCaptureList($amazonOrderRef, $expectedTransactions, $amazonCaptureList); + $amazonOrderRef = $this->helperAddExpectedRefundCallsToOrderRefObject($amazonOrderRef, $expectedTransactions, $order); + + $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); + + // ------------------------------------------------------------------------------------------------------------- + + $exception = null; + try { + $amazonPayment = new AmazonPayment($config); + $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE);",- +RefundTest,test_decline_with_one_success,@var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject,"$expectedTransactions = array( + 'TRANSACTION-ID-1' => array( + 'amazonCaptureId' => 'AMAZON-CAPTURE-ID-1', + 'response' => AmazonPaymentFixturesFactory::refund('pending-1.xml')->getRefundResult()->getRefundDetails(), + ), + 'TRANSACTION-ID-2' => array( + 'amazonCaptureId' => 'AMAZON-CAPTURE-ID-2', + 'response' => AmazonPaymentFixturesFactory::refund('declined-AmazonRejected.xml')->getRefundResult()->getRefundDetails(), + 'exception' => new AmazonRefundDeclinedException(AmazonRefundDeclinedException::REASON_CODE_AMAZON_REJECTED, array( + 'reasonCode' => 'AmazonRejected', + 'reasonDescription' => 'REASON DESCRIPTION', + )), + ), + ); + $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_REFUND_DECLINED, + array( + 'reasonCode' => 'AmazonRejected', + 'reasonDescription' => 'REASON DESCRIPTION', + ) + ); + + $refundValue = 0; + foreach ($expectedTransactions as $details) { + /** @var $response \OffAmazonPaymentsService_Model_RefundDetails */ + $response = $details['response']; + $refundValue += round($response->getRefundAmount()->getAmount());",- +RefundTest,test_api_error,@var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR, array( + 'responseCode' => '123', + 'errorCode' => 'InternalServerError', + 'errorType' => 'Unknown', + 'message' => 'There was an unknown error in the service', + )); + $expectedTransactions = array( + 'TRANSACTION-ID-1' => array( + 'amazonCaptureId' => 'AMAZON-CAPTURE-ID', + 'response' => AmazonPaymentFixturesFactory::refund('success.xml')->getRefundResult()->getRefundDetails(), + 'exception' => $expectedException, + ), + ); + + // ------------------------------------------------------------------------------------------------------------- + $config = $this->getConfig(); + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); + $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonIdManager = $this->helperAddIdManagerExpectations($expectedTransactions, $amazonIdManager); + + $expectedTransactionList = $this->helperGetExpectedTransactionList($expectedTransactions); + + /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ + $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); + $transactionManager = $this->helperAddExpectedAddTransactionCallsToManager($expectedTransactionList, $order, $transactionManager); + + $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); + $amazonIdManager->expects($this->once())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); + + /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); + $amazonOrderRef = $this->helperAddExpectedCaptureList($amazonOrderRef, $expectedTransactions, $amazonCaptureList); + $amazonOrderRef = $this->helperAddExpectedRefundCallsToOrderRefObject($amazonOrderRef, $expectedTransactions, $order); + + $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); + + // ------------------------------------------------------------------------------------------------------------- + + $exception = null; + try { + $amazonPayment = new AmazonPayment($config); + $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE);",- +RefundTest,test_no_matching_capture_found,@var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject,"$expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_NO_CAPTURE_FOUND_FOR_REFUND, array('refundValue' => self::FIXTURE_REFUND_VALUE, 'amazonIdListChecked' => array())); + $config = $this->getConfig(); + /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); + $amazonOrderRef->expects($this->once())->method('findBestCaptureMatchForRefund')->will($this->returnValue(array())); + + /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ + $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); + + $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); + $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); + $amazonIdManager->expects($this->any())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); + + /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ + $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); + + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); + $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); + + $exception = null; + try { + $amazonPayment = new AmazonPayment($config); + $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE);",- +UpdateWithSelectedShippingAddress,testGuestSuccess,* amazon api error.,"// we expect the user to be updated with data from the amazon api + + $amazonUserData = array( + 'City' => 'Freiburg', 'StateOrRegion' => 'BaWü', 'PostalCode' => '79098', 'CountryCode' => 'de', + ); + $expectedUserData = $this->convertAmazonToLocalAddress($amazonUserData, 1); + + $user = $this->getMockBuilder('TdbDataExtranetUser')->disableOriginalConstructor()->getMock(); + $user->expects($this->once())->method('setAmazonShippingAddress')->with($this->callback( + function (\TdbDataExtranetUserAddress $userShippingAddress) use ($expectedUserData) { + if (false === $userShippingAddress->getIsAmazonShippingAddress()) { + return false;",- +UpdateWithSelectedShippingAddress,testGuestAmazonRemoteError,"* amazon api ok, but user has not selected an address yet.","$exception = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails')->will($this->throwException($exception)); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + + $basket = $this->getMockBuilder('TShopBasket')->getMock(); + $basket->expects($this->once())->method('getAmazonOrderReferenceId')->will($this->returnValue('AMAZON-ORDER-REF-ID')); + + $amazonPayment = new AmazonPayment($config); + + $user = $this->getMockBuilder('TdbDataExtranetUser')->disableOriginalConstructor()->getMock(); + $user->expects($this->never())->method('setAmazonShippingAddress'); + + $exception = null; + try { + $amazonPayment->updateWithSelectedShippingAddress($basket, $user);",- +UpdateWithSelectedShippingAddress,testGuestNoAddressSet,"* amazon api ok, but user has selected an address with in an unsupported country.","$exception = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_NO_SHIPPING_ADDRESS); + + $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); + $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails')->will($this->throwException($exception)); + + $config = $this->getConfig(); + $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); + + $basket = $this->getMockBuilder('TShopBasket')->getMock(); + $basket->expects($this->once())->method('getAmazonOrderReferenceId')->will($this->returnValue('AMAZON-ORDER-REF-ID')); + + $amazonPayment = new AmazonPayment($config); + + $user = $this->getMockBuilder('TdbDataExtranetUser')->disableOriginalConstructor()->getMock(); + $user->expects($this->never())->method('setAmazonShippingAddress'); + + $exception = null; + try { + $amazonPayment->updateWithSelectedShippingAddress($basket, $user);",- +AmazonPaymentGroupConfigTest,test_the_seller_authorization_note_without_capture,* @var \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"$expected = 'Vielen Dank für Ihre Bestellung 12345 bei MEIN-SHOP'; + + $config = new AmazonPaymentGroupConfig(\IPkgShopOrderPaymentConfig::ENVIRONMENT_PRODUCTION); + $loader = new \TPkgShopPaymentGroupConfigXMLLoader($config, new FileLocator(AmazonPaymentFixturesFactory::getFixturePath('AmazonPaymentGroupConfig'))); + $loader->load('sellerAuthorizationNote.xml'); + + $this->assertEquals($expected, $config->getSellerAuthorizationNote($this->order, 1.25, false));",- +AmazonPaymentGroupConfigTest,test_the_seller_authorization_note_with_capture,@var $mockOrder \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"$expected = 'Vielen Dank für Ihre Bestellung 12345 bei MEIN-SHOP (mit capture now)'; + + $config = new AmazonPaymentGroupConfig(\IPkgShopOrderPaymentConfig::ENVIRONMENT_PRODUCTION); + $loader = new \TPkgShopPaymentGroupConfigXMLLoader($config, new FileLocator(AmazonPaymentFixturesFactory::getFixturePath('AmazonPaymentGroupConfig'))); + $loader->load('sellerAuthorizationNote.xml'); + + $this->assertEquals($expected, $config->getSellerAuthorizationNote($this->order, 1, true));",- +AmazonPaymentGroupConfigTest,test_get_seller_order_note,@var $shop \TdbShop|\PHPUnit_Framework_MockObject_MockObject,"$expected = 'Vielen Dank für Ihre Bestellung 12345 bei MEIN-SHOP'; + + $config = new AmazonPaymentGroupConfig(\IPkgShopOrderPaymentConfig::ENVIRONMENT_PRODUCTION); + $loader = new \TPkgShopPaymentGroupConfigXMLLoader($config, new FileLocator(AmazonPaymentFixturesFactory::getFixturePath('AmazonPaymentGroupConfig'))); + $loader->load('sellerNote.xml'); + + $this->assertEquals($expected, $config->getSellerOrderNote($this->order));",- +AmazonPaymentGroupConfigTest,test_get_soft_descriptor_with_no_invoice_number,* @test,"$expected = 'BNR 12345'; + + $config = new AmazonPaymentGroupConfig(\IPkgShopOrderPaymentConfig::ENVIRONMENT_PRODUCTION); + $loader = new \TPkgShopPaymentGroupConfigXMLLoader($config, new FileLocator(AmazonPaymentFixturesFactory::getFixturePath('AmazonPaymentGroupConfig'))); + $loader->load('softDescriptor.xml'); + $this->assertEquals($expected, $config->getSoftDescriptor($this->order));",- +AmazonPaymentGroupConfigTest,test_get_soft_descriptor_with_invoice_number,* @test,"$expected = 'RNR 123456789'; + + $config = new AmazonPaymentGroupConfig(\IPkgShopOrderPaymentConfig::ENVIRONMENT_PRODUCTION); + $loader = new \TPkgShopPaymentGroupConfigXMLLoader($config, new FileLocator(AmazonPaymentFixturesFactory::getFixturePath('AmazonPaymentGroupConfig'))); + $loader->load('softDescriptor.xml'); + + $this->assertEquals($expected, $config->getSoftDescriptor($this->order, '123456789'));",- +AmazonIPNHandler_AuthorizationTest,test_Declined_with_InvalidPaymentMethod,* expect the shop owner to be notified so he can take corrective action once the problem has been fixed (or when it is not fixed).,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Declined-InvalidPaymentMethod.xml'), $this->idReferenceManager); + $this->helperAddIPNMailObject('Declined', 'InvalidPaymentMethod', 'There were problems with the payment method. You should contact your buyer and have them update their payment method using the Amazon Payments web site.'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_AuthorizationTest,test_Declined_with_AmazonRejected,"* we could retry if the object is still open - but won't. + * we expect the shop owner to be notified so he can take corrective actions.","$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Declined-AmazonRejected.xml'), $this->idReferenceManager); + $this->helperAddIPNMailObject('Declined', 'AmazonRejected', 'Amazon has rejected the authorization. You should only retry the authorization if the order reference is in the Open state.'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_AuthorizationTest,test_Declined_with_ProcessingFailure,"* the request should be called again - we currently don't have the necessary data, so inform the shop owner instead.","$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Declined-ProcessingFailure.xml'), $this->idReferenceManager); + $this->helperAddIPNMailObject('Declined', 'ProcessingFailure', 'Amazon could not process the transaction due to an internal processing error. You should only retry the authorization if the order reference is in the Open state.'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_AuthorizationTest,test_Declined_with_TransactionTimedOut,* inform shop owner.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Declined-TransactionTimedOut.xml'), $this->idReferenceManager); + $this->helperAddIPNMailObject('Declined', 'TransactionTimedOut', 'foobar'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_AuthorizationTest,test_Closed_with_ExpiredUnused,* inform seller.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Closed-ExpiredUnused.xml'), $this->idReferenceManager); + $this->helperAddIPNMailObject('Closed', 'ExpiredUnused', 'The authorization has been in the Open state for 30 days (two days for Sandbox) and you did not submit any captures against it.'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_AuthorizationTest,test_Closed_with_AmazonClosed,* inform seller.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Closed-AmazonClosed.xml'), $this->idReferenceManager); + $this->helperAddIPNMailObject('Closed', 'AmazonClosed', 'Amazon has closed the authorization object due to problems with your account.'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_AuthorizationTest,test_Closed_with_OrderReferenceCanceled,* do nothing.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Closed-OrderReferenceCanceled.xml'), $this->idReferenceManager); + + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_AuthorizationTest,test_Closed_with_SellerClosed,* do nothing.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Closed-SellerClosed.xml'), $this->idReferenceManager); + + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_AuthorizationTest,test_open,"* since we have the billing data for the user only after an auth has moved to the open state, we need to add this data to the order. + * note: the address is specific for every authorization - something that is not supported by our shop. if the shop is using + * payment on shipping, then we will generate the authorization after the invoice is created - so we may not have any use for the data at all + * however, that will be wawi specific. + * + * we expect the following + * * update the orders billing address with the data + * *","$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Open.xml'), $this->idReferenceManager); + + /** @var $orderRefObject AmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ + $orderRefObject = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->disableOriginalConstructor()->getMock(); + $getAuthorizationDetails = AmazonPaymentFixturesFactory::getAuthorizationDetails('success.xml'); + $orderRefObject->expects($this->once())->method('getAuthorizationDetails')->will( + $this->returnValue( + $getAuthorizationDetails->getGetAuthorizationDetailsResult()->getAuthorizationDetails() + ) + ); + + $this->getConfig()->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($orderRefObject)); + + $this->ipnHandler->setAmazonConfig($this->getConfig()); + + $this->ipnHandler->expects($this->once())->method('updateShopOrderBillingAddress')->with( + $this->equalTo($this->ipnRequest->getOrder()), + $this->equalTo( + array( + 'adr_billing_company' => 'ESONO AG', + 'adr_billing_salutation_id' => '', + 'adr_billing_firstname' => '', + 'adr_billing_lastname' => 'Mr. Dev', + 'adr_billing_street' => 'Grünwälderstr. 10-14', + 'adr_billing_streetnr' => '', + 'adr_billing_city' => 'Freiburg', + 'adr_billing_postalcode' => '79098', + 'adr_billing_country_id' => '1', + 'adr_billing_telefon' => '', + 'adr_billing_fax' => '', + 'adr_billing_additional_info' => '', + ) + )); + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_AuthorizationTest,test_Closed_with_MaxCapturesProcessed,@var $orderRefObject AmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Closed-MaxCapturesProcessed.xml'), $this->idReferenceManager); + + /** @var $orderRefObject AmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ + $orderRefObject = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->disableOriginalConstructor()->getMock(); + $getAuthorizationDetails = AmazonPaymentFixturesFactory::getAuthorizationDetails('success.xml'); + $orderRefObject->expects($this->once())->method('getAuthorizationDetails')->will( + $this->returnValue( + $getAuthorizationDetails->getGetAuthorizationDetailsResult()->getAuthorizationDetails() + ) + ); + + $this->getConfig()->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($orderRefObject)); + $this->ipnHandler->setAmazonConfig($this->getConfig()); + + $this->ipnHandler->expects($this->once())->method('updateShopOrderBillingAddress')->with( + $this->equalTo($this->ipnRequest->getOrder()), + $this->equalTo( + array( + 'adr_billing_company' => 'ESONO AG', + 'adr_billing_salutation_id' => '', + 'adr_billing_firstname' => '', + 'adr_billing_lastname' => 'Mr. Dev', + 'adr_billing_street' => 'Grünwälderstr. 10-14', + 'adr_billing_streetnr' => '', + 'adr_billing_city' => 'Freiburg', + 'adr_billing_postalcode' => '79098', + 'adr_billing_country_id' => '1', + 'adr_billing_telefon' => '', + 'adr_billing_fax' => '', + 'adr_billing_additional_info' => '', + ) + )); + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_AuthorizationTest,test_Closed_with_MaxCapturesProcessed_on_AuthWithCapture,* expect billing address to be updated.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Closed-MaxCapturesProcessed-CaptureNow.xml'), $this->idReferenceManager); + + /** @var $orderRefObject AmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ + $orderRefObject = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->disableOriginalConstructor()->getMock(); + $getAuthorizationDetails = AmazonPaymentFixturesFactory::getAuthorizationDetails('success.xml'); + $orderRefObject->expects($this->once())->method('getAuthorizationDetails')->will( + $this->returnValue( + $getAuthorizationDetails->getGetAuthorizationDetailsResult()->getAuthorizationDetails() + ) + ); + + $this->getConfig()->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($orderRefObject)); + $this->ipnHandler->setAmazonConfig($this->getConfig()); + + $this->ipnHandler->expects($this->once())->method('updateShopOrderBillingAddress')->with( + $this->equalTo($this->ipnRequest->getOrder()), + $this->equalTo( + array( + 'adr_billing_company' => 'ESONO AG', + 'adr_billing_salutation_id' => '', + 'adr_billing_firstname' => '', + 'adr_billing_lastname' => 'Mr. Dev', + 'adr_billing_street' => 'Grünwälderstr. 10-14', + 'adr_billing_streetnr' => '', + 'adr_billing_city' => 'Freiburg', + 'adr_billing_postalcode' => '79098', + 'adr_billing_country_id' => '1', + 'adr_billing_telefon' => '', + 'adr_billing_fax' => '', + 'adr_billing_additional_info' => '', + ) + )); + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + $this->ipnHandler->expects($this->never())->method('confirmTransaction'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_CaptureTest,test_Declined_with_AmazonRejected,* inform the shop owner.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Declined-AmazonRejected.xml'), $this->idReferenceManager); + $this->helperAddIPNMailObject('Declined', 'AmazonRejected', 'Amazon has rejected the capture. You should only retry the capture if the authorization is in the Open state.'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_CaptureTest,test_Declined_with_ProcessingFailure,* inform the shop owner.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Declined-ProcessingFailure.xml'), $this->idReferenceManager); + $this->helperAddIPNMailObject('Declined', 'ProcessingFailure', 'Amazon could not process the transaction due to an internal processing error. You should only retry the capture if the authorization is in the Open state. Otherwise, you should request a new authorization and then call Capture on it.'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_CaptureTest,test_Closed_with_AmazonClosed,* inform the shop owner.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Closed-AmazonClosed.xml'), $this->idReferenceManager); + $this->helperAddIPNMailObject('Closed', 'AmazonClosed', 'Amazon has closed the capture due to a problem with your account or with the buyer\'s account.'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_CaptureTest,test_Completed,* confirms a capture created individually- so we expect the transaction to be marked as completed.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Completed.xml'), $this->idReferenceManager); + + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + $transactionMock = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); + $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->returnValue($transactionMock)); + $this->ipnHandler->expects($this->once())->method('confirmTransaction'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_CaptureTest,test_Completed_TransactionAlreadyMarkedAsConfirmed,* test a capture created via auth with CaptureNow in sync mode - so the transaction is already confirmed -nothing should happen.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Completed.xml'), $this->idReferenceManager); + + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + /** @var $transactionMock \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ + $transactionMock = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); + $transactionMock->fieldConfirmed = true; + $transactionMock->sqlData['confirmed'] = '1'; + $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->returnValue($transactionMock)); + $this->ipnHandler->expects($this->never())->method('confirmTransaction'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_CaptureTest,test_Completed_TransactionNotFoundError,@var $transactionMock \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Completed.xml'), $this->idReferenceManager); + + $exception = new AmazonIPNTransactionException(AmazonIPNTransactionException::ERROR_TRANSACTION_NOT_FOUND); + $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->throwException($exception)); + $this->helperAddIPNMailObject('Completed', $exception->getErrorCodeAsString(), 'unable to find transaction matching IPN - details have been logged. '.(string) $exception); + $this->ipnHandler->expects($this->never())->method('confirmTransaction'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_CaptureTest,test_Completed_TransactionInvalid,* the IPN returned an orderIdManager that refers to a transaction Id that can not be found - so throw an error.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Completed.xml'), $this->idReferenceManager); + + $exception = new AmazonIPNTransactionException(AmazonIPNTransactionException::ERROR_TRANSACTION_DOES_NOT_MATCH_ORDER); + $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->throwException($exception)); + $this->helperAddIPNMailObject('Completed', $exception->getErrorCodeAsString(), 'unable to find transaction matching IPN - details have been logged. '.(string) $exception); + $this->ipnHandler->expects($this->never())->method('confirmTransaction'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_CaptureTest,test_Completed_NoTransaction,* the IPN returned an orderIdManager that refers to a transaction Id does not match the order.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Completed.xml'), $this->idReferenceManager); + + $exception = new AmazonIPNTransactionException(AmazonIPNTransactionException::ERROR_NO_TRANSACTION); + $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->throwException($exception)); + $this->helperAddIPNMailObject('Completed', $exception->getErrorCodeAsString(), 'unable to find transaction matching IPN - details have been logged. '.(string) $exception); + $this->ipnHandler->expects($this->never())->method('confirmTransaction'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_CaptureTest,test_Closed_with_MaxAmountRefunded,* the IPN does not match any transaction (or did not pass one).,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Closed-MaxAmountRefunded.xml'), $this->idReferenceManager); + + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_CaptureTest,test_Closed_with_MaxRefundsProcessed,* no action needs to be taken.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Closed-MaxRefundsProcessed.xml'), $this->idReferenceManager); + + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_OrderReferenceNotificationTest,test_open,"* no action needs to be taken on open. So make sure, that no mail is sent.","$this->helperAddIPNRequest( + AmazonPaymentFixturesFactory::getIPNOrderReferenceNotification('Open.xml'), + $this->idReferenceManager + ); + + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + $this->assertTrue($this->ipnHandler->handleIPN($this->ipnRequest));",- +AmazonIPNHandler_OrderReferenceNotificationTest,test_Canceled_SellerCanceled,* no notification.,"$this->helperAddIPNRequest( + AmazonPaymentFixturesFactory::getIPNOrderReferenceNotification('Canceled-SellerCanceled.xml'), + $this->idReferenceManager + ); + + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + $this->assertTrue($this->ipnHandler->handleIPN($this->ipnRequest));",- +AmazonIPNHandler_OrderReferenceNotificationTest,test_Closed_SellerClosed,* no notification.,"$this->helperAddIPNRequest( + AmazonPaymentFixturesFactory::getIPNOrderReferenceNotification('Closed-SellerClosed.xml'), + $this->idReferenceManager + ); + + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + $this->assertTrue($this->ipnHandler->handleIPN($this->ipnRequest));",- +AmazonIPNHandler_OrderReferenceNotificationTest,test_Suspended_InvalidPaymentMethod,"* the order was marked as suspended via a decline from an auth IPN. when we receive an IPN, that it has reopened, + * we need to inform the shop owner, that he must take action.","$this->helperAddIPNRequest( + AmazonPaymentFixturesFactory::getIPNOrderReferenceNotification('Suspended-InvalidPaymentMethod.xml'), + $this->idReferenceManager + ); + + $this->helperAddIPNMailObject('Suspended', 'InvalidPaymentMethod', 'There were problems with the payment method.'); + + $this->assertTrue($this->ipnHandler->handleIPN($this->ipnRequest));",- +AmazonIPNHandler_RefundTest,test_Declined_with_AmazonRejected,* inform the shop owner.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Declined-AmazonRejected.xml'), $this->idReferenceManager); + $this->helperAddIPNMailObject('Declined', 'AmazonRejected', 'Amazon has rejected the refund. You should issue a refund to the buyer in an alternate manner (for example, a gift card or store credit).'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_RefundTest,test_Declined_with_ProcessingFailure,* inform the shop owner.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Declined-ProcessingFailure.xml'), $this->idReferenceManager); + $this->helperAddIPNMailObject('Declined', 'ProcessingFailure', 'Amazon could not process the transaction due to an internal processing error or because the buyer has already received a refund from an A-to-z claim or a charge back. You should only retry the refund if the Capture object is in the Completed state. Otherwise, you should refund the buyer in an alternative way (for example, a store credit or a check).'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_RefundTest,test_Completed,* we expect the transaction to be marked as completed.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Completed.xml'), $this->idReferenceManager); + + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + $transactionMock = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); + $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->returnValue($transactionMock)); + $this->ipnHandler->expects($this->once())->method('confirmTransaction'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_RefundTest,test_Completed_TransactionAlreadyMarkedAsConfirmed,* we expect the transaction to be marked as completed.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Completed.xml'), $this->idReferenceManager); + + $this->ipnHandler->expects($this->never())->method('getMailProfile'); + + /** @var $transactionMock \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ + $transactionMock = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); + $transactionMock->fieldConfirmed = true; + $transactionMock->sqlData['confirmed'] = '1'; + $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->returnValue($transactionMock)); + $this->ipnHandler->expects($this->never())->method('confirmTransaction'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_RefundTest,test_Completed_TransactionNotFoundError,@var $transactionMock \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Completed.xml'), $this->idReferenceManager); + + $exception = new AmazonIPNTransactionException(AmazonIPNTransactionException::ERROR_TRANSACTION_NOT_FOUND); + $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->throwException($exception)); + $this->helperAddIPNMailObject('Completed', $exception->getErrorCodeAsString(), 'unable to find transaction matching IPN - details have been logged. '.(string) $exception); + $this->ipnHandler->expects($this->never())->method('confirmTransaction'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_RefundTest,test_Completed_TransactionInvalid,* the IPN returned an orderIdManager that refers to a transaction Id that can not be found - so throw an error.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Completed.xml'), $this->idReferenceManager); + + $exception = new AmazonIPNTransactionException(AmazonIPNTransactionException::ERROR_TRANSACTION_DOES_NOT_MATCH_ORDER); + $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->throwException($exception)); + $this->helperAddIPNMailObject('Completed', $exception->getErrorCodeAsString(), 'unable to find transaction matching IPN - details have been logged. '.(string) $exception); + $this->ipnHandler->expects($this->never())->method('confirmTransaction'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonIPNHandler_RefundTest,test_Completed_NoTransaction,* the IPN returned an orderIdManager that refers to a transaction Id does not match the order.,"$this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Completed.xml'), $this->idReferenceManager); + + $exception = new AmazonIPNTransactionException(AmazonIPNTransactionException::ERROR_NO_TRANSACTION); + $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->throwException($exception)); + $this->helperAddIPNMailObject('Completed', $exception->getErrorCodeAsString(), 'unable to find transaction matching IPN - details have been logged. '.(string) $exception); + $this->ipnHandler->expects($this->never())->method('confirmTransaction'); + + $this->ipnHandler->handleIPN($this->ipnRequest);",- +AmazonPaymentExtranetUserTest,testGetShippingAddress,"* have a user with a real address set, but user is set to amazon payment user and has an amazon payment shipping address + * we expect the amazon shipping address to be returned.","/** + * have a user with a real address set, but user is set to amazon payment user and has an amazon payment shipping address + * we expect the amazon shipping address to be returned. + */ + $amazonShippingAddressData = array( + 'company' => '', + 'firstname' => '', + 'lastname' => '', + 'street' => '', + 'streetnr' => '', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'telefon' => '', + 'data_country_id' => '1', + ); + $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); + + $userList = $this->helperGetUser(); + /** @var \TdbDataExtranetUser $user */ + foreach ($userList as $type => $user) { + $user->setAmazonPaymentEnabled(true); + $user->setAmazonShippingAddress($amazonShippingAddressObject); + + $this->assertTrue($user->GetShippingAddress()->getIsAmazonShippingAddress()); + $this->assertEquals($amazonShippingAddressObject, $user->GetShippingAddress()); + $this->assertTrue($user->ShipToBillingAddress());",- +AmazonPaymentExtranetUserTest,testGetShippingAddressFromUserWithBillingNotEqualToShipping,@var \TdbDataExtranetUser $user,"/** + * have a user with a real address set, but user is set to amazon payment user and has an amazon payment shipping address + * we expect the amazon shipping address to be returned. + */ + $amazonShippingAddressData = array( + 'company' => '', + 'firstname' => '', + 'lastname' => '', + 'street' => '', + 'streetnr' => '', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'telefon' => '', + 'data_country_id' => '1', + ); + $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); + + $userList = $this->helperGetUser(true); + /** @var \TdbDataExtranetUser $user */ + foreach ($userList as $type => $user) { + $user->setAmazonPaymentEnabled(true); + $user->setAmazonShippingAddress($amazonShippingAddressObject); + + $this->assertTrue($user->ShipToBillingAddress()); + $this->assertTrue($user->GetShippingAddress()->getIsAmazonShippingAddress()); + $this->assertEquals($amazonShippingAddressObject->sqlData, $user->GetShippingAddress()->sqlData); + + $this->assertTrue($user->GetBillingAddress()->getIsAmazonShippingAddress()); + $this->assertEquals($amazonShippingAddressObject->sqlData, $user->GetBillingAddress()->sqlData);",- +AmazonPaymentExtranetUserTest,testHelperGetUser,"* have a user with a real address set, but user is set to amazon payment user and has an amazon payment shipping address + * we expect the amazon shipping address to be returned.","$userList = $this->helperGetUser(true); + /** @var \TdbDataExtranetUser $user */ + foreach ($userList as $type => $user) { + if ('noShippingAddress' === $type) { + continue;",- +AmazonPaymentExtranetUserTest,testGetBillingAddressOfUserWithShippingEqualToBilling,@var \TdbDataExtranetUser $user,"// change the shipping address data and expect the changed data to be returned, the user to remain in the + // amazon shipping user state, and the returned address not getting an id (ie not being saved) + $amazonShippingAddressData = array( + 'company' => '', + 'firstname' => '', + 'lastname' => '', + 'street' => '', + 'streetnr' => '', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'telefon' => '', + 'data_country_id' => '1', + ); + $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); + + $userList = $this->helperGetUser(); + /** @var \TdbDataExtranetUser $user */ + foreach ($userList as $type => $user) { + $user->setAmazonPaymentEnabled(true); + $user->setAmazonShippingAddress($amazonShippingAddressObject); + + $this->assertEquals($amazonShippingAddressObject->sqlData, $user->GetBillingAddress()->sqlData); + $this->assertTrue($user->GetBillingAddress()->getIsAmazonShippingAddress());",- +AmazonPaymentExtranetUserTest,testUpdateShippingAddress,@var \TdbDataExtranetUser $user,"// change the shipping address data and expect the changed data to be returned, the user to remain in the + // amazon shipping user state, and the returned address not getting an id (ie not being saved) + $amazonShippingAddressData = array( + 'company' => '', + 'firstname' => '', + 'lastname' => '', + 'street' => '', + 'streetnr' => '', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'telefon' => '', + 'data_country_id' => '1', + ); + $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); + + $userList = $this->helperGetUser(); + /** @var \TdbDataExtranetUser $user */ + foreach ($userList as $type => $user) { + $user->setAmazonPaymentEnabled(true); + $user->setAmazonShippingAddress($amazonShippingAddressObject); + + $newShippingData = array( + 'company' => 'Amazon ESONO AG', + 'firstname' => '', + 'lastname' => 'Amazon Mr. Dev', + 'street' => 'Amazon Grünwälderstr 10-14', + 'streetnr' => '', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'telefon' => '07611518280', + 'data_country_id' => '1', + ); + + $user->UpdateShippingAddress($newShippingData); + + $expectedShippingAdr = \TdbDataExtranetUserAddress::GetNewInstance($newShippingData); + + $this->assertEquals($expectedShippingAdr->sqlData, $user->GetShippingAddress()->sqlData); + $this->assertTrue($user->GetShippingAddress()->getIsAmazonShippingAddress()); + $this->assertNull($user->GetShippingAddress()->id); + + $this->assertTrue($user->isAmazonPaymentUser());",- +AmazonPaymentExtranetUserTest,testUpdateBillingAddress,@var \PHPUnit_Framework_MockObject_MockObject|\TdbDataExtranetUser $userWithLogin,"// change the shipping address data and expect the changed data to be returned, the user to remain in the + // amazon shipping user state, and the returned address not getting an id (ie not being saved) + $amazonBillingAddressData = array( + 'company' => '', + 'firstname' => '', + 'lastname' => '', + 'street' => '', + 'streetnr' => '', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'telefon' => '', + 'data_country_id' => '1', + ); + $amazonBillingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonBillingAddressData); + + $userList = $this->helperGetUser(); + /** @var \TdbDataExtranetUser $user */ + foreach ($userList as $type => $user) { + $user->setAmazonPaymentEnabled(true); + $user->setAmazonShippingAddress($amazonBillingAddressObject); + + $newBillingData = array( + 'company' => 'Amazon ESONO AG', + 'firstname' => '', + 'lastname' => 'Amazon Mr. Dev', + 'street' => 'Amazon Grünwälderstr 10-14', + 'streetnr' => '', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'telefon' => '07611518280', + 'data_country_id' => '1', + ); + + $user->UpdateBillingAddress($newBillingData); + + $expectedBillingAdr = \TdbDataExtranetUserAddress::GetNewInstance($newBillingData); + + $this->assertEquals($expectedBillingAdr->sqlData, $user->GetBillingAddress()->sqlData); + $this->assertTrue($user->GetBillingAddress()->getIsAmazonShippingAddress()); + $this->assertNull($user->GetBillingAddress()->id); + + $this->assertTrue($user->isAmazonPaymentUser());",- +AmazonPaymentExtranetUserTest,testSetAmazonPaymentEnabledToFalse,@var \TdbDataExtranetUser $user,"/** + * we have a user with an amazon and a real shipping address. we expect the real shipping address being + * returned when changing the user to a non-amazon user. + */ + $amazonShippingAddressData = array( + 'company' => '', + 'firstname' => '', + 'lastname' => '', + 'street' => '', + 'streetnr' => '', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'telefon' => '', + 'data_country_id' => '1', + ); + $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); + + $userList = $this->helperGetUser(); + /** @var \TdbDataExtranetUser $user */ + foreach ($userList as $type => $user) { + $user->setAmazonPaymentEnabled(true); + $user->setAmazonShippingAddress($amazonShippingAddressObject); + + $user->setAmazonPaymentEnabled(false); + $this->assertFalse($user->isAmazonPaymentUser()); + $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); + $this->assertEquals($expectedAddress->sqlData, $user->GetShippingAddress()->sqlData); + $this->assertTrue($user->ShipToBillingAddress());",- +AmazonPaymentExtranetUserTest,testSetAmazonPaymentEnabledToFalseAndFalseAgain,@var \TdbDataExtranetUser $user,"$amazonShippingAddressData = array( + 'company' => '', + 'firstname' => '', + 'lastname' => '', + 'street' => '', + 'streetnr' => '', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'telefon' => '', + 'data_country_id' => '1', + ); + $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); + + $userList = $this->helperGetUser(); + /** @var \TdbDataExtranetUser $user */ + foreach ($userList as $type => $user) { + $user->setAmazonPaymentEnabled(true); + $user->setAmazonShippingAddress($amazonShippingAddressObject); + + $user->setAmazonPaymentEnabled(false); + $this->assertFalse($user->isAmazonPaymentUser()); + $user->setAmazonPaymentEnabled(false); + $this->assertFalse($user->isAmazonPaymentUser()); + $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); + $this->assertEquals($expectedAddress->sqlData, $user->GetShippingAddress()->sqlData); + $this->assertTrue($user->ShipToBillingAddress());",- +AmazonPaymentExtranetUserTest,testSetAmazonPaymentEnabledNoneAmazonUserSetToTrueThenFalse,@var \TdbDataExtranetUser $user,"$aUserData = array('login' => 'bla'); + $user = \TdbDataExtranetUser::GetNewInstance($aUserData); + + $type = 'noLogin'; + $adrExpected = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); + $user->UpdateShippingAddress($this->originalAddressData[$type]['shippingAddress']); + $user->UpdateBillingAddress($this->originalAddressData[$type]['shippingAddress']); + + $adr = $user->GetShippingAddress(); + + $user->setAmazonPaymentEnabled(true); + $this->assertEquals($adrExpected->sqlData, $adr->sqlData); + $this->assertTrue($user->isAmazonPaymentUser()); + + $adr = $user->GetShippingAddress(); + $user->setAmazonPaymentEnabled(false); + $this->assertFalse($user->isAmazonPaymentUser()); + $this->assertEquals($adrExpected->sqlData, $adr->sqlData); + $this->assertTrue($user->ShipToBillingAddress());",- +AmazonPaymentExtranetUserTest,testSetAmazonPaymentEnabledNoneAmazonUserSetToFalse,"* we have a user with an amazon and a real shipping address. we expect the real shipping address being + * returned when changing the user to a non-amazon user.","$aUserData = array('login' => 'bla'); + $user = \TdbDataExtranetUser::GetNewInstance($aUserData); + + $type = 'noLogin'; + $adrExpected = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); + $user->UpdateShippingAddress($this->originalAddressData[$type]['shippingAddress']); + $user->UpdateBillingAddress($this->originalAddressData[$type]['shippingAddress']); + + $adr = $user->GetShippingAddress(); + + $user->setAmazonPaymentEnabled(false); + $this->assertEquals($adrExpected->sqlData, $adr->sqlData); + $this->assertFalse($user->isAmazonPaymentUser()); + $this->assertTrue($user->ShipToBillingAddress());",- +AmazonPaymentExtranetUserTest,testSetAmazonPaymentEnabledToFalseShippingNotBilling,@var \TdbDataExtranetUser $user,"/** + * we have a user with an amazon and a real shipping address. we expect the real shipping address being + * returned when changing the user to a non-amazon user. + */ + $amazonShippingAddressData = array( + 'company' => '', + 'firstname' => '', + 'lastname' => '', + 'street' => '', + 'streetnr' => '', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'telefon' => '', + 'data_country_id' => '1', + ); + $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); + + $userList = $this->helperGetUser(true); + /** @var \TdbDataExtranetUser $user */ + foreach ($userList as $type => $user) { + $user->setAmazonPaymentEnabled(true); + $user->setAmazonShippingAddress($amazonShippingAddressObject); + + $user->setAmazonPaymentEnabled(false); + $this->assertFalse($user->isAmazonPaymentUser()); + $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); + $this->assertEquals($expectedAddress->sqlData, $user->GetShippingAddress()->sqlData); + + $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['billingAddress']); + $this->assertEquals($expectedAddress->sqlData, $user->GetBillingAddress()->sqlData); + if ('noShippingAddress' === $type) { + $this->assertTrue($user->ShipToBillingAddress()); // users without a shipping address always have shipping = to billing",- +AmazonPaymentExtranetUserTest,testSetAmazonPaymentEnabledToFalseAndFalseAgainShippingNotBilling,@var \TdbDataExtranetUser $user,"$amazonShippingAddressData = array( + 'company' => '', + 'firstname' => '', + 'lastname' => '', + 'street' => '', + 'streetnr' => '', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'telefon' => '', + 'data_country_id' => '1', + ); + $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); + + $userList = $this->helperGetUser(true); + /** @var \TdbDataExtranetUser $user */ + foreach ($userList as $type => $user) { + $user->setAmazonPaymentEnabled(true); + $user->setAmazonShippingAddress($amazonShippingAddressObject); + + $user->setAmazonPaymentEnabled(false); + $this->assertFalse($user->isAmazonPaymentUser()); + $user->setAmazonPaymentEnabled(false); + $this->assertFalse($user->isAmazonPaymentUser()); + $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); + $this->assertEquals($expectedAddress->sqlData, $user->GetShippingAddress()->sqlData); + + $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['billingAddress']); + $this->assertEquals($expectedAddress->sqlData, $user->GetBillingAddress()->sqlData); + if ('noShippingAddress' === $type) { + $this->assertTrue($user->ShipToBillingAddress()); // users without a shipping address always have shipping = to billing",- +AmazonPaymentExtranetUserTest,testSetAmazonPaymentEnabledNoneAmazonUserSetToTrueThenFalseShippingNotBilling,"* we have a user with an amazon and a real shipping address. we expect the real shipping address being + * returned when changing the user to a non-amazon user.","$aUserData = array('login' => 'bla'); + $user = \TdbDataExtranetUser::GetNewInstance($aUserData); + + $type = 'noLogin'; + $adrExpected = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); + $user->UpdateShippingAddress($this->originalAddressData[$type]['shippingAddress']); + + $adr = $user->GetShippingAddress(); + + $user->setAmazonPaymentEnabled(true); + $this->assertEquals($adrExpected->sqlData, $adr->sqlData); + $this->assertTrue($user->isAmazonPaymentUser()); + + $adr = $user->GetShippingAddress(); + $user->setAmazonPaymentEnabled(false); + $this->assertFalse($user->isAmazonPaymentUser()); + $this->assertEquals($adrExpected->sqlData, $adr->sqlData);",- +AmazonPaymentExtranetUserTest,testSetAmazonPaymentEnabledNoneAmazonUserSetToFalseShippingNotBilling,@var \TdbDataExtranetUser $user,"$aUserData = array('login' => 'bla'); + $user = \TdbDataExtranetUser::GetNewInstance($aUserData); + + $type = 'noLogin'; + $adrExpected = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); + $user->UpdateShippingAddress($this->originalAddressData[$type]['shippingAddress']); + + $adr = $user->GetShippingAddress(); + + $user->setAmazonPaymentEnabled(false); + $this->assertEquals($adrExpected->sqlData, $adr->sqlData); + $this->assertFalse($user->isAmazonPaymentUser());",- +AmazonPaymentExtranetUserTest,it_is_serialized_and_unserialzed,@var \TdbDataExtranetUser $user,"// test to make sure the user data survives serialization + $userList = $this->helperGetUser(true); + $amazonShippingAddressData = array( + 'company' => '', + 'firstname' => '', + 'lastname' => '', + 'street' => '', + 'streetnr' => '', + 'city' => 'Freiburg', + 'postalcode' => '79098', + 'telefon' => '', + 'data_country_id' => '1', + ); + $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); + + /** @var $user \TdbDataExtranetUser */ + foreach ($userList as $type => $user) { + $user->setAmazonPaymentEnabled(true); + $user->setAmazonShippingAddress($amazonShippingAddressObject); + $seralized = serialize($user); + /** @var $unseralizedUser \TdbDataExtranetUser */ + $unseralizedUser = unserialize($seralized); + + $this->assertTrue($unseralizedUser->isAmazonPaymentUser()); + $this->assertEquals($amazonShippingAddressObject, $unseralizedUser->GetShippingAddress()); + + // now change to non amazon mode to check if the original billing/shipping survived the serialization + + $unseralizedUser->setAmazonPaymentEnabled(false); + $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); + $this->assertEquals($expectedAddress->sqlData, $unseralizedUser->GetShippingAddress()->sqlData); + + $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['billingAddress']); + $this->assertEquals($expectedAddress->sqlData, $unseralizedUser->GetBillingAddress()->sqlData); + if ('noShippingAddress' === $type) { + $this->assertTrue($unseralizedUser->ShipToBillingAddress()); // users without a shipping address always have shipping = to billing",- +AmazonPaymentBasketTest,it_set_the_order_reference_id,* @test,"// we expect the basket to have an order reference id, and we expect an instance of the extranet user passed to be activated as an amazon user + $user = $this->getMockBuilder('TdbDataExtranetUser')->disableOriginalConstructor()->getMock(); + $user->expects($this->once())->method('setAmazonPaymentEnabled')->with($this->equalTo(true)); + + /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ + $basket = $this->getMockBuilder('\TShopBasket')->setMethods(array('updateAmazonOrderReferenceDetails'))->getMock(); + $basket->expects($this->once())->method('updateAmazonOrderReferenceDetails'); + $basket->setAmazonOrderReferenceId('35985468546954', $user); + + $this->assertEquals('35985468546954', $basket->getAmazonOrderReferenceId());",- +AmazonPaymentBasketTest,it_resets_the_order_reference_id,@var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject,"// we expect the basket to have an order reference id, and we expect an instance of the extranet user passed to be activated as an amazon user + $user = $this->getMockBuilder('TdbDataExtranetUser')->disableOriginalConstructor()->getMock(); + $user->expects($this->once())->method('setAmazonPaymentEnabled')->with($this->equalTo(false)); + + /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ + $basket = $this->getMockBuilder('\TShopBasket')->setMethods(array('updateAmazonOrderReferenceDetails'))->getMock(); + $basket->expects($this->never())->method('updateAmazonOrderReferenceDetails'); + + $basket->setAmazonOrderReferenceId(null, $user); + + $this->assertEquals(null, $basket->getAmazonOrderReferenceId());",- +AmazonPaymentBasketTest,it_is_serialized_and_unserialzed,* @test,"// we expect the basket to have an order reference id, and we expect an instance of the extranet user passed to be activated as an amazon user + $user = $this->getMockBuilder('TdbDataExtranetUser')->disableOriginalConstructor()->getMock(); + $user->expects($this->once())->method('setAmazonPaymentEnabled')->with($this->equalTo(true)); + $prop = new \ReflectionProperty('\ChameleonSystem\AmazonPaymentBundle\pkgShop\AmazonPaymentBasket', 'amazonOrderReferenceValue'); + $prop->setAccessible(true); + + /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ + $basket = $this->getMockBuilder('\TShopBasket')->setMethods(array('updateAmazonOrderReferenceDetails'))->getMock(); + $basket->expects($this->once())->method('updateAmazonOrderReferenceDetails'); + + $basket->setAmazonOrderReferenceId('35985468546954', $user); + $prop->setValue($basket, '12345'); + + $seralize = serialize($basket); + $unseralizedBasket = unserialize($seralize); + + $this->assertEquals('35985468546954', $unseralizedBasket->getAmazonOrderReferenceId()); + $this->assertEquals('12345', $prop->getValue($unseralizedBasket)); + + // check that the orderRefValue sent to amazon was also recovered",- +AmazonPaymentBasketTest,test_basket_value_changed_on_basket_without_amazon_order_reference_id,@var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject,"/** @var $newItem \TShopBasketArticle|\PHPUnit_Framework_MockObject_MockObject */ + $newItem = $this->getMockBuilder('\TShopBasketArticle')->disableOriginalConstructor()->getMock(); + $newItem->dProductPrice = 10; + $newItem->dAmount = 1; + $newItem->expects($this->any())->method('IsBuyable')->will($this->returnValue(true)); + + /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ + $basket = $this->getMockBuilder('\TShopBasket')->disableOriginalConstructor()->setMethods(array('updateAmazonOrderReferenceDetails', 'SetBasketRecalculationFlag', 'ResetAllShippingMarkers', 'RecalculateDiscounts', 'RecalculateNoneSponsoredVouchers', 'RecalculateShipping', 'CalculatePaymentMethodCosts', 'RecalculateVAT', 'RecalculateVouchers'))->getMock(); + $basket->expects($this->never())->method('updateAmazonOrderReferenceDetails'); + $basket->AddItem($newItem); + $basket->RecalculateBasket();",- +AmazonPaymentBasketTest,test_basket_value_changed_first_time_on_basket_with_amazon_order_reference_id,* @test,"/** @var $newItem \TShopBasketArticle|\PHPUnit_Framework_MockObject_MockObject */ + $newItem = $this->getMockBuilder('\TShopBasketArticle')->disableOriginalConstructor()->getMock(); + $newItem->dProductPrice = 10; + $newItem->dAmount = 1; + $newItem->expects($this->any())->method('IsBuyable')->will($this->returnValue(true)); + + $userMock = $this->getMockBuilder('TdbDataExtranetUser')->getMock(); + /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ + $basket = $this->getMockBuilder('\TShopBasket')->setMethods(array('updateAmazonOrderReferenceDetails', 'SetBasketRecalculationFlag', 'ResetAllShippingMarkers', 'RecalculateDiscounts', 'RecalculateNoneSponsoredVouchers', 'RecalculateShipping', 'CalculatePaymentMethodCosts', 'RecalculateVAT', 'RecalculateVouchers'))->getMock(); + $basket->setAmazonOrderReferenceId('ORDER-REF-ID', $userMock); + + $basket->expects($this->once())->method('updateAmazonOrderReferenceDetails'); + $basket->AddItem($newItem); + $basket->RecalculateBasket();",- +AmazonPaymentBasketTest,test_basket_value_changed_second_time_on_basket_with_amazon_order_reference_id,@var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject,"/** @var $newItem \TShopBasketArticle|\PHPUnit_Framework_MockObject_MockObject */ + $newItem = $this->getMockBuilder('\TShopBasketArticle')->disableOriginalConstructor()->getMock(); + $newItem->sBasketItemKey = '1'; + $newItem->dProductPrice = 10; + $newItem->dPriceTotal = 10; + $newItem->dAmount = 1; + $newItem->expects($this->any())->method('IsBuyable')->will($this->returnValue(true)); + /** @var $newItem2 \TShopBasketArticle|\PHPUnit_Framework_MockObject_MockObject */ + $newItem2 = $this->getMockBuilder('\TShopBasketArticle')->disableOriginalConstructor()->getMock(); + $newItem2->sBasketItemKey = '2'; + $newItem2->dProductPrice = 15; + $newItem2->dPriceTotal = 15; + $newItem2->dAmount = 1; + $newItem2->expects($this->any())->method('IsBuyable')->will($this->returnValue(true)); + + $userMock = $this->getMockBuilder('TdbDataExtranetUser')->getMock(); + /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ + $basket = $this->getMockBuilder('\TShopBasket')->setMethods(array('updateAmazonOrderReferenceDetails', 'SetBasketRecalculationFlag', 'ResetAllShippingMarkers', 'RecalculateDiscounts', 'RecalculateNoneSponsoredVouchers', 'RecalculateShipping', 'CalculatePaymentMethodCosts', 'RecalculateVAT', 'RecalculateVouchers'))->getMock(); + $basket->setAmazonOrderReferenceId('ORDER-REF-ID', $userMock); + + $basket->expects($this->exactly(2))->method('updateAmazonOrderReferenceDetails'); + $basket->AddItem($newItem); + $basket->RecalculateBasket(); + $basket->dCostTotal = $basket->dCostTotal + 10; + $basket->AddItem($newItem2); + $basket->RecalculateBasket();",- +AmazonPaymentBasketTest,test_recalculate_without_value_change_on_basket_with_amazon_order_reference_id,@var $newItem \TShopBasketArticle|\PHPUnit_Framework_MockObject_MockObject,"/** @var $newItem \TShopBasketArticle|\PHPUnit_Framework_MockObject_MockObject */ + $newItem = $this->getMockBuilder('\TShopBasketArticle')->disableOriginalConstructor()->getMock(); + $newItem->sBasketItemKey = '1'; + $newItem->dProductPrice = 10; + $newItem->dAmount = 1; + $newItem->expects($this->any())->method('IsBuyable')->will($this->returnValue(true)); + + $userMock = $this->getMockBuilder('TdbDataExtranetUser')->getMock(); + /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ + $basket = $this->getMockBuilder('\TShopBasket')->setMethods(array('updateAmazonOrderReferenceDetails', 'SetBasketRecalculationFlag', 'ResetAllShippingMarkers', 'RecalculateDiscounts', 'RecalculateNoneSponsoredVouchers', 'RecalculateShipping', 'CalculatePaymentMethodCosts', 'RecalculateVAT', 'RecalculateVouchers'))->getMock(); + $basket->setAmazonOrderReferenceId('ORDER-REF-ID', $userMock); + + $basket->expects($this->once())->method('updateAmazonOrderReferenceDetails'); + $basket->AddItem($newItem); + $basket->RecalculateBasket(); + $basket->RecalculateBasket();",- +ProcessRawRequestDataTest,test_order_reference_ipn,"* we expect + * 1. an OffAmazonPaymentsNotifications_Model_OrderReferenceNotification Object + * 2. an IPN Manager loaded via the order AmazonOrderReferenceId + * 3. no localId.","$request = AmazonPaymentFixturesFactory::getIPNRequest('OrderReferenceNotification.post'); + $expectedIPNObject = AmazonPaymentFixturesFactory::getIPNOrderReferenceNotification('Open.xml'); + $this->helperStubIPNApi($request, $expectedIPNObject); + + $expectedIdManager = new AmazonReferenceIdManager('AMAZON-ORDER-REFERENCE', 'SOME-SHOP-ORDER-ID'); + + //amazonOrderReferenceObjectFactory + $this->getConfig()->expects($this->once())->method('amazonReferenceIdManagerFactory') + ->with($this->anything(), $this->equalTo(AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_AMAZON_ORDER_REFERENCE_ID), $this->equalTo('AMAZON-ORDER-REFERENCE')) + ->will($this->returnValue($expectedIdManager)); + + /** @var $payment AmazonShopPaymentHandlerGroup|PHPUnit_Framework_MockObject_MockObject */ + $payment = $this->helperGetPaymentGroupHandler($request); + + $rawData = $payment->processRawRequestData(array()); + + $this->assertTrue(isset($rawData['amazonNotificationObject']), 'no amazonNotificationObject'); + $this->assertTrue(isset($rawData['amazonReferenceIdManager']), 'no amazonReferenceIdManager'); + $this->assertFalse(isset($rawData['amazonLocalReferenceId']), 'there should not be a amazonLocalReferenceId'); + + $this->assertEquals($expectedIPNObject, $rawData['amazonNotificationObject']); + $this->assertEquals($expectedIdManager, $rawData['amazonReferenceIdManager']);",- +ProcessRawRequestDataTest,test_authorization_ipn,@var $payment AmazonShopPaymentHandlerGroup|PHPUnit_Framework_MockObject_MockObject,"$request = AmazonPaymentFixturesFactory::getIPNRequest('AuthorizationNotification.post'); + $expectedIPNObject = AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Open.xml'); + $this->helperStubIPNApi($request, $expectedIPNObject); + + $expectedId = new AmazonReferenceId(AmazonReferenceId::TYPE_AUTHORIZE, 'AUTH-REF-ID', 12.23, null); + /** @var $expectedIdManager AmazonReferenceIdManager|PHPUnit_Framework_MockObject_MockObject */ + $expectedIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->setConstructorArgs(array('AMAZON-ORDER-REFERENCE', 'SOME-SHOP-ORDER-ID'))->getMock(); + $expectedIdManager->expects($this->any())->method('findFromLocalReferenceId')->with($this->equalTo('AUTH-REF-ID'), $this->equalTo(IAmazonReferenceId::TYPE_AUTHORIZE))->will($this->returnValue($expectedId)); + + //amazonOrderReferenceObjectFactory + $this->getConfig()->expects($this->once())->method('amazonReferenceIdManagerFactory') + ->with($this->anything(), $this->equalTo(AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID), $this->equalTo('AUTH-REF-ID')) + ->will($this->returnValue($expectedIdManager)); + + /** @var $payment AmazonShopPaymentHandlerGroup|PHPUnit_Framework_MockObject_MockObject */ + $payment = $this->helperGetPaymentGroupHandler($request); + + $rawData = $payment->processRawRequestData(array()); + + $this->assertTrue(isset($rawData['amazonNotificationObject']), 'no amazonNotificationObject'); + $this->assertTrue(isset($rawData['amazonReferenceIdManager']), 'no amazonReferenceIdManager'); + $this->assertTrue(isset($rawData['amazonLocalReferenceId']), 'no amazonLocalReferenceId'); + + $this->assertEquals($expectedIPNObject, $rawData['amazonNotificationObject']); + $this->assertEquals($expectedIdManager, $rawData['amazonReferenceIdManager']); + $this->assertEquals($expectedId, $rawData['amazonLocalReferenceId']);",- +ProcessRawRequestDataTest,test_capture_ipn,"* we expect + * 1. an OffAmazonPaymentsNotifications_Model_AuthorizationNotification Object + * 2. an IPN Manager loaded via the order AuthorizationReferenceId + * note: it does not matter if the request was synchronous or not or if it was in combination with a capture now.","$request = AmazonPaymentFixturesFactory::getIPNRequest('CaptureNotification.post'); + $expectedIPNObject = AmazonPaymentFixturesFactory::getIPNCaptureNotification('Completed.xml'); + $this->helperStubIPNApi($request, $expectedIPNObject); + + $expectedId = new AmazonReferenceId(AmazonReferenceId::TYPE_CAPTURE, 'AMAZON-CAPTURE-REFERENCE-ID', 12.23, '12345'); + /** @var $expectedIdManager AmazonReferenceIdManager|PHPUnit_Framework_MockObject_MockObject */ + $expectedIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->setConstructorArgs(array('AMAZON-ORDER-REFERENCE', 'SOME-SHOP-ORDER-ID'))->getMock(); + $expectedIdManager->expects($this->any())->method('findFromLocalReferenceId')->with($this->equalTo('AMAZON-CAPTURE-REFERENCE-ID'), $this->equalTo(IAmazonReferenceId::TYPE_CAPTURE))->will($this->returnValue($expectedId)); + + //amazonOrderReferenceObjectFactory + $this->getConfig()->expects($this->once())->method('amazonReferenceIdManagerFactory') + ->with($this->anything(), $this->equalTo(AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID), $this->equalTo('AMAZON-CAPTURE-REFERENCE-ID')) + ->will($this->returnValue($expectedIdManager)); + + /** @var $payment AmazonShopPaymentHandlerGroup|PHPUnit_Framework_MockObject_MockObject */ + $payment = $this->helperGetPaymentGroupHandler($request); + + $rawData = $payment->processRawRequestData(array()); + + $this->assertTrue(isset($rawData['amazonNotificationObject']), 'no amazonNotificationObject'); + $this->assertTrue(isset($rawData['amazonReferenceIdManager']), 'no amazonReferenceIdManager'); + $this->assertTrue(isset($rawData['amazonLocalReferenceId']), 'no amazonLocalReferenceId'); + + $this->assertEquals($expectedIPNObject, $rawData['amazonNotificationObject']); + $this->assertEquals($expectedIdManager, $rawData['amazonReferenceIdManager']); + $this->assertEquals($expectedId, $rawData['amazonLocalReferenceId']);",- +ProcessRawRequestDataTest,test_refund_ipn,@var $expectedIdManager AmazonReferenceIdManager|PHPUnit_Framework_MockObject_MockObject,"$request = AmazonPaymentFixturesFactory::getIPNRequest('RefundNotification.post'); + $expectedIPNObject = AmazonPaymentFixturesFactory::getIPNRefundNotification('Completed.xml'); + $this->helperStubIPNApi($request, $expectedIPNObject); + + // the local id may be known - or not + $expectedId = new AmazonReferenceId(AmazonReferenceId::TYPE_REFUND, 'REFUND-REFERENCE-ID', 12.23, null); + /** @var $expectedIdManager AmazonReferenceIdManager|PHPUnit_Framework_MockObject_MockObject */ + $expectedIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->setConstructorArgs(array('AMAZON-ORDER-REFERENCE', 'SOME-SHOP-ORDER-ID'))->getMock(); + $expectedIdManager->expects($this->any())->method('findFromLocalReferenceId')->with($this->equalTo('REFUND-REFERENCE-ID'), $this->equalTo(IAmazonReferenceId::TYPE_REFUND))->will($this->returnValue($expectedId)); + + //amazonOrderReferenceObjectFactory + $this->getConfig()->expects($this->once())->method('amazonReferenceIdManagerFactory') + ->with($this->anything(), $this->equalTo(AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID), $this->equalTo('REFUND-REFERENCE-ID')) + ->will($this->returnValue($expectedIdManager)); + + /** @var $payment AmazonShopPaymentHandlerGroup|PHPUnit_Framework_MockObject_MockObject */ + $payment = $this->helperGetPaymentGroupHandler($request); + + $rawData = $payment->processRawRequestData(array()); + + $this->assertTrue(isset($rawData['amazonNotificationObject']), 'no amazonNotificationObject'); + $this->assertTrue(isset($rawData['amazonReferenceIdManager']), 'no amazonReferenceIdManager'); + $this->assertTrue(isset($rawData['amazonLocalReferenceId']), 'no amazonLocalReferenceId'); + + $this->assertEquals($expectedIPNObject, $rawData['amazonNotificationObject']); + $this->assertEquals($expectedIdManager, $rawData['amazonReferenceIdManager']); + $this->assertEquals($expectedId, $rawData['amazonLocalReferenceId']);",- +AmazonReferenceIdManagerPersistenceTest,test_persist,* @var \PDO,"$manager = new AmazonReferenceIdManager($this->amazonOrderReferenceId, $this->orderId); + + $auth1 = $manager->createLocalAuthorizationReferenceIdWithCaptureNow(IAmazonReferenceId::REQUEST_MODE_SYNCHRONOUS, 7.00, null); + $auth1->setAmazonId('MY-AMAZON-ID'); + $auth2 = $manager->createLocalAuthorizationReferenceId(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS, 8.00, 'transactionId'); + $capture1 = $manager->createLocalCaptureReferenceId(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS, $auth1->getLocalId(), 9.00, 'transactionId2'); + $refund = $manager->createLocalRefundReferenceId(10.00, 'transactionId3'); + + $dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); + + $manager->persist($dbal); + + // then load and check if equal + + $new = AmazonReferenceIdManager::createFromShopOrderId($dbal, $this->orderId); + + $this->assertEquals($manager, $new); + + $new->delete($dbal); + + // should only contain one record + $remaining = $dbal->fetchAllAssociative('SELECT id, local_id, shop_order_id,amazon_order_reference_id, amazon_id, value, type, capture_now, request_mode, pkg_shop_payment_transaction_id FROM '.self::AMAZON_ID_MANAGER_TABLE); + $expected = array( + array( + 'id' => '1234567890', + 'local_id' => 'NOT-RELATED', + 'shop_order_id' => 'NOT-RELATED-ORDER', + 'amazon_order_reference_id' => 'SOME-ORDER-REF-NOT-RELATED', + 'amazon_id' => 'SOME-UNRELATED-AUTH-ID', + 'value' => 200.00, + 'type' => '1', + 'capture_now' => '0', + 'request_mode' => '1', + 'pkg_shop_payment_transaction_id' => 'NOT-RELATED-TRANSACTION-ID', + ), + ); + $this->assertEquals($expected, $remaining);",- +AmazonReferenceIdManagerPersistenceTest,test_load_from_row_and_find_from_local_id,@var $item AmazonReferenceId,"$expected = array(); + $source = array(); + + $source[] = array( + 'id' => '1', + 'shop_order_id' => 'ORDERID', + 'amazon_order_reference_id' => 'AMAZON-ORDER-REF', + 'local_id' => 'AUTH-1', + 'amazon_id' => 'AMAZON-AUTH-1', + 'value' => 100, + 'type' => '1', + 'request_mode' => '1', + 'capture_now' => '0', + 'pkg_shop_payment_transaction_id' => '', + ); + $item = new AmazonReferenceId(AmazonReferenceId::TYPE_AUTHORIZE, 'AUTH-1', 100, null); + $item->setAmazonId('AMAZON-AUTH-1'); + $item->setCaptureNow(false); + $item->setRequestMode(AmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); + $expected[] = $item; + + $source[] = array( + 'id' => '2', + 'shop_order_id' => 'ORDERID', + 'amazon_order_reference_id' => 'AMAZON-ORDER-REF', + 'local_id' => 'AUTH-2', + 'amazon_id' => 'AMAZON-AUTH-2', + 'value' => 50, + 'type' => '1', + 'request_mode' => '2', + 'capture_now' => '1', + 'pkg_shop_payment_transaction_id' => 'TRANSACTIONID', + ); + $item = new AmazonReferenceId(AmazonReferenceId::TYPE_AUTHORIZE, 'AUTH-2', 50, 'TRANSACTIONID'); + $item->setAmazonId('AMAZON-AUTH-2'); + $item->setCaptureNow(true); + $item->setRequestMode(AmazonReferenceId::REQUEST_MODE_SYNCHRONOUS); + $expected[] = $item; + + $source[] = array( + 'id' => '3', + 'shop_order_id' => 'ORDERID', + 'amazon_order_reference_id' => 'AMAZON-ORDER-REF', + 'local_id' => 'CAPTURE-1', + 'amazon_id' => 'AMAZON-CAPTURE-1', + 'value' => 80, + 'type' => '2', + 'request_mode' => '', + 'capture_now' => '0', + 'pkg_shop_payment_transaction_id' => '', + ); + $item = new AmazonReferenceId(AmazonReferenceId::TYPE_CAPTURE, 'CAPTURE-1', 80, null); + $item->setAmazonId('AMAZON-CAPTURE-1'); + $item->setCaptureNow(false); + $item->setRequestMode(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); + $expected[] = $item; + + $source[] = array( + 'id' => '4', + 'shop_order_id' => 'ORDERID', + 'amazon_order_reference_id' => 'AMAZON-ORDER-REF', + 'local_id' => 'AUTH-2', + 'amazon_id' => 'AMAZON-CAPTURE-2', + 'value' => 50, + 'type' => '2', + 'request_mode' => '', + 'capture_now' => '0', + 'pkg_shop_payment_transaction_id' => 'TRANSACTIONID', + ); + $item = new AmazonReferenceId(AmazonReferenceId::TYPE_CAPTURE, 'AUTH-2', 50, 'TRANSACTIONID'); + $item->setAmazonId('AMAZON-CAPTURE-2'); + $item->setCaptureNow(false); + $item->setRequestMode(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); + $expected[] = $item; + + $source[] = array( + 'id' => '5', + 'shop_order_id' => 'ORDERID', + 'amazon_order_reference_id' => 'AMAZON-ORDER-REF', + 'local_id' => 'REFUND-1', + 'amazon_id' => 'AMAZON-REFUND-1', + 'value' => 10, + 'type' => '3', + 'request_mode' => '', + 'capture_now' => '0', + 'pkg_shop_payment_transaction_id' => '', + ); + $item = new AmazonReferenceId(AmazonReferenceId::TYPE_REFUND, 'REFUND-1', 10, null); + $item->setAmazonId('AMAZON-REFUND-1'); + $item->setCaptureNow(false); + $item->setRequestMode(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); + $expected[] = $item; + + $source[] = array( + 'id' => '6', + 'shop_order_id' => 'ORDERID', + 'amazon_order_reference_id' => 'AMAZON-ORDER-REF', + 'local_id' => 'REFOUND-2', + 'amazon_id' => 'AMAZON-REFOUND-2', + 'value' => 20, + 'type' => '3', + 'request_mode' => '', + 'capture_now' => '0', + 'pkg_shop_payment_transaction_id' => '', + ); + $item = new AmazonReferenceId(AmazonReferenceId::TYPE_REFUND, 'REFOUND-2', 20, null); + $item->setAmazonId('AMAZON-REFOUND-2'); + $item->setCaptureNow(false); + $item->setRequestMode(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); + $expected[] = $item; + + $manager = AmazonReferenceIdManager::createFromRecordList($source); + + /** @var $item AmazonReferenceId */ + foreach ($expected as $item) { + $find = $manager->findFromLocalReferenceId($item->getLocalId(), $item->getType()); + $this->assertEquals($item, $find, 'expected '.print_r($item, true).""\nbut got\n"".print_r($find, true));",- +AmazonReferenceIdManagerPersistenceTest,test_load_from_shop_order_id,@var $manager AmazonReferenceIdManager,"$dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); + + /** @var $manager AmazonReferenceIdManager */ + $manager = AmazonReferenceIdManager::createFromShopOrderId($dbal, $this->orderId); + + // expecting 2 entries + + $expectedA = new AmazonReferenceId(IAmazonReferenceId::TYPE_AUTHORIZE, '1234', 400, 'fdgksfkhjsfhjfgh'); + $expectedA->setAmazonId('57675465465'); + $expectedA->setCaptureNow(false); + $expectedA->setRequestMode(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); + + $expectedB = new AmazonReferenceId(IAmazonReferenceId::TYPE_CAPTURE, '2234', 300, 'fdgksfkhjsxxx'); + $expectedB->setAmazonId('545665465465'); + $expectedB->setCaptureNow(false); + $expectedB->setRequestMode(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); + + $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); + + $foundA = $manager->findFromLocalReferenceId('1234', IAmazonReferenceId::TYPE_AUTHORIZE); + $this->assertEquals($expectedA, $foundA); + + $foundB = $manager->findFromLocalReferenceId('2234', IAmazonReferenceId::TYPE_CAPTURE); + $this->assertEquals($expectedB, $foundB);",- +AmazonReferenceIdManagerPersistenceTest,test_load_from_shop_order_id_not_found,* @expectedException \InvalidArgumentException,"$dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); + + /** @var $manager AmazonReferenceIdManager */ + $manager = AmazonReferenceIdManager::createFromShopOrderId($dbal, 'NOTFOUND');",- +AmazonReferenceIdManagerPersistenceTest,test_load_from_order_reference_id,@var $manager AmazonReferenceIdManager,"$dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); + + /** @var $manager AmazonReferenceIdManager */ + $manager = AmazonReferenceIdManager::createFromOrderReferenceId($dbal, 'S02-1974231-0772375'); + + // expecting 2 entries + + $expectedA = new AmazonReferenceId(IAmazonReferenceId::TYPE_AUTHORIZE, '1234', 400, 'fdgksfkhjsfhjfgh'); + $expectedA->setAmazonId('57675465465'); + + $expectedB = new AmazonReferenceId(IAmazonReferenceId::TYPE_CAPTURE, '2234', 300, 'fdgksfkhjsxxx'); + $expectedB->setAmazonId('545665465465'); + + $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); + + $foundA = $manager->findFromLocalReferenceId('1234', IAmazonReferenceId::TYPE_AUTHORIZE); + $this->assertEquals($expectedA, $foundA); + + $foundB = $manager->findFromLocalReferenceId('2234', IAmazonReferenceId::TYPE_CAPTURE); + $this->assertEquals($expectedB, $foundB);",- +AmazonReferenceIdManagerPersistenceTest,test_load_from_order_reference_id_not_found,@var $manager AmazonReferenceIdManager,"$dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); + + /** @var $manager AmazonReferenceIdManager */ + $manager = AmazonReferenceIdManager::createFromOrderReferenceId($dbal, 'NOTFOUND');",- +AmazonReferenceIdManagerPersistenceTest,test_load_from_authorization_reference_id,* @expectedException \InvalidArgumentException,"$dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); + + /** @var $manager AmazonReferenceIdManager */ + $manager = AmazonReferenceIdManager::createFromLocalId($dbal, '2234'); + $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); + + $expected = $this->helperGetExpectedItemList(); + foreach ($expected as $expectedData) { + $found = $manager->findFromLocalReferenceId($expectedData['localid'], $expectedData['type']); + $this->assertEquals($expectedData['object'], $found);",- +AmazonReferenceIdManagerPersistenceTest,test_load_from_capture_now_authorization_reference_id,@var $manager AmazonReferenceIdManager,"$dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); + + /** @var $manager AmazonReferenceIdManager */ + $manager = AmazonReferenceIdManager::createFromLocalId($dbal, 'AUTH-WITH-CAPTURE-NOW'); + $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); + + $expected = $this->helperGetExpectedItemList(); + foreach ($expected as $expectedData) { + $found = $manager->findFromLocalReferenceId($expectedData['localid'], $expectedData['type']); + $this->assertEquals($expectedData['object'], $found);",- +AmazonReferenceIdManagerPersistenceTest,test_load_from_capture_reference_id,"* returns items in before.yml that match our sample order. + * + * @return array","$dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); + + /** @var $manager AmazonReferenceIdManager */ + $manager = AmazonReferenceIdManager::createFromLocalId($dbal, '2234'); + $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); + + $expected = $this->helperGetExpectedItemList(); + foreach ($expected as $expectedData) { + $found = $manager->findFromLocalReferenceId($expectedData['localid'], $expectedData['type']); + $this->assertEquals($expectedData['object'], $found);",- +AmazonReferenceIdManagerPersistenceTest,test_load_from_capture_now_capture_reference_id,@var $manager AmazonReferenceIdManager,"$dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); + + /** @var $manager AmazonReferenceIdManager */ + $manager = AmazonReferenceIdManager::createFromLocalId($dbal, 'AUTH-WITH-CAPTURE-NOW'); + $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); + + $expected = $this->helperGetExpectedItemList(); + foreach ($expected as $expectedData) { + $found = $manager->findFromLocalReferenceId($expectedData['localid'], $expectedData['type']); + $this->assertEquals($expectedData['object'], $found);",- +AmazonReferenceIdManagerPersistenceTest,test_load_from_refund_reference_id,@var $manager AmazonReferenceIdManager,"$dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); + + /** @var $manager AmazonReferenceIdManager */ + $manager = AmazonReferenceIdManager::createFromLocalId($dbal, 'REFUND-REF-ID'); + $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); + + $expected = $this->helperGetExpectedItemList(); + foreach ($expected as $expectedData) { + $found = $manager->findFromLocalReferenceId($expectedData['localid'], $expectedData['type']); + $this->assertEquals($expectedData['object'], $found);",- +AmazonReferenceIdManagerPersistenceTest,test_load_from_local_not_found,@var $manager AmazonReferenceIdManager,"$dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); + + /** @var $manager AmazonReferenceIdManager */ + $manager = AmazonReferenceIdManager::createFromLocalId($dbal, '223454545');",- +AmazonReferenceIdManagerPersistenceTest,getConnection,@var $manager AmazonReferenceIdManager,"if (null === $this->conn) { + $this->conn = $this->createDefaultDBConnection(self::$pdo, ':memory:');",- +AmazonReferenceIdManagerPersistenceTest,getDataSet,@var $manager AmazonReferenceIdManager,"return new \PHPUnit_Extensions_Database_DataSet_YamlDataSet( + dirname(__FILE__).'/../fixtures/ReferenceIdMapping/before.yml' + );",- +AmazonReferenceIdManagerTest,test_create_and_search_new_authorization_reference_id_in_sync_and_asyn_mode,@var IAmazonReferenceId $item,"$testRequestMode = array(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS, IAmazonReferenceId::REQUEST_MODE_SYNCHRONOUS); + foreach ($testRequestMode as $requestMode) { + $manager = new AmazonReferenceIdManager($this->amazonOrderReferenceId, $this->orderId); + $value = 10; + $transactionId = null; + /** @var IAmazonReferenceId $item */ + $item = $manager->createLocalAuthorizationReferenceId($requestMode, $value, $transactionId); + + $this->assertEquals($value, $item->getValue()); + $this->assertEquals($transactionId, $item->getTransactionId()); + $this->assertEquals($requestMode, $item->getRequestMode(), 'expecting request mode '.$requestMode); + $this->assertEquals(IAmazonReferenceId::TYPE_AUTHORIZE, $item->getType()); + $localId = $item->getLocalId(); + $this->assertFalse(empty($localId)); + + // make sure the item is really in the manager + + $itemInManager = $manager->findFromLocalReferenceId($localId, IAmazonReferenceId::TYPE_AUTHORIZE); + + $this->assertEquals($item, $itemInManager);",- +AmazonReferenceIdManagerTest,test_consecutive_find_from_local_reference_calls,@var IAmazonReferenceId $item,"$manager = $this->fixtureGetManagerWithData(); + + $localRefund = $manager->findFromLocalReferenceId('REFOUND-2', IAmazonReferenceId::TYPE_REFUND); + $localAuth = $manager->findFromLocalReferenceId('AUTH-1', IAmazonReferenceId::TYPE_AUTHORIZE); + + $localRefundAgain = $manager->findFromLocalReferenceId('REFOUND-2', IAmazonReferenceId::TYPE_REFUND); + + $this->assertEquals($localRefund, $localRefundAgain); + $this->assertEquals('REFOUND-2', $localRefund->getLocalId()); + $this->assertEquals('AUTH-1', $localAuth->getLocalId()); + $this->assertEquals('REFOUND-2', $localRefundAgain->getLocalId());",- +AmazonReferenceIdManagerTest,test_create_and_search_new_authorization_reference_id_with_capture_now_in_sync_and_asyn_mode,@var IAmazonReferenceId $item,"$testRequestMode = array(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS, IAmazonReferenceId::REQUEST_MODE_SYNCHRONOUS); + foreach ($testRequestMode as $requestMode) { + $manager = new AmazonReferenceIdManager($this->amazonOrderReferenceId, $this->orderId); + $value = 10; + $transactionId = null; + /** @var IAmazonReferenceId $item */ + $item = $manager->createLocalAuthorizationReferenceIdWithCaptureNow($requestMode, $value, $transactionId); + + $this->assertEquals($value, $item->getValue()); + $this->assertEquals($transactionId, $item->getTransactionId()); + $this->assertEquals($requestMode, $item->getRequestMode()); + $this->assertEquals(IAmazonReferenceId::TYPE_AUTHORIZE, $item->getType()); + $this->assertTrue($item->getCaptureNow()); + $localId = $item->getLocalId(); + $this->assertFalse(empty($localId)); + + // make sure the item is really in the manager + + $itemInManager = $manager->findFromLocalReferenceId($localId, IAmazonReferenceId::TYPE_AUTHORIZE); + + $this->assertEquals($item, $itemInManager); + + // there should also be a matching capture entry + + $matchingCapture = $manager->findFromLocalReferenceId($localId, IAmazonReferenceId::TYPE_CAPTURE); + + $this->assertEquals($value, $matchingCapture->getValue()); + $this->assertEquals($transactionId, $matchingCapture->getTransactionId()); + $this->assertEquals($requestMode, $matchingCapture->getRequestMode()); + $this->assertEquals(IAmazonReferenceId::TYPE_CAPTURE, $matchingCapture->getType()); + $this->assertTrue($matchingCapture->getCaptureNow()); + $this->assertEquals($localId, $matchingCapture->getLocalId());",- +AmazonReferenceIdManagerTest,test_create_and_search_new_capture_reference_id,@var IAmazonReferenceId $item,"$manager = new AmazonReferenceIdManager($this->amazonOrderReferenceId, $this->orderId); + $value = 10; + $transactionId = null; + /** @var IAmazonReferenceId $item */ + $item = $manager->createLocalCaptureReferenceId($value, $transactionId); + + $this->assertEquals($value, $item->getValue()); + $this->assertEquals($transactionId, $item->getTransactionId()); + $this->assertEquals(IAmazonReferenceId::TYPE_CAPTURE, $item->getType()); + $this->assertFalse($item->getCaptureNow()); + $localId = $item->getLocalId(); + $this->assertFalse(empty($localId)); + + // make sure the item is really in the manager + + $itemInManager = $manager->findFromLocalReferenceId($localId, IAmazonReferenceId::TYPE_CAPTURE); + + $this->assertEquals($item, $itemInManager);",- +MTPkgCmsSubNavigation_PkgShop,Accept,"* sub navi using category tree if on an active category. +/*","$oActiveRootCategory = TdbShop::GetActiveRootCategory(); + if (null === $oActiveRootCategory) { + parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); + + return;",- +MTPkgCmsSubNavigation_PkgShop,_AllowCache,"* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager + * + * @return",return true;,- +MTPkgCmsSubNavigation_PkgShop,_GetCacheParameters,* @return null|string,"$parameters = parent::_GetCacheParameters(); + + $parameters['activeRootCategoryId'] = $this->getActiveRootCategoryId(); + $parameters['activeCategoryId'] = $this->getActiveCategoryId(); + + return $parameters;",- +TPkgExtranetRegistrationGuestMapper_Form,GetRequirements,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the + * needed information and returning it. + * + * example: + * + * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); + * $oRequirements->NeedsSourceObject(""bar""); + * $oRequirements->NeedsMappedValue(""baz""); + * + * @param IMapperRequirementsRestricted $oRequirements","$oRequirements->NeedsSourceObject('oActiveUser', 'TdbDataExtranetUser', TdbDataExtranetUser::GetInstance()); + $oRequirements->NeedsSourceObject('oExtranetConfiguration', 'TdbDataExtranet', TdbDataExtranet::GetInstance()); + $oRequirements->NeedsSourceObject('oThankYouOrderStep', 'TdbShopOrderStep'); + $oRequirements->NeedsSourceObject('oTextBlock');",- +TPkgExtranetRegistrationGuestMapper_Form,Accept,"* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager + * + * @return","/** @var $oActiveUser TdbDataExtranetUser */ + $oActiveUser = $oVisitor->GetSourceObject('oActiveUser'); + /** @var $oActiveOrderStep TdbShopOrderStep */ + $oActiveOrderStep = $oVisitor->GetSourceObject('oThankYouOrderStep'); + $oLastBoughtUser = $oActiveOrderStep->GetLastUserBoughtFromSession(); + $bRegistrationGuestIsAllowed = false; + if ('thankyou' == $oActiveOrderStep->fieldSystemname && $oLastBoughtUser) { + if ($oActiveUser->RegistrationGuestIsAllowed($oLastBoughtUser)) { + /** @var $oTextBlock TdbPkgCmsTextBlock */ + $oTextBlock = $oVisitor->GetSourceObject('oTextBlock'); + if ($oTextBlock && $oTextBlock instanceof TdbPkgCmsTextBlock) { + $aTextBlock = array(); + $aTextBlock['sTitle'] = $oTextBlock->fieldName; + $aTextBlock['sText'] = $oTextBlock->GetTextField('content'); + $oVisitor->SetMappedValue('aTextData', $aTextBlock);",- +TPkgExtranetRegistrationGuest_TDataExtranetUser,RegistrationGuestIsAllowed,"* Checks if active user and given last bought user. + * + * @param TdbDataExtranetUser $oLastBoughtUser + * + * @return bool","$bRegistrationGuestIsAllowed = false; + if (!is_null($oLastBoughtUser) && !$this->IsLoggedIn() && !$oLastBoughtUser->LoginExists()) { + $bRegistrationGuestIsAllowed = true;",- +TPkgExtranetRegistrationGuest_TDataExtranetUser,GetLinkForRegistrationGuest,"* Returns the link to registration guest page. + * + * @return string","$oURLData = TCMSSmartURLData::GetActive(); + $oShop = TdbShop::GetInstance($oURLData->iPortalId); + $sRegisterPath = $oShop->GetLinkToSystemPage(self::NAME_SYSTEM_PAGE); + + return $sRegisterPath;",- +MTExtranetRegistrationGuestCore,Init,"* Use this package module to register user after creating order with guest account. + * + * @psalm-suppress UndefinedInterfaceMethod + * @FIXME `HeaderURLRedirect` only exist on one implementation of `ChameleonControllerInterface`","parent::Init(); + $this->HandleRegisterAfterShopping();",- +TPkgImageHotspotMapper,GetRequirements,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the + * needed information and returning it. + * + * example: + * + * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); + * $oRequirements->NeedsSourceObject(""bar""); + * $oRequirements->NeedsMappedValue(""baz""); + * + * @param IMapperRequirementsRestricted $oRequirements","$oRequirements->NeedsSourceObject('oPkgImageHotspot', 'TdbPkgImageHotspot'); + $oRequirements->NeedsSourceObject('sActiveItemId', 'string'); + $oRequirements->NeedsSourceObject('sMapperConfig', 'string'); // the module view to use when rendering the content of the presenter + $oRequirements->NeedsSourceObject('aObjectRenderConfig', 'array'); // array of the form array('classname'=>array('mapper'=>('mapper1','mapper2'),'snippet'=>'view.html.twig'),...)",- +TPkgImageHotspotMapper,Accept,"* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager","/** @var $oPkgImageHotspot TdbPkgImageHotspot */ + $oPkgImageHotspot = $oVisitor->GetSourceObject('oPkgImageHotspot'); + if ($oPkgImageHotspot && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oPkgImageHotspot->table, $oPkgImageHotspot->id);",- +TPkgImageHotspot,GetFieldPkgImageHotspotItemList,* @return TdbPkgImageHotspotItemList,"$oList = TdbPkgImageHotspotItemList::GetListForPkgImageHotspotId($this->id, $this->iLanguageId); + $oList->ChangeOrderBy(array('position' => 'ASC')); + $oList->bAllowItemCache = true; + $i = 0; + $oList->GoToStart(); + while ($oItem = $oList->Next()) { + ++$i;",- +TPkgImageHotspotItem,Render,* the URL parameter to fetch an item.,"$oView = new TViewParser(); + + $oView->AddVar('oItem', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, TdbPkgImageHotspotItem::VIEW_PATH, $sViewType);",- +TPkgImageHotspotItem,GetNextItem,"* render the hotspot image. + * + * @param string $sViewName - name of the view + * @param string $sViewType - where to look for the view + * @param array $aCallTimeVars - optional parameters to pass to render method + * + * @return string","/** @var TdbPkgImageHotspotItem|null $oNextItem */ + $oNextItem = $this->GetFromInternalCache('oNextItem'); + if (is_null($oNextItem)) { + $oItemList = TdbPkgImageHotspotItemList::GetListForPkgImageHotspotId($this->fieldPkgImageHotspotId); + $oItemList->bAllowItemCache = true; + if ($oItemList->Length() > 1) { + $oNextItem = null; + + /** @var TdbPkgImageHotspotItem $oFirst */ + $oFirst = $oItemList->Current(); + while (is_null($oNextItem) && ($oTmpItem = $oItemList->Next())) { + if ($oTmpItem->IsSameAs($this)) { + $oNextItem = $oItemList->Next();",- +TPkgImageHotspotItem,GetPreviousItem,"* use this method to add any variables to the render method that you may + * require for some view. + * + * @param string $sViewName - the view being requested + * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) + * + * @return array","/** @var TdbPkgImageHotspotItem|null $oPreviousItem */ + $oPreviousItem = $this->GetFromInternalCache('oPreviousItem'); + if (is_null($oPreviousItem)) { + $oItemList = TdbPkgImageHotspotItemList::GetListForPkgImageHotspotId($this->fieldPkgImageHotspotId); + $oItemList->bAllowItemCache = true; + if ($oItemList->Length() > 1) { + $oPreviousItem = null; + $oItemList->GoToEnd(); + while (is_null($oPreviousItem) && ($oTmpItem = $oItemList->Previous())) { + if ($oTmpItem->IsSameAs($this)) { + $oPreviousItem = $oItemList->Previous();",- +TPkgImageHotspotItem,GetLink,"* returns the item next in line relative to this item + * if the current item is the last in line, the method will return the first item. returns false if + * no next item exists. + * + * @return TdbPkgImageHotspotItem|false|null","return $this->getActivePageService()->getLinkToActivePageRelative(array( + TdbPkgImageHotspotItem::GetURLParameterBaseForActiveSpot() => array('id' => $this->id), + ));",- +TPkgImageHotspotItem,GetAjaxLink,@var TdbPkgImageHotspotItem|null $oNextItem,"$oGlobal = TGlobal::instance(); + $oRunningModule = $oGlobal->GetExecutingModulePointer(); + $aParameter['id'] = $this->id; + $aParameter['sViewName'] = $sViewName; + $aParameter['sType'] = $sType; + $aData = array( + TdbPkgImageHotspotItem::GetURLParameterBaseForActiveSpot() => $aParameter, + 'module_fnc' => array($oRunningModule->sModuleSpotName => 'ExecuteAjaxCall'), + '_fnc' => 'AjaxRenderHotspotImage', + ); + + return $this->getActivePageService()->getLinkToActivePageRelative($aData);",- +TPkgImageHotspotItemMarker,Render,"* render the hotspot image. + * + * @param string $sViewName - name of the view + * @param string $sViewType - where to look for the view + * @param array $aCallTimeVars - optional parameters to pass to render method + * + * @return string","$oView = new TViewParser(); + $oView->AddVar('oMarker', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, TdbPkgImageHotspotItemMarker::VIEW_PATH, $sViewType);",- +TPkgImageHotspotItemMarker,GetURLForConnectedRecord,"* use this method to add any variables to the render method that you may + * require for some view. + * + * @param string $sViewName - the view being requested + * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) + * + * @return array","$oSpotObject = $this->GetFieldLinkedRecord(); + $oCmsConfig = TdbCmsConfig::GetInstance(); + $sLink = $this->fieldUrl; + if (is_object($oSpotObject)) { + if ($oSpotObject instanceof TdbCmsTplPage) { + $sLink = $this->getPageService()->getLinkToPageObjectRelative($oSpotObject);",- +TPkgImageHotspotItemSpot,GetSpotObject,"* return a pointer to the object assigned to the spot. + * + * @return TCMSRecord|null","$oObject = $this->GetFromInternalCache('oObjectAssignedToSpot'); + if (is_null($oObject)) { + $oObject = $this->GetFieldLinkedRecord(); + $this->SetInternalCache('oObjectAssignedToSpot', $oObject);",- +TPkgImageHotspotItemSpot,GetURLForConnectedRecord,"* fetches the connected record and tries to get a url from that. + * + * @return string","$oSpotObject = $this->GetSpotObject(); + if (null === $oSpotObject) { + return '';",- +TPkgImageHotspotItemSpot,Render,@psalm-suppress UndefinedMethod,"$oView = new TViewParser(); + $oView->AddVar('oSpot', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, TdbPkgImageHotspotItemSpot::VIEW_PATH, $sViewType);",- +MTPkgImageHotspotCore,Init,"* Es wird ein Modul geschaffen, bei dem eine beliebige Anzahl Bilder definiert werden kann. + * Bei jedem Bild können Hotspots im Bild positioniert und mit einem Artikel verknüpft werden. + * Auf der Webseite wird das erste Bild angezeigt, jeweils mit einem Link zu den anderen Bildern + * (eine Art Blätterfunktion). Die Hotspots sind mit kleinen Kreuzen auf dem Bild markiert. Fährt + * ein Kunde mit der Maus über einen Hotspot, erscheinen der Artikelname und der Preis. Klickt der + * Kunde auf den Hotspot, dann gelangt er zur Detailseite des Artikels. +/*","parent::Init(); + if ($this->global->UserDataExists(TdbPkgImageHotspotItem::GetURLParameterBaseForActiveSpot())) { + $this->aUserRequestData = $this->global->GetUserData(TdbPkgImageHotspotItem::GetURLParameterBaseForActiveSpot()); + if (!is_array($this->aUserRequestData)) { + $this->aUserRequestData = array();",- +MTPkgImageHotspotCore,Execute,* @var string|null,"parent::Execute(); + $this->data['oHotspotConfig'] = $this->GetHotspotConfig(); + $this->data['oActiveItem'] = $this->GetActiveItem(); + $this->data['oNextItem'] = $this->GetNextItem(); + $this->data['sLinkNextItem'] = ''; + $this->data['oAllItems'] = $this->GetHotspotConfig()->GetFieldPkgImageHotspotItemList(); + + return $this->data;",- +MTPkgImageHotspotCore,_AllowCache,* @var TdbPkgImageHotspotItem|null,return true;,- +MTPkgImageHotspotCore,_GetCacheParameters,* @var TdbPkgImageHotspotItem|null,"$parameters = parent::_GetCacheParameters(); + $parameters['sActiveItemId'] = $this->sActiveItemId; + + return $parameters;",- +MTPkgImageHotspotCore,_GetCacheTableInfos,* @var TdbPkgImageHotspot|null,"$aTriggers = parent::_GetCacheTableInfos(); + if (!is_array($aTriggers)) { + $aTriggers = array();",- +MTPkgImageHotspotCore,GetHtmlHeadIncludes,"* any request data send to the module. + * + * @var array","$aIncludes = parent::GetHtmlHeadIncludes(); + if (!is_array($aIncludes)) { + $aIncludes = array();",- +SearchRequestMapper,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('shop', 'TdbShop'); + $oRequirements->NeedsSourceObject('stateObject', '\ChameleonSystem\ShopBundle\objects\ArticleList\Interfaces\StateInterface');",- +SearchRequestMapper,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",* {@inheritdoc},"/** @var $shop \TdbShop */ + $shop = $oVisitor->GetSourceObject('shop'); + /** @var $state StateInterface */ + $state = $oVisitor->GetSourceObject('stateObject'); + + $queryParam = $state->getQueryParameter(); + $query = (isset($queryParam['q'])) ? $queryParam['q'] : ''; + $oSearchCache = $shop->GetActiveSearchObject(); + + $searchWasAltered = ($query !== $oSearchCache->sSearchTerm); + + $aData = array( + 'searchWasAltered' => $searchWasAltered, + 'searchQueryOriginal' => $query, + 'searchQuery' => $oSearchCache->sSearchTerm, + 'spellCheckLink' => false, + 'spellCheckSuggestion' => false, + ); + if (null !== $oSearchCache->sSearchTermSpellChecked) { + $aData['spellCheckLink'] = $oSearchCache->GetSearchLinkForTerm($oSearchCache->sSearchTermSpellChecked); + $aData['spellCheckSuggestion'] = $oSearchCache->sSearchTermSpellCheckedFormated;",- +StateRequestExtractor,extract,"* @param array $configuration + * @param array $requestData + * @param string $listSpotName + * + * @return array","$searchQuery = $this->getSearchQuery($requestData); + $searchFilter = $this->getSearchFilter($requestData); + if (null === $searchQuery && null === $searchFilter) { + return array();",- +ShopSearchLoggerBridge,"__construct( + ShopServiceInterface $shop, + LanguageServiceInterface $languageService + )",* @var \ChameleonSystem\ShopBundle\Interfaces\ShopServiceInterface,"$this->shop = $shop; + $this->languageService = $languageService;",- +ShopSearchLoggerBridge,logSearch,* @var \ChameleonSystem\CoreBundle\Service\LanguageServiceInterface,"$searchString = $this->convertSearchToString($searchString, $searchFilter); + $oLog = \TdbShopSearchLog::GetNewInstance(); + /** @var $oLog \TdbShopSearchLog */ + $aData = array( + 'name' => $searchString, + 'shop_id' => $this->shop->getId(), + 'number_of_results' => $numberOfMatches, + 'search_date' => date('Y-m-d H:i:s'), + 'cms_language_id' => $this->languageService->getActiveLanguageId(), + ); + $oUser = $this->getExtranetUserProvider()->getActiveUser(); + if (null !== $oUser && null !== $oUser->id) { + $aData['data_extranet_user_id'] = $oUser->id;",- +ShopSearchSessionChameleonBridge,__construct,* @var \Symfony\Component\HttpFoundation\Session\SessionInterface,$this->session = $session;,- +ShopSearchSessionChameleonBridge,addSearch,"* @param array $searchRequest + * @return void","$searchKey = md5($this->getArrayAsString($searchRequest)); + $searches = $this->session->get(ShopSearchSessionInterface::SESSION_KEY, array()); + $searches[] = $searchKey; + $this->session->set(ShopSearchSessionInterface::SESSION_KEY, $searches);",- +ShopSearchSessionChameleonBridge,hasSearchedFor,"* @param array $searchRequest + * @return bool","$searchKey = md5($this->getArrayAsString($searchRequest)); + + $searches = $this->session->get(ShopSearchSessionInterface::SESSION_KEY, array()); + + return in_array($searchKey, $searches);",- +ChameleonSystemSearchExtension,load,* @return void,"$loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); + $loader->load('services.xml');",- +ChameleonSystemSearchExtension,prepend,"* {@inheritdoc} + * + * @return void","$container->prependExtensionConfig('monolog', ['channels' => ['search_indexer']]);",- +SearchResultLoggerListener,__construct,* @var ShopSearchSessionInterface,"$this->session = $session; + $this->searchLogger = $searchLogger; + $this->shopService = $shopService;",- +SearchResultLoggerListener,onArticleListResultGenerated,* @var ShopSearchLoggerInterface,"if (false === $this->isSearchEvent($event)) { + return;",- +SearchResultTriggerCmsObserverListener,onArticleListResultGenerated,* @return void,"if (false === $this->isSearchEvent($event)) { + return;",- +TPkgSearchObserver,GetSearch,"* search stats. + * + * @var array","if (isset($this->aSearches[$sSearchTypeIdentifier])) { + return $this->aSearches[$sSearchTypeIdentifier];",- +TPkgSearchObserver,AddSearch,"* @static + * + * @return TPkgSearchObserver","$this->aSearches[$sSearchTypeIdentifier] = new stdClass(); + $this->aSearches[$sSearchTypeIdentifier]->iNumberOfResults = $iNumberOfResults;",- +TPkgSearchObserver,PkgCmsEventNotify,"* @param string $sSearchTypeIdentifier + * @return mixed|null","if (TPkgCmsEvent::CONTEXT_CORE === $oEvent->GetContext() && TPkgCmsEvent::NAME_PRE_OUTPUT_CALLBACK_FUNCTION === $oEvent->GetName()) { + $oShop = $this->getShopService()->getActiveShop(); + if ($oShop->fieldRedirectToNotFoundPageProductSearchOnNoResults) { + $iTotalResults = 0; + foreach ($this->aSearches as $sSearchIdentifier => $oSearchData) { + $iTotalResults = $iTotalResults + $oSearchData->iNumberOfResults;",- +TShopSearchCache,__construct,"* the search term. + * + * @var string","$this->SetChangeTriggerCacheChange(false); + parent::__construct($id, $sLanguageId);",- +TShopSearchCache,GetSearchLink,"* the search term spellchecked. + * + * @var string","$sLink = ''; + + $aParams = array(); + + if (is_array($this->aSearchTerms) && count($this->aSearchTerms) > 0) { + $aParams[TShopModuleArticlelistFilterSearch::PARAM_QUERY.'[0]'] = $this->sSearchTerm; + reset($this->aSearchTerms); + foreach ($this->aSearchTerms as $fieldId => $sVal) { + $aParams[TShopModuleArticlelistFilterSearch::PARAM_QUERY.""[{$fieldId",- +TShopSearchCache,GetSearchLinkForTerm,"* the search term spellchecked. + * + * @var string","$aParams = array(TShopModuleArticlelistFilterSearch::PARAM_QUERY => $sTerm); + $oShop = TdbShop::GetInstance(); + $sLink = $oShop->GetLinkToSystemPage('search', $aParams); + + return $sLink;",- +TShopSearchCache,ProcessSearchQueryBeforeInsert,"* a list of field specific search terms. + * + * @var array",return $sQuery;,- +TShopSearchCache,GetBestSuggestion,"* any filter applied to the search. + * + * @var array","$sBestWord = ''; + reset($aWords); + + while (empty($sBestWord) && ($sWord = current($aWords))) { + $sEscapedWord = TShopSearchIndexer::PrepareSearchWord($sWord); + if (!empty($sEscapedWord)) { + $sIndexTable = TShopSearchIndexer::GetIndexTableNameForIndexLength(mb_strlen($sEscapedWord)); + $query = 'SELECT * FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($sIndexTable).""` WHERE `substring` = '"".MySqlLegacySupport::getInstance()->real_escape_string($sEscapedWord).""'""; + $tRes = MySqlLegacySupport::getInstance()->query($query); + if (MySqlLegacySupport::getInstance()->num_rows($tRes) > 0) { + $sBestWord = $sWord;",- +TShopSearchCache,GetSearchResultCategoryHits,"* @param string|null $id + * @param string|null $sLanguageId","$aHits = array(); + if (!empty($this->fieldCategoryHits) && empty($sFilters)) { + $aHits = unserialize($this->fieldCategoryHits);",- +TShopSearchCache,GetNumberOfHits,"* return current filter. + * + * @return array","if ($this->fieldNumberOfRecordsFound < 0) { + $query = ""SELECT COUNT(*) AS recs FROM `shop_search_cache_item` WHERE `shop_search_cache_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""'""; + if ($row = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { + $this->fieldNumberOfRecordsFound = $row['recs']; + $this->sqlData['number_of_records_found'] = $this->fieldNumberOfRecordsFound; + $this->AllowEditByAll(true); + $this->Save();",- +TShopSearchCache,CacheIsStale,"* return a search query based on the current filter. + * + * @param array $aExcludeFilterKeys - any filter keys (same as in $this->aFilter) you place in here + * will be excluded from the link + * @param array $aFilterAddition + * + * @return string","$cachAge = strtotime($this->fieldLastUsedDate); + $bIsStale = ((time() - $cachAge) > TdbShopSearchCache::MAX_CACHE_AGE_IN_SECONDS); + + return $bIsStale;",- +TShopSearchCache,ClearCache,"* @param string $sTerm + * @return string","$query = ""DELETE FROM `shop_search_cache_item` WHERE `shop_search_cache_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' ""; + MySqlLegacySupport::getInstance()->query($query); + $query = ""DELETE FROM `shop_search_cache` WHERE `id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""'""; + MySqlLegacySupport::getInstance()->query($query); + $this->id = null; + $this->sqlData['id'] = null;",- +TShopSearchFieldWeight,CreateIndexTick,"* create field index for the row. Note: we assume the index tables exists. + * + * @param array $aRowData + * + * @return void","// make sure the index table exists... if it does not, create it + if (array_key_exists($this->fieldFieldNameInQuery, $aRowData) && array_key_exists('xxx_shop_article_id', $aRowData)) { + $sFieldValue = $aRowData[$this->fieldFieldNameInQuery]; + $iArticleId = $aRowData['xxx_shop_article_id']; + + $aIndexTableNames = TdbShopSearchIndexer::GetAllIndexTableNames(); + foreach ($aIndexTableNames as $sTableName => $iSubstringLength) { + $this->ProcessIndex($sFieldValue, $iArticleId, $sTableName, $iSubstringLength);",- +TShopSearchIndexer,SetRegenerateCompleteIndex,@var string[],"$this->bRegenerateCompleteIndex = $bRegenerateCompleteIndex; + if (!$this->bRegenerateCompleteIndex) { + if (false == TGlobal::TableExists('shop_search_reindex_queue') || PKG_SEARCH_USE_SEARCH_QUEUE == false) { + $this->bRegenerateCompleteIndex = true;",- +TShopSearchIndexer,GetIndexStatus,"* set to false, if you want to update the index only for those objects that changed. + * + * @var bool","$dStatus = false; + + if ($this->IsRunning()) { + $iRemainingRows = $this->GetRemainingRowCount(); + if (0 == $iRemainingRows) { + $dStatus = false; + $this->IndexCompletedHook();",- +TShopSearchIndexer,IsRunning,"* set index mode (full or partial). + * + * @param bool $bRegenerateCompleteIndex - set to true if you want a full reindexing or false if you do not + * + * @return void",return '0000-00-00 00:00:00' == $this->fieldCompleted;,- +TShopSearchIndexer,IndexerHasFinished,* @return void,"$bIsDone = (!is_array($this->aTablesToProcess) || count($this->aTablesToProcess) < 1); + if ($bIsDone) { + $this->IndexCompletedHook();",- +TShopSearchIndexer,ProcessNextIndexStep,"* commit processing data to database. + * + * @return void","$this->getCache()->disable(); + // if no index is running, prepare the indexer + $iTickerSize = self::INDEX_SET_SIZE; + if (!$bIndexUsingTicker) { + $iTickerSize = -1;",- +TShopSearchIndexer,InitializeIndexer,"* returns the index status (false=not running, number = percent done). + * + * @return float|false","$bWorkToDo = true; + if (!$this->bRegenerateCompleteIndex) { + // drop index + $query = ""UPDATE shop_search_reindex_queue SET `processing` = '1'""; + MySqlLegacySupport::getInstance()->query($query); + $query = ""SELECT COUNT(*) AS reccount FROM shop_search_reindex_queue WHERE `processing` = '1'""; + $aCount = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query)); + if ($aCount['reccount'] > 0) { + $query = ""SHOW TABLES LIKE '_index_%'""; + $tRes = MySqlLegacySupport::getInstance()->query($query); + while ($aIndexTable = MySqlLegacySupport::getInstance()->fetch_row($tRes)) { + $query = ""DELETE FROM {$aIndexTable[0]",- +TShopSearchIndexer,IndexHasContent,@var float $dStatus,"$bHasContent = true; + $aTables = static::GetAllIndexTableNames(); + foreach ($aTables as $sTableName => $iLength) { + $bHasContent = ($bHasContent && TGlobal::TableExists($sTableName));",- +TShopSearchIndexer,CreateIndexTables,"* return the number of rows still to process. + * + * @return int","$aIndexTableNames = TdbShopSearchIndexer::GetAllIndexTableNames(); + $aTmpIndex = array(); + foreach ($aIndexTableNames as $sTableName => $length) { + $aTmpIndex['_tmp'.$sTableName] = $length;",- +TShopSearchLog,__construct,"* @param string|null $id + * @param string|null $sLanguageId","$this->SetChangeTriggerCacheChangeOnParentTable(false); + parent::__construct($id, $sLanguageId);",- +TShopSearchQuery,IndexIsRunning,"* returns true if the index is still running. + * will stop the index if no entries are left to index. + * + * @return bool","$bIsRunning = false; + if ($this->fieldIndexRunning) { + $bIsRunning = ($this->NumberOfRecordsLeftToIndex() > 0);",- +TShopSearchQuery,StartIndex,"* prepare the index table. + * + * @param bool $bRegenerateCompleteIndex + * + * @return void","if (!$this->IndexIsRunning()) { + $res = MySqlLegacySupport::getInstance()->query($this->fieldQuery.' LIMIT 0,1'); + // we do not care about the type contents of the fields... just how many there are + if ($tmp = MySqlLegacySupport::getInstance()->fetch_assoc($res)) { + // got something.... so start indexeer + $aData = $this->sqlData; + $aData['index_running'] = '1'; + $aData['index_started'] = date('Y-m-d H:i:s'); + $this->LoadFromRow($aData); + $this->AllowEditByAll(true); + $this->Save(); + + $sFields = ''; + $aFields = array_keys($tmp); + // the last entry in the list will be renamed to shop_article_id + $aFields[count($aFields) - 1] = 'xxx_shop_article_id'; + foreach ($aFields as $iFieldIndex => $sFieldName) { + $aFields[$iFieldIndex] = '`'.MySqlLegacySupport::getInstance()->real_escape_string($sFieldName).'`'; + if ('id' == $sFieldName || '_id' == substr($sFieldName, -3)) { + $sFields .= ""{$aFields[$iFieldIndex]",- +TShopSearchQuery,CreateIndexTick,"* creates index for the number of rows requested. returns the real number of rows processed. + * + * @param int $iNumberOfRowsToProcess - if set to -1 we will process all rows + * + * @return int","$iRealNumberProcessed = 0; + $oFields = TdbShopSearchFieldWeightList::GetListForShopSearchQueryId($this->id); + if (CMS_SHOP_INDEX_LOAD_DELAY_MILLISECONDS > 0) { + usleep(CMS_SHOP_INDEX_LOAD_DELAY_MILLISECONDS * 1000);",- +TShopSearchQuery,NumberOfRecordsLeftToIndex,"* returns the number of records that still need to be indext for the query + * will stop the index if no entries are left to index. + * + * @return int","$iCount = 0; + if ($this->fieldIndexRunning) { + $sIndexTableName = $this->GetIndexRawTableName(); + $query = ""SHOW TABLES LIKE '"".MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName).""'""; + $tRes = MySqlLegacySupport::getInstance()->query($query); + $bTableExists = (MySqlLegacySupport::getInstance()->num_rows($tRes) >= 1); + if ($bTableExists) { + $query = 'SELECT COUNT(sysid) AS reccount FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName).'`'; + if ($trow = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { + $iCount = $trow['reccount'];",- +TShopSearchQuery,StopIndex,"* stop the current index operation. + * + * @return void","$sIndexTableName = $this->GetIndexRawTableName(); + if (TCMSRecord::TableExists($sIndexTableName)) { + $query = 'DROP TABLE `'.MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName).'`'; + MySqlLegacySupport::getInstance()->query($query);",- +StateRequestExtractorTest,it_should_extract_the_active_search_query,* @var StateRequestExtractor,"$this->given_a_state_request_extractor(); + $this->given_request_data($requestData); + $this->when_we_call_extract(); + $this->then_we_expect_return_data_matching($expectedReturnData);",- +StateRequestExtractorTest,dataProviderRequestData,"* @test + * @dataProvider dataProviderRequestData + * + * @param $requestData + * @param $expectedReturnData","return array( + array( + array('foo' => 'bar'), + array(), + ), + array( + array(\TShopModuleArticlelistFilterSearch::PARAM_QUERY => 'somequery'), + array(StateInterface::QUERY => array(\TShopModuleArticlelistFilterSearch::PARAM_QUERY => 'somequery')), + ), + array( + array(\TShopModuleArticlelistFilterSearch::URL_FILTER => array('some' => 'filter')), + array(StateInterface::QUERY => array(\TShopModuleArticlelistFilterSearch::URL_FILTER => array('some' => 'filter'))), + ), + array( + array(\TShopModuleArticlelistFilterSearch::PARAM_QUERY => 'somequery', \TShopModuleArticlelistFilterSearch::URL_FILTER => array('some' => 'filter')), + array(StateInterface::QUERY => array(\TShopModuleArticlelistFilterSearch::PARAM_QUERY => 'somequery', \TShopModuleArticlelistFilterSearch::URL_FILTER => array('some' => 'filter'))), + ), + );",- +SearchResultLoggerListenerTest,it_should_log_a_search,* @var SearchResultLoggerListener,"$this->given_a_filter_type($filterType); + $this->given_a_search_for($searchParameter); + $this->given_search_found($numberOfResults); + $this->given_the_user_ran_search_before($userHasSearchedBefore); + $this->given_an_instance_of_the_listener(); + $this->when_we_call_onArticleListResultGenerated();",- +SearchResultLoggerListenerTest,dataProviderLogSearch,"* @test + * @dataProvider dataProviderLogSearch + * + * @param $searchParameter + * @param $numberOfResults + * @param $userHasSearchedBefore","return array( + array( + '\TShopModuleArticlelistFilterSearch', // is search filter + array('q' => 'something', 'lf' => array()), // $searchParameter + 10, // $numberOfResults + false, // $userHasSearchedBefore + ), + array( + '\TShopModuleArticlelistFilterSearch', // is search filter + array('q' => 'something', 'lf' => array()), // $searchParameter + 10, // $numberOfResults + true, // $userHasSearchedBefore + ), + array( + '\TShopModuleArticleListFilter', // is search filter + array('q' => 'something', 'lf' => array()), // $searchParameter + 10, // $numberOfResults + false, // $userHasSearchedBefore + ), + );",- +TPkgShopAffiliate,FoundCodeHook,@var string|null,,- +TPkgShopAffiliate,RenderHTMLCode,"* return instance of class (casted as correct type. + * + * @param string $sId + * + * @return TdbPkgShopAffiliate","$aParameter = $oOrder->GetSQLWithTablePrefix($oOrder->table); + + $aParameter['dNetProductValue'] = $oOrder->GetNetProductValue(); + $aParameter['dNetProductAfterDiscountsAndVouchersValue'] = $aParameter['dNetProductValue']; + + $aParameter['sAffiliateCode'] = $this->sCode; + $oParamList = $this->GetFieldPkgShopAffiliateParameterList(); + while ($oParam = $oParamList->Next()) { + $aParameter[$oParam->fieldName] = $oParam->fieldValue;",- +TPkgShopAffiliateList,__construct,"* factory returning an element for the list. + * + * @param array $aData + * + * @return TdbPkgShopAffiliate","parent::__construct($sQuery, $sLanguageId); + $this->bAllowItemCache = true;",- +ChameleonSystemShopArticleDetailPagingBundle,build,* @return void,$container->addCompilerPass(new ArticleListPass());,- +AddSpotToItemLinkMapper,GetRequirements,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the + * needed information and returning it. + * + * example: + * + * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); + * $oRequirements->NeedsSourceObject(""bar""); + * $oRequirements->NeedsMappedValue(""baz""); + * + * @param IMapperRequirementsRestricted $oRequirements","$oRequirements->NeedsSourceObject('sLink', 'string'); + $oRequirements->NeedsSourceObject('pagerLinkDetails', 'string');",- +AddSpotToItemLinkMapper,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )","* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapperVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager","$link = $oVisitor->GetSourceObject('sLink'); + $pagerLinkDetails = $oVisitor->GetSourceObject('pagerLinkDetails'); + + $sep = '?'; + if (stripos($link, '?')) { + $sep = '&';",- +ArticleListApi,__construct,* @var \ChameleonSystem\ShopArticleDetailPagingBundle\Service\AddParametersToUrlService,"$this->contentLoader = $contentLoader; + $this->addParametersToUrlService = $addParametersToUrlService;",- +ArticleListApi,get,* @var \ChameleonSystem\ShopArticleDetailPagingBundle\Interfaces\ContentFromUrlLoaderServiceInterface,"$listRequestURL = $this->getFullURL($listUrl, $spot); + + return $this->getListResponse($listRequestURL);",- +ListItem,setId,@var string|null,$this->id = $id;,- +ListItem,getId,@var string|null,return $this->id;,- +ListItem,setName,@var string|null,$this->name = $name;,- +ListItem,getName,"* @param string $id + * + * @return void",return $this->name;,- +ListItem,setUrl,* @return string|null,$this->url = $url;,- +ListItem,getUrl,"* @param null $name + * + * @return void",return $this->url;,- +ListResult,setItemList,* @var string,$this->itemList = $itemList;,- +ListResult,getItemList,* @var string,return $this->itemList;,- +ListResult,setNextPageUrl,"* @var array (key = id)",$this->nextPageUrl = $nextPageUrl;,- +ListResult,getNextPageUrl,"* @param array $itemList + * + * @return void",return $this->nextPageUrl;,- +ListResult,setPreviousPageUrl,"* @return array",$this->previousPageUrl = $previousPageUrl;,- +ListResult,getPreviousPageUrl,"* @param string $nextPageUrl + * + * @return void",return $this->previousPageUrl;,- +DetailPagingModule,__construct,* @var \ChameleonSystem\ShopArticleDetailPagingBundle\Interfaces\DetailPagingServiceInterface,"$this->detailPagingService = $detailPagingService; + $activeProduct = $shop->getActiveProduct(); + if ($activeProduct) { + $this->activeProductId = $activeProduct->id;",- +DetailPagingModule,Init,@var string|null,parent::Init();,- +DetailPagingModule,_AllowCache,* {@inheritdoc},return false;,- +ShopArticleListDetailPagePagerExtensionModule,AllowAccessWithoutAuthenticityToken,* @var RequestToListUrlConverterInterface,"$allowAccess = parent::AllowAccessWithoutAuthenticityToken($sMethodName); + + return $allowAccess || 'getAsJson' === $sMethodName;",- +ShopArticleListDetailPagePagerExtensionModule,setRequestToListUrlConverter,* {@inheritdoc},$this->requestToListUrlConverter = $requestToListUrlConverter;,- +ContentFromUrlLoaderService,__construct,* @var \Symfony\Component\HttpKernel\HttpKernelInterface,"$this->kernel = $kernel; + $this->requestStack = $requestStack;",- +ContentFromUrlLoaderService,load,* @var \Symfony\Component\HttpFoundation\RequestStack,"$masterRequest = $this->requestStack->getMainRequest(); + $request = Request::create($url, 'GET', array(), $masterRequest->cookies->all(), array(), $masterRequest->server->all()); + if (true === $masterRequest->hasSession()) { + $request->setSession($masterRequest->getSession());",- +ContentFromUrlLoaderStandardService,__construct,* @var RequestStack,$this->requestStack = $requestStack;,- +ContentFromUrlLoaderStandardService,load,"* @param string $url + * + * @return string + * + * @throws ContentLoadingException","$request = $this->requestStack->getCurrentRequest(); + + if (null === $request) { + throw new ContentLoadingException('Content loader needs current request; none found.');",- +RequestToListUrlConverter,__construct,* @var InputFilterUtilInterface,$this->inputFilterUtil = $inputFilterUtil;,- +RequestToListUrlConverter,getListUrl,* @return null|string,return $this->getListUrlFromParameters();,- +RequestToListUrlConverter,getListSpotName,* @return null|string,"return $this->inputFilterUtil->getFilteredInput(self::URL_PARAMETER_SPOT_NAME, null);",- +RequestToListUrlConverter,getPagerParameter,* @return null|string,"return array( + RequestToListUrlConverterInterface::URL_PARAMETER_SPOT_NAME => $listSpotName, + RequestToListUrlConverterInterface::URL_PARAMETER_LIST_URL => $listPageUrl, + );",- +ChameleonSystemShopArticleDetailPagingExtension,load,* @return void,"$loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); + $loader->load('services.xml');",- +ArticleListPass,process,"* You can modify the container here before it is dumped to PHP code. + * + * @param ContainerBuilder $container + * + * @api + * + * @return void","$listModuleService = $container->getDefinition('chameleon_system_shop.module.article_list'); + $requestToListConverter = $container->getDefinition('chameleon_system_shop_article_detail_paging.request_to_list_url_converter'); + $listModuleService->addMethodCall('setRequestToListUrlConverter', array($requestToListConverter));",- +AddParametersToUrlService,__construct,* @var \ChameleonSystem\CmsStringUtilitiesBundle\Interfaces\UrlUtilityServiceInterface,$this->urlUtility = $urlUtility;,- +AddParametersToUrlService,addParameterToUrl,"* @param string|null $url + * + * @return string","return $this->urlUtility->addParameterToUrl($url, $parameter);",- +DetailPagingService,"__construct( + ArticleListApiInterface $listApi, + RequestToListUrlConverterInterface $requestToListUrlConverter, + AddParametersToUrlService $addParametersToUrlService + )",* @var RequestToListUrlConverterInterface,"$this->requestToListUrlConverter = $requestToListUrlConverter; + $this->listApi = $listApi; + $this->addParametersToUrlService = $addParametersToUrlService;",- +DetailPagingService,getNextItem,* @var ArticleListApiInterface,"$result = $this->searchNext($currentArticleId, $this->requestToListUrlConverter->getListUrl()); + + if (null === $result) { + return null;",- +DetailPagingService,getPreviousItem,* @var AddParametersToUrlService,"$result = $this->searchPrevious($currentArticleId, $this->requestToListUrlConverter->getListUrl()); + if (null === $result) { + return null;",- +DetailPagingService,getBackToListUrl,"* @param string $currentArticleId + * @param string $pagerSpotName + * + * @return ListItemInterface|null + * + * @throws ArticleListException",return $this->requestToListUrlConverter->getListUrl();,- +ArticleListApiTest,it_fetches_a_response,* @var ArticleListApi,"$listSpotName = 'listSpotName'; + $listUrl = 'listUrl'; + + $this->given_that_the_list_is_in_spot($listSpotName); + $this->given_the_list_url_is($listUrl); + $this->given_that_the_list_response_payload_is($responsePayload); + $this->given_an_instance_of_the_api(); + $this->when_we_call_get(); + $this->we_expect_a_result_with($expectedNextPageUrl, $expectedPreviousPageUrl, $expectedItems);",- +ArticleListApiTest,dataProviderListResponse,* @var ListResultInterface,"return array( + array( + json_encode( + array( + 'previousPage' => 'previousPageUrl', + 'nextPage' => 'nextPageUrl', + 'items' => array( + 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), + 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), + 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), + ), + ) + ), //$responsePayload + 'previousPageUrl', //$expectedPreviousPageUrl + 'nextPageUrl', //$expectedNextPageUrl + array( + 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), + 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), + 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), + ), //$expectedItems + ), + + array( + json_encode( + array( + 'previousPage' => null, + 'nextPage' => 'nextPageUrl', + 'items' => array( + 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), + 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), + 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), + ), + ) + ), //$responsePayload + null, //$expectedPreviousPageUrl + 'nextPageUrl', //$expectedNextPageUrl + array( + 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), + 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), + 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), + ), //$expectedItems + ), + + array( + json_encode( + array( + 'previousPage' => 'previousPageUrl', + 'nextPage' => null, + 'items' => array( + 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), + 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), + 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), + ), + ) + ), //$responsePayload + 'previousPageUrl', //$expectedPreviousPageUrl + null, //$expectedNextPageUrl + array( + 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), + 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), + 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), + ), //$expectedItems + ), + + array( + json_encode( + array( + 'previousPage' => null, + 'nextPage' => null, + 'items' => array( + 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), + 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), + 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), + ), + ) + ), //$responsePayload + null, //$expectedPreviousPageUrl + null, //$expectedNextPageUrl + array( + 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), + 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), + 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), + ), //$expectedItems + ), + + array( + json_encode( + array( + 'previousPage' => null, + 'nextPage' => null, + 'items' => array(), + ) + ), //$responsePayload + null, //$expectedPreviousPageUrl + null, //$expectedNextPageUrl + array(), //$expectedItems + ), + );",- +DetailPagingServiceTest,it_should_return_the_next_item,* @var ArticleListApiInterface,"$this->given_that_the_pager_is_in_spot('pagerSpotName'); + $this->given_that_the_list_is_in_spot('spotname'); + $this->given_an_article_list_with($this->listResults); + $this->given_a_request_url_for_the_current_list_page($currentListPageURL); + $this->given_a_paging_service(); + $this->when_we_call_getNextItem_with($currentItemId); + $this->then_we_should_get_an_item_matching($expectedItemId); + if (null !== $expectedItemId) { + $this->the_returned_items_url_should_contain_the_paging_module_relevant_parameters($expectedListPageUrl);",- +DetailPagingServiceTest,it_should_return_the_previous_item,* @var DetailPagingService,"$this->given_that_the_pager_is_in_spot('pagerSpotName'); + $this->given_that_the_list_is_in_spot('spotname'); + $this->given_an_article_list_with($this->listResults); + $this->given_a_request_url_for_the_current_list_page($currentListPageURL); + $this->given_a_paging_service(); + $this->when_we_call_getPreviousItem_with($currentItemId); + $this->then_we_should_get_an_item_matching($expectedItemId); + if (null !== $expectedItemId) { + $this->the_returned_items_url_should_contain_the_paging_module_relevant_parameters($expectedListPageUrl);",- +DetailPagingServiceTest,it_should_return_the_back_to_list_link,* @var ListItemInterface,"$this->given_that_the_pager_is_in_spot('pagerSpotName'); + $this->given_that_the_list_is_in_spot('spotname'); + $this->given_an_article_list_with($this->listResults); + $this->given_a_request_url_for_the_current_list_page('current-list-request-url'); + $this->given_a_paging_service(); + $this->when_we_call_getBackToListUrl(); + $this->then_we_should_get_a_return_url_matching('current-list-request-url');",- +DetailPagingServiceTest,dataProviderListResultForNextItem,* @var ListResultInterface[],"return array( + array( + 'firstPageUrl', + 'page0-FIRST-ITEM', + 'firstPageUrl', + 'page0-SECOND-ITEM', + ), + array( + 'firstPageUrl', + 'page0-INNER-ITEM', + 'firstPageUrl', + 'page0-INNER-ITEM-RIGHT', + ), + array( + 'firstPageUrl', + 'page0-LAST-ITEM', + 'secondPageUrl', + 'page1-FIRST-ITEM', + ), + + array( + 'secondPageUrl', + 'page1-FIRST-ITEM', + 'secondPageUrl', + 'page1-SECOND-ITEM', + ), + array( + 'secondPageUrl', + 'page1-INNER-ITEM', + 'secondPageUrl', + 'page1-INNER-ITEM-RIGHT', + ), + array( + 'secondPageUrl', + 'page1-LAST-ITEM', + 'thirdPageUrl', + 'page2-FIRST-ITEM', + ), + + array( + 'thirdPageUrl', + 'page2-FIRST-ITEM', + 'thirdPageUrl', + 'page2-SECOND-ITEM', + ), + array( + 'thirdPageUrl', + 'page2-INNER-ITEM', + 'thirdPageUrl', + 'page2-INNER-ITEM-RIGHT', + ), + array( + 'thirdPageUrl', + 'page2-LAST-ITEM', + null, + null, + ), + );",- +DetailPagingServiceTest,dataProviderListResultForPreviousItem,"* @test + * @dataProvider dataProviderListResultForNextItem + * + * @param string $currentItemId + * @param ListItemInterface $expectedItem","return array( + array( + 'firstPageUrl', + 'page0-FIRST-ITEM', + null, + null, + ), + array( + 'firstPageUrl', + 'page0-INNER-ITEM', + 'firstPageUrl', + 'page0-INNER-ITEM-LEFT', + ), + array( + 'firstPageUrl', + 'page0-LAST-ITEM', + 'firstPageUrl', + 'page0-SECOND-LAST-ITEM', + ), + + array( + 'secondPageUrl', + 'page1-FIRST-ITEM', + 'firstPageUrl', + 'page0-LAST-ITEM', + ), + array( + 'secondPageUrl', + 'page1-INNER-ITEM', + 'secondPageUrl', + 'page1-INNER-ITEM-LEFT', + ), + array( + 'secondPageUrl', + 'page1-LAST-ITEM', + 'secondPageUrl', + 'page1-SECOND-LAST-ITEM', + ), + + array( + 'thirdPageUrl', + 'page2-FIRST-ITEM', + 'secondPageUrl', + 'page1-LAST-ITEM', + ), + array( + 'thirdPageUrl', + 'page2-INNER-ITEM', + 'thirdPageUrl', + 'page2-INNER-ITEM-LEFT', + ), + array( + 'thirdPageUrl', + 'page2-LAST-ITEM', + 'thirdPageUrl', + 'page2-SECOND-LAST-ITEM', + ), + );",- +RequestToListUrlConverterTest,it_should_return_the_list_url_from_parameter,* @var InputFilterUtilInterface,"$this->given_the_referrer('myreferer'); + $this->given_the_request_parameters(array('url' => 'listurl')); + $this->given_an_input_filter_util(); + $this->given_an_instance_of_the_converter_with_the_current_request_stack(); + $this->when_we_call_getListUrl(); + $this->then_we_should_get_the_list_url('listurl');",- +RequestToListUrlConverterTest,it_should_return_the_list_spot_name,* @var \ChameleonSystem\ShopArticleDetailPagingBundle\Bridge\Service\RequestToListUrlConverter,"$this->given_the_referrer('myreferer'); + $this->given_the_request_parameters(array('_ref' => 'myspotname')); + $this->given_an_input_filter_util(); + $this->given_an_instance_of_the_converter_with_the_current_request_stack(); + $this->when_we_call_getListSpotName(); + $this->then_we_should_get_the_spot_name('myspotname');",- +RequestToListUrlConverterTest,it_should_return_the_pager_relevant_query_parameter,* @var array,"$this->given_the_list_spot($listSpotName); + $this->given_the_request_parameters(array('_ref' => $listSpotName)); + $this->given_an_input_filter_util(); + $this->given_an_instance_of_the_converter_with_the_current_request_stack(); + $this->when_we_call_getPagerParameter_with($listPageUrl); + $this->then_we_expect_to_get_pager_parameter_matching($expectedPagerParameter);",- +RequestToListUrlConverterTest,dataProviderGetPagerQueryParameter,* @var array,"return array( + array( + 'listSpotName', + 'http://mydomain.tld/my/path?some=query#marker', //$listPageUrl + array( + RequestToListUrlConverterInterface::URL_PARAMETER_SPOT_NAME => 'listSpotName', + RequestToListUrlConverterInterface::URL_PARAMETER_LIST_URL => 'http://mydomain.tld/my/path?some=query#marker', + ), //$expectedPagerParameter + ), + );",- +TPkgShopArticlePreorder,SendMail,"* send email to users email for the given article. + * + * @param TShopArticle $oArticle + * @param string $sEmail + * + * @return bool","// ------------------------------------------------------------------------ + static $aPortals = array(); + if (null === $oArticle) { + $oArticle = $this->GetFieldShopArticle();",- +TPkgShopArticlePreorder,SaveNewPreorder,@psalm-suppress InvalidPassByReference,"// ------------------------------------------------------------------------ + $oGlobal = TGlobal::instance(); + $oMsgManager = TCMSMessageManager::GetInstance(); + if ($oGlobal->userDataExists('eMail') && TTools::IsValidEMail($oGlobal->GetuserData('eMail')) && !$oShopArticlePreorder = TdbShopArticlePreorder::LoadFromFields(array('shop_article_id' => $sArticleId, 'preorder_user_email' => $oGlobal->GetuserData('eMail')))) { + $activePortal = $this->getPortalDomainService()->getActivePortal(); + $aPostData = array('shop_article_id' => $sArticleId, 'preorder_user_email' => $oGlobal->GetuserData('eMail'), 'preorder_date' => date('Y-m-d H:i:s'), 'cms_portal_id' => $activePortal->id); + $this->LoadFromRow($aPostData); + $this->AllowEditByAll(true); + $this->Save(); + $this->AllowEditByAll(false); + $oMsgManager->AddMessage('mail-preorder-form-eMail', 'SUCCESS-USER-SIGNUP-PREORDER-ARTICLE'); + + return true;",- +TPkgShopArticlePreorder_ShopArticle,IsBuyable,"* hook called when the stock value of the article changed. + * + * @param float $dOldValue + * @param float $dNewValue + * + * @return void + * + * @psalm-suppress AssignmentToVoid, NullableReturnStatement, InvalidReturnStatement + * @FIXME Saving void return value of parent call.","// ------------------------------------------------------------------------ + $bIsBuyable = parent::IsBuyable(); + if (true === $bIsBuyable) { + if ($this->fieldShowPreorderOnZeroStock && $this->getAvailableStock() < 1) { + $bIsBuyable = false;",- +MTPkgShopArticlePreorder_ShopCentralHandlerCore,PreorderArticle,"* add your custom methods as array to $this->methodCallAllowed here + * to allow them to be called from web.","$oGlobal = TGlobal::instance(); + if ($oGlobal->UserDataExists('user_email')) { + $sUserEmail = $oGlobal->GetUserData('user_email'); + if (TTools::IsValidEMail($sUserEmail)) { + $oActiveArticle = TdbShop::GetActiveItem(); + if ($oActiveArticle) { + $oActivePortal = $this->getPortalDomainService()->getActivePortal(); + $aData = array('shop_article_id' => $oActiveArticle->id, 'preorder_user_email' => $sUserEmail, 'cms_portal_id' => $oActivePortal->id); + $oPreorder = TdbPkgShopArticlePreorder::GetNewInstance(); + if ($oPreorder->LoadFromFields($aData)) { + //do nothing, article already preordered by this email",- +TPkgShopArticleReviewMapper_Module,Accept,"* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapperVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager + * + * @return","/** @var $oReviewModuleConfiguration TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration */ + $oReviewModuleConfiguration = $oVisitor->GetSourceObject('oReviewModuleConfiguration'); + if ($oReviewModuleConfiguration && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oReviewModuleConfiguration->table, $oReviewModuleConfiguration->id);",- +TPkgShopArticleReviewMapper_Module,GetRequirements,@var $oReviewModuleConfiguration TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration,"$oRequirements->NeedsSourceObject('oReviewModuleConfiguration', 'TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration'); + $oRequirements->NeedsSourceObject('sShowAllReviews', ''); + $oRequirements->NeedsSourceObject('bAllowWriteReview', ''); + $oRequirements->NeedsSourceObject('sLoginHtml', ''); + $oRequirements->NeedsSourceObject('sWriteReviewHtml', null, ''); + $oRequirements->NeedsSourceObject('sWriteReviewHideOnJS', null, ''); + $oRequirements->NeedsSourceObject('bFieldErrors'); + $oRequirements->NeedsSourceObject('sLoginHideOnJS', null, '');",- +TPkgShopArticleReviewMapper_Write,Accept,"* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapperVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager","$aUserReviewData = $oVisitor->GetSourceObject('aUserReviewData'); + /** @var $oUser TdbDataExtranetUser */ + $oUser = $oVisitor->GetSourceObject('oUser'); + $aWriteReviewData = array(); + $aFieldUserName = array(); + $aFieldUserName['sError'] = $this->GetMessageForField('author_name'); + $aFieldUserName['sValue'] = $this->GetValueForField('author_name', $aUserReviewData); + $oVisitor->SetMappedValue('aFieldUserName', $aFieldUserName); + + $aFieldTitle = array(); + $aFieldTitle['sError'] = $this->GetMessageForField('title'); + $aFieldTitle['sValue'] = $this->GetValueForField('title', $aUserReviewData); + $oVisitor->SetMappedValue('aFieldTitle', $aFieldTitle); + + $aFieldRating = array(); + $aFieldRating['sError'] = $this->GetMessageForField('rating'); + $aFieldRating['sValue'] = $this->GetValueForField('rating', $aUserReviewData); + $oVisitor->SetMappedValue('aFieldRating', $aFieldRating); + + $aFieldText = array(); + $aFieldText['sError'] = $this->GetMessageForField('comment'); + $aFieldText['sValue'] = $this->GetValueForField('comment', $aUserReviewData); + $oVisitor->SetMappedValue('aFieldText', $aFieldText); + + $sSpotName = $oVisitor->GetSourceObject('sSpotName'); + $oVisitor->SetMappedValue('sSpotName', $sSpotName); + $sUserId = $oUser->id; + $oVisitor->SetMappedValue('sUserId', $sUserId); + $sUserEmail = $oUser->fieldEmail; + $oVisitor->SetMappedValue('sUserEmail', $sUserEmail);",- +TPkgShopArticleReviewMapper_Write,GetRequirements,@var $oUser TdbDataExtranetUser,"$oRequirements->NeedsSourceObject('sSpotName'); + $oRequirements->NeedsSourceObject('aUserReviewData', 'array'); + $oRequirements->NeedsSourceObject('oUser', 'TdbDataExtranetUser');",- +TPkgCommentTypePkgShopArticleReview,GetActiveItemId,* @return string,return '';,- +TPkgShopArticleReviewShopArticleReview,GetRateURL,"* Returns URL to rate a comment. + * + * @param bool $bPositiveLink Set if you want the url to rate a review positive or negative + * @param bool $bUseFullUrl + * + * @return string","if ($bPositiveLink) { + $bPositiveLink = '1';",- +TPkgShopArticleReviewShopArticleReview,ReviewRatedByActiveUser,"* Returns true or false if active user rated review. + * + * @return bool","return array_key_exists('TPkgShopArticleReviewShopArticleReviewRated', $_SESSION) && array_key_exists($this->id, $_SESSION['TPkgShopArticleReviewShopArticleReviewRated']);",- +TPkgShopArticleReviewShopArticleReview,RateReview,"* vote the review up or down. + * + * @param bool $bRateUp + * + * @return void","if (false == $this->ReviewRatedByActiveUser()) { + $sRateString = 'helpful_count'; + //helpful_count + //not_helpful_count + if (false == $bRateUp) { + $sRateString = 'not_helpful_count';",- +TPkgShopArticleReviewShopArticleReview,GetReportURL,"* Returns the URL to report a review. + * + * @param bool $bUseFullUrl + * + * @return string","$aParameter = array(TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id); + $sReportLink = TTools::GetExecuteMethodOnCurrentModuleURL('ReportReview', $aParameter, $bUseFullUrl); + + return $sReportLink;",- +TPkgShopArticleReviewShopArticleReview,GetChangeReviewReportNotificationStateURL,"* Returns URL to change report notification state for a review. + * + * @param bool $bUseFullUrl + * + * @return string","$aParameter = array(TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id); + $sReportLink = TTools::GetExecuteMethodOnCurrentModuleURL('ChangeReviewReportNotificationState', $aParameter, $bUseFullUrl); + + return $sReportLink;",- +TPkgShopArticleReviewShopArticleReview,GetDeleteURL,"* Returns the URL to delete a review. + * + * @param bool $bUseFullUrl + * + * @return string","$aParameter = array(TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id); + $sReportLink = TTools::GetExecuteMethodOnCurrentModuleURL('DeleteReview', $aParameter, $bUseFullUrl); + + return $sReportLink;",- +TPkgShopArticleReviewShopArticleReview,SendReviewReportNotification,"* send a review notification to the shop owner. + * + * @return void","$this->SaveActionIdToComment(); + $oMail = TDataMailProfile::GetProfile('report-review'); + $aData = array(); + $oShop = TdbShop::GetInstance(); + $oArticle = $this->GetFieldShopArticle(); + $aData['sArticleName'] = $oArticle->GetName(); + $aData['sReviewId'] = $this->id; + $aData['sReviewTitle'] = $this->fieldTitle; + $aData['sReviewText'] = $this->fieldComment; + $aData['sReviewAuthor'] = $this->fieldAuthorName; + $aData['sUnlockReviewLink'] = """".TGlobal::OutHtml(TGlobal::Translate('chameleon_system_shop_article_review.action.publish_comment')).' '; + $aData['sDeleteReviewLink'] = """".TGlobal::OutHtml(TGlobal::Translate('chameleon_system_shop_article_review.action.delete_comment')).' '; + $aData['shopname'] = $oShop->GetName(); + $oMail->AddDataArray($aData); + $oMail->SendUsingObjectView('emails', 'Customer');",- +TPkgShopArticleReviewShopArticleReview,SendReviewCommentNotification,"* Send comment notification to review owner. + * Send comment notification to owner only if owner set the option for the review. + * + * @param TdbPkgComment $oComment + * + * @return void","if ($this->AllowSendAuthorReviewCommentNotification()) { + $sAuthorEmail = $this->GetSendReviewCommentNotificationEmail(); + if (TTools::IsValidEMail($sAuthorEmail)) { + $oMail = TDataMailProfile::GetProfile('review-comment'); + $aData = array(); + $oArticle = $this->GetFieldShopArticle(); + $aData['sArticleName'] = $oArticle->GetName(); + $aData['sReviewTitle'] = $this->fieldTitle; + $aData['sReviewText'] = $this->fieldComment; + $aData['sCommentText'] = $oComment->fieldComment; + $oMail->AddDataArray($aData); + $oMail->ChangeToAddress($this->fieldAuthorEmail, $this->fieldAuthorName); + $oMail->SendUsingObjectView('emails', 'Customer');",- +MTPkgShopArticleReviewCore,Init,"* used to show and write article reviews. +/*","parent::Init(); + $this->GetModuleConfiguration(); + $this->data['aUserData'] = $this->SetDefaultFieldVars();",- +MTPkgShopArticleReviewCore,Execute,@var TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration,"$this->data = parent::Execute(); + $this->data['oActiveArticle'] = null; + $this->data['oActiveCategory'] = null; + $this->data['oReviewList'] = $this->GetReviews(); + $this->data['sCaptchaQuestion'] = $this->GenerateCaptcha(); + $oModuleConfiguration = $this->GetModuleConfiguration(); + $this->data['oModuleConfiguration'] = $oModuleConfiguration; + $this->data['bAllowWriteReview'] = $this->AllowWriteReview(); + $this->data['bAllowReadReview'] = $this->AllowReadReview(); + $this->data['bNeedUserFieldForName'] = $this->NeedUserFieldForName(); + $this->data['iRatingStars'] = $oModuleConfiguration->fieldRatingCount; + $this->data['bAllowRateReviews'] = $this->AllowRateReviews(); + $this->data['bAllowReportReviews'] = $this->AllowReportReviews(); + $this->data['oPkgCommentModuleConfig'] = $this->GetPkgCommentModuleConfiguration(); + $this->data['iShowReviewsOnStart'] = $oModuleConfiguration->fieldCountShowReviews; + + return $this->data;",- +MTPkgShopArticleReviewCore,_CallMethod,@var string|false,"$functionResult = null; + if (true === \method_exists($this, $sMethodName)) { + $functionResult = parent::_CallMethod($sMethodName);",- +MTPkgShopArticleReviewCore,AllowAccessWithoutAuthenticityToken,"* called before any external functions get called, but after the constructor.","$bAllow = parent::AllowAccessWithoutAuthenticityToken($sMethodName); + if (false === $bAllow) { + if ('DeleteReview' == $sMethodName) { + $bAllow = true;",- +MTPkgShopArticleReviewCore,ChangeReviewReportNotificationState,"* Set default form parameter with init value or post values. + * + * @return array","$oGlobal = TGlobal::instance(); + $oMsgManager = TCMSMessageManager::GetInstance(); + if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID)) { + $oReviewItem = TdbShopArticleReview::GetNewInstance(); + if ($oReviewItem->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID)) && $oReviewItem->IsOwner()) { + $sReviewReportNotificationState = $oReviewItem->fieldSendCommentNotification; + if ($sReviewReportNotificationState) { + $sReviewReportNotificationState = 0;",- +MTPkgShopArticleReviewCore,DeleteReview,"* Returns virtual comment module config. Was needed to comment reviews + * note: this function will be used only if package pkg comment was installed. + * + * @return TdbPkgCommentModuleConfig|null","$oGlobal = TGlobal::instance(); + $oMsgManager = TCMSMessageManager::GetInstance(); + if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_ACTION_ID)) { + $this->DeleteReviewFromActionId();",- +MTPkgShopArticleReviewCore,ReportReview,"* @psalm-suppress InvalidPropertyAssignmentValue + * @FIXME field is `bool` but assigned `int` - This could yield unwanted behaviour, especially with strict checks","$oGlobal = TGlobal::instance(); + $oMsgManager = TCMSMessageManager::GetInstance(); + if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID) && $this->AllowReportReviews()) { + $oReviewItem = TdbShopArticleReview::GetNewInstance(); + if ($oReviewItem->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID))) { + if (0 != $oReviewItem->sqlData['publish'] && '0' != $oReviewItem->sqlData['publish']) { + $oReviewItem->sqlData['publish'] = 0; + $oReviewItem->AllowEditByAll(true); + $oReviewItem->Save(); + $oReviewItem->SendReviewReportNotification(); + $oArticle = TdbShop::GetActiveItem(); + if ($oArticle->IsVariant()) { + $oArticle = $oArticle->GetFieldVariantParent();",- +MTPkgShopArticleReviewCore,RateReview,"* @psalm-suppress InvalidPropertyAssignmentValue + * @FIXME field is `bool` but assigned `int` - This could yield unwanted behaviour, especially with strict checks","$oGlobal = TGlobal::instance(); + $oMsgManager = TCMSMessageManager::GetInstance(); + $oReviewItem = TdbShopArticleReview::GetNewInstance(); + if ($oReviewItem->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID))) { + if ($this->AllowRateReviews() && $oGlobal->UserDataExists('bRate') && $oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID)) { + $bRate = $oGlobal->GetUserData('bRate'); + if ($bRate) { + $oReviewItem->RateReview(true);",- +MTPkgShopArticleReviewCore,EditReview,"* @psalm-suppress UndefinedPropertyAssignment + * @FIXME Does `fieldCountShowReviews` exist?","$oGlobal = TGlobal::instance(); + $oMsgManager = TCMSMessageManager::GetInstance(); + if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID) && $oGlobal->UserDataExists(TdbShopArticleReview::INPUT_BASE_NAME)) { + $oEditReview = TdbShopArticleReview::GetNewInstance(); + if ($oEditReview->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID))) { + $aUserData = $oGlobal->GetuserData(TdbShopArticleReview::INPUT_BASE_NAME); + foreach ($aUserData as $sKey => $sValue) { + $oEditReview->sqlData[$sKey] = $sValue;",- +MTPkgShopArticleReviewCore,WriteReview,"* @psalm-suppress UndefinedPropertyAssignment + * @FIXME Does `fieldAllowReportComments` exist?","//validate user input... + $oGlobal = TGlobal::instance(); + $aUserData = array(); + if ($this->AllowWriteReview()) { + $aUserData = $this->GetReviewWriteData(); + $oGlobal->GetuserData(TdbShopArticleReview::INPUT_BASE_NAME); + if ($this->ValidateWriteReviewData($aUserData)) { + $oArticle = $this->GetArticleToReview(); + $oReviewItem = $this->CreateReview($aUserData, $oArticle); + $oArticle->UpdateStatsReviews(); + $oReviewItem->SendNewReviewNotification(); + $oMsgManager = TCMSMessageManager::GetInstance(); + $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-SUBMITTED', $aUserData); + $this->RedirectToItemPage();",- +MTPkgShopArticleReviewCore,_AllowCache,"* Checks if its allowed to write a comment to a review. + * Returns always false if package pkgcomment was not installed. + * + * @return bool",return false;,- +MTPkgShopArticleReviewCore,GetHtmlHeadIncludes,"* Get the comment type for article reviews. + * + * @return string","$aIncludes = parent::GetHtmlHeadIncludes(); + $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('common/userInput/form')); + $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('common/lists')); + + return $aIncludes;",- +ChameleonSystemShopBundle,build,* @return void,"$container->addCompilerPass(new ArticleListPass()); + $container->addCompilerPass(new CollectPaymentConfigProvidersPass());",- +BasketProductAmountValidator,isAmountValid,* {@inheritdoc},"if (false === is_numeric($requestedAmount)) { + return false;",- +BasketVariableReplacer,"__construct( + Environment $twigEnvironment, + RequestStack $requestStack, + LoggerInterface $logger + )","* BasketVariableReplacer is used to add all request parameters as hidden fields to ""Add to Basket""-forms. + * This happens as a post process job to avoid caching those parameters. + * + * To successfully use it on a page the template for the basket button must include a placeholder in the form of: + * + * [{BASKETHIDDENFIELDS}] + * + * Background: the additional fields are added so that those parameters from the url do not get lost on the redirect + * after the POST call to the server. + * As we do not know which parameters might be needed by other modules on the page we must add all of them. + * This isn't a security concern as the page has already been called with those parameters in the first place.","$this->twigEnvironment = $twigEnvironment; + $this->logger = $logger; + $this->requestStack = $requestStack;",- +BasketVariableReplacer,filterResponse: void,* @var Environment,"$content = $event->getContent(); + if (false === strpos($content, self::BASKET_HIDDEN_FIELDS_PLACEHOLDER)) { + return;",- +PaymentMethodDataAccess,__construct,* @var Connection,$this->connection = $connection;,- +PaymentMethodDataAccess,getShippingCountryIds,* @param Connection $connection,"return $this->getIdsFromMlt('shop_payment_method_data_country_mlt', $paymentMethodId);",- +PaymentMethodDataAccess,getBillingCountryIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_payment_method_data_country_billing_data_country_mlt', $paymentMethodId);",- +PaymentMethodDataAccess,getPermittedUserIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_payment_method_data_extranet_user_mlt', $paymentMethodId);",- +PaymentMethodDataAccess,getPermittedUserGroupIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_payment_method_data_extranet_group_mlt', $paymentMethodId);",- +PaymentMethodDataAccess,getPermittedArticleIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_payment_method_shop_article_mlt', $paymentMethodId);",- +PaymentMethodDataAccess,getPermittedCategoryIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_payment_method_shop_category_mlt', $paymentMethodId);",- +PaymentMethodDataAccess,getPermittedArticleGroupIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_payment_method_shop_article_group_mlt', $paymentMethodId);",- +PaymentMethodDataAccess,getInvalidArticleIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_payment_method_shop_article1_mlt', $paymentMethodId);",- +PaymentMethodDataAccess,getInvalidCategoryIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_payment_method_shop_category1_mlt', $paymentMethodId);",- +PaymentMethodDataAccess,getInvalidArticleGroupIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_payment_method_shop_article_group1_mlt', $paymentMethodId);",- +ShopCategoryDataAccess,__construct,* @var Connection,$this->connection = $connection;,- +ShopCategoryDataAccess,getAllActive,* @param Connection $connection,"$activeRestriction = $this->getActiveRestriction(); + $query = 'SELECT * FROM `shop_category`'; + if ('' !== $activeRestriction) { + $query = $query.' WHERE '.$activeRestriction;",- +ShopCategoryDataAccess,getActiveChildren,* {@inheritdoc},"$query = 'SELECT * FROM `shop_category` WHERE `shop_category_id` = :parentId %s ORDER BY `position`'; + $activeRestriction = $this->getActiveRestriction(); + if ('' !== $activeRestriction) { + $activeRestriction = ' AND '.$activeRestriction;",- +ShopCategoryDataAccess,getCategory,* {@inheritdoc},"$query = 'SELECT * FROM `shop_category` WHERE `shop_category_id` = :categoryId'; + $row = $this->connection->fetchAllAssociative($query, array('categoryId' => $categoryId)); + if (false === $row) { + return null;",- +ShopShippingGroupDataAccess,__construct,* @var Connection,$this->connection = $connection;,- +ShopShippingGroupDataAccess,getPermittedUserIds,* @param Connection $connection,"return $this->getIdsFromMlt('shop_shipping_group_data_extranet_user_mlt', $shippingGroupId);",- +ShopShippingGroupDataAccess,getPermittedUserGroupIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_shipping_group_data_extranet_group_mlt', $shippingGroupId);",- +ShopShippingGroupDataAccess,getPermittedPortalIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_shipping_group_cms_portal_mlt', $shippingGroupId);",- +ShopShippingTypeDataAccess,__construct,* @var Connection,$this->connection = $connection;,- +ShopShippingTypeDataAccess,getPermittedArticleGroupIds,* @param Connection $connection,"return $this->getIdsFromMlt('shop_shipping_type_shop_article_group_mlt', $shippingTypeId);",- +ShopShippingTypeDataAccess,getPermittedArticleIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_shipping_type_shop_article_mlt', $shippingTypeId);",- +ShopShippingTypeDataAccess,getPermittedCategoryIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_shipping_type_shop_category_mlt', $shippingTypeId);",- +ShopShippingTypeDataAccess,getPermittedPortalIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_shipping_type_cms_portal_mlt', $shippingTypeId);",- +ShopShippingTypeDataAccess,getPermittedCountryIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_shipping_type_data_country_mlt', $shippingTypeId);",- +ShopShippingTypeDataAccess,getPermittedUserGroupIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_shipping_type_data_extranet_group_mlt', $shippingTypeId);",- +ShopShippingTypeDataAccess,getPermittedUserIds,* {@inheritdoc},"return $this->getIdsFromMlt('shop_shipping_type_data_extranet_user_mlt', $shippingTypeId);",- +ShopShippingTypeDataAccess,getAvailableShippingTypes,* {@inheritdoc},"$parameters = array( + 'iGroupId' => $shippingGroupId, + 'dNumberOfArticles' => $basket->dTotalNumberOfArticles, + 'dWeight' => $basket->dTotalWeight, + 'dBasketVolume' => $basket->dTotalVolume, + 'dBasketValue' => $basket->dCostArticlesTotalAfterDiscounts, + ); + if ('' !== $shippingCountryId) { + $parameters['sActiveShippingCountryId'] = $shippingCountryId;",- +ShopStockMessageDataAccess,__construct,* @var Connection,$this->databaseConnection = $databaseConnection;,- +ShopStockMessageDataAccess,getStockMessage,* @param Connection $databaseConnection,"$message = TdbShopStockMessage::GetNewInstance($id, $languageId); + + if (false === $message->sqlData) { + return null;",- +ShopStockMessageDataAccess,getAll,* {@inheritdoc},"$rows = $this->databaseConnection->fetchAllAssociative('SELECT * FROM `shop_stock_message`'); + + return array_reduce( + $rows, + function (array $carry, array $row) { + $carry[$row['id']] = $row; + + return $carry;",- +SearchSuggestController,__construct,* @var ShopSearchSuggestInterface,$this->shopSearchSuggest = $shopSearchSuggest;,- +SearchSuggestController,__invoke,* @param ShopSearchSuggestInterface $shopSearchSuggest,"$suggestions = $this->shopSearchSuggest->getSearchSuggestions($request->query->get('query')); + $retValue = array( + 'options' => $suggestions, + ); + + $response = new Response(json_encode($retValue)); + $response->headers->set('Content-Type', 'application/json'); + + return $response;",- +ChameleonSystemShopExtension,load,"* {@inheritdoc} + * + * @return void","$loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); + $loader->load('cronjobs.xml'); + $loader->load('logging.xml'); + $loader->load('mappers.xml'); + $loader->load('services.xml');",- +ChameleonSystemShopExtension,prepend,"* {@inheritdoc} + * + * @return void","$container->prependExtensionConfig('monolog', ['channels' => ['order', 'order_payment_ipn']]);",- +ArticleListPass,process,"* You can modify the container here before it is dumped to PHP code. + * + * @param ContainerBuilder $container + * + * @api + * + * @return void","$this->registerStateExtractors($container); + $this->registerStateElements($container); + $this->registerResultModifications($container);",- +CollectPaymentConfigProvidersPass,process,"* CollectPaymentConfigProvidersPass collects services that provide additional configuration + * for payment groups. For each payment handler group a single configuration provider can be specified + * by adding a tag ""chameleon_system_shop.payment_config_provider"" to the service definition.","$taggedServices = $container->findTaggedServiceIds('chameleon_system_shop.payment_config_provider'); + + $loaderDefinition = $container->getDefinition('chameleon_system_shop.payment.config_loader'); + + foreach ($taggedServices as $serviceId => $attributes) { + $systemName = null; + foreach ($attributes as $tag) { + foreach ($tag as $key => $value) { + if ('system_name' === $key) { + $systemName = $value;",- +UpdateProductStockEvent,__construct,* @var string,"$this->productId = $productId; + $this->newStock = $newStock; + $this->oldStock = $oldStock;",- +UpdateProductStockEvent,getProductId,* @var int,return $this->productId;,- +UpdateProductStockEvent,getNewStock,* @var int,return $this->newStock;,- +UpdateProductStockEvent,getOldStock,"* @param string $productId + * @param int $newStock + * @param int $oldStock",return $this->oldStock;,- +UpdateProductStatisticsListener,__construct,* @var ProductStatisticsServiceInterface,$this->productStatisticsService = $productStatisticsService;,- +UpdateProductStatisticsListener,onUpdateProductStock,* @param ProductStatisticsServiceInterface $productStatisticsService,"$productId = $event->getProductId(); + $product = TdbShopArticle::GetNewInstance($productId); + $isVariant = $product->IsVariant(); + if (!$isVariant && !$product->HasVariants()) { + return;",- +UpdateVariantParentStockListener,__construct,* @var ProductInventoryServiceInterface,$this->productInventoryService = $productInventoryService;,- +UpdateVariantParentStockListener,onUpdateProductStock,* @param ProductInventoryServiceInterface $productInventoryService,"$productId = $event->getProductId(); + $product = TdbShopArticle::GetNewInstance($productId); + $isVariant = $product->IsVariant(); + if (!$isVariant && !$product->HasVariants()) { + return;",- +TPkgShopMapper_ShopAddress,__construct,* @var PortalDomainServiceInterface,"$this->portalDomainService = $portalDomainService ?? ServiceLocator::get('chameleon_system_core.portal_domain_service'); + $this->shopService = $shopService ?? ServiceLocator::get('chameleon_system_shop.shop_service'); + $this->pageService = $pageService ?? ServiceLocator::get('chameleon_system_core.page_service');",- +TPkgShopMapper_ShopAddress,GetRequirements,* @var ShopServiceInterface,"$oRequirements->NeedsSourceObject('oShop', 'TdbShop', $this->shopService->getActiveShop()); + $oRequirements->NeedsSourceObject('oPortal', 'TdbCmsPortal', $this->portalDomainService->getActivePortal());",- +TPkgShopMapper_ShopAddress,Accept,* @var PageServiceInterface,"/** @var $oShop TdbShop */ + $oShop = $oVisitor->GetSourceObject('oShop'); + if (null === $oShop) { + return;",- +TPkgShopMapper_ShopCentralHandler,__construct,* @var ShopServiceInterface,"if (null === $shopService) { + $this->shopService = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_shop.shop_service');",- +TPkgShopMapper_ShopCentralHandler,GetRequirements,* @param ShopServiceInterface|null $shopService,"$oRequirements->NeedsSourceObject('oShop', 'TdbShop', $this->shopService->getActiveShop());",- +TPkgShopMapper_ShopCentralHandler,Accept,* {@inheritdoc},"/** @var $oShop TdbShop */ + $oShop = $oVisitor->GetSourceObject('oShop'); + if ($oShop) { + if ($bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oShop->table, $oShop->id);",- +TPkgShopMapper_SystemPageLinks,__construct,* @var ShopServiceInterface,"if (null === $shopService) { + $this->shopService = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_shop.shop_service');",- +TPkgShopMapper_SystemPageLinks,GetRequirements,* @param ShopServiceInterface|null $shopService,"$oRequirements->NeedsSourceObject('oShop', 'TdbShop', $this->shopService->getActiveShop());",- +TPkgShopMapper_SystemPageLinks,Accept,* {@inheritdoc},"/** @var $oShop TdbShop */ + $oShop = $oVisitor->GetSourceObject('oShop'); + if ($oShop && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oShop->table, $oShop->id);",- +AbstractPkgShopMapper_Article,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle'); + $oRequirements->NeedsSourceObject('oShop', 'TdbShop', TdbShop::GetInstance());",- +TPkgShopMapper_ArticleAddedToBasket,GetRequirements,* {@inheritdoc},"parent::GetRequirements($oRequirements); + + $oRequirements->NeedsSourceObject('iAmount');",- +TPkgShopMapper_ArticleAddedToBasket,Accept,@var $oArticle TdbShopArticle,"$oLocal = TCMSLocal::GetActive(); + + /** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleAttributes,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleBundleContent,GetRequirements,* {@inheritdoc},"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('oLocal', 'TCMSLocal', TCMSLocal::GetActive());",- +TPkgShopMapper_ArticleBundleContent,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleGetOneVariantType,Accept,* {@inheritdoc},"$aReturnData = array(); + /** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleImageGallery,GetRequirements,* {@inheritdoc},"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('sActiveImageId', 'string', null, true);",- +TPkgShopMapper_ArticleImageGallery,Accept,* {@inheritdoc},"/** @var $oShop TdbShop */ + $oShop = $oVisitor->GetSourceObject('oShop'); + $oCacheTriggerManager->addTrigger($oShop->table, $oShop->id); + + /** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); + + $sActiveImageId = $oVisitor->GetSourceObject('sActiveImageId'); + + $aActiveItem = array(); + $aImages = array(); + $oImages = $oArticle->GetFieldShopArticleImageList(); + if ($oImages->Length() > 0) { + while ($oImage = $oImages->Next()) { + $oCacheTriggerManager->addTrigger($oImage->table, $oImage->id); + $aImage = $this->getImageDetails($oArticle, $oImage, $oCacheTriggerManager); + if (0 === count($aActiveItem) && ($sActiveImageId == $oImage->id || null === $sActiveImageId)) { + $aActiveItem = $aImage;",- +TPkgShopMapper_ArticleManufacturer,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleMarker,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleOtherCategoriesTeaser,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleQuickShopLink,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleRatingAverage,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleRatingOverview,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleRatingOverview,GetRequirements,@var $oArticle TdbShopArticle,"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('oReviewModuleConfiguration', 'TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration');",- +TPkgShopMapper_ArticleRatingReview,Accept,* {@inheritdoc},"/** @var $oArticleReview TdbShopArticleReview */ + $oArticleReview = $oVisitor->GetSourceObject('oArticleReview'); + if ($oArticleReview && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticleReview->table, $oArticleReview->id);",- +TPkgShopMapper_ArticleRatingReview,GetRequirements,@var $oArticleReview TdbShopArticleReview,"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('oArticleReview', 'TdbShopArticleReview'); + $oRequirements->NeedsSourceObject('oReviewModuleConfiguration', 'TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration'); + $oRequirements->NeedsSourceObject('oLocal', 'TdbCmsLocals', TdbCmsLocals::GetActive());",- +TPkgShopMapper_ArticleShippingTime,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleTags,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleTeaserBase,GetRequirements,* {@inheritdoc},"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('oLocal', 'TCMSLocal', TCMSLocal::GetActive());",- +TPkgShopMapper_ArticleTeaserBase,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +ShopBasketMapper_Url,GetRequirements,* {@inheritdoc},"$requirements->NeedsSourceObject('useRedirect', 'boolean', true, true); + $requirements->NeedsSourceObject('removeModuleMethodCalls', 'boolean', true, true);",- +ShopBasketMapper_Url,"Accept( + IMapperVisitorRestricted $visitor, + $cachingEnabled, + IMapperCacheTriggerRestricted $cacheTriggerManager + )",* {@inheritdoc},"$useRedirect = $visitor->GetSourceObject('useRedirect'); + /** @var ShopServiceInterface $shopService */ + $shopService = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_shop.shop_service'); + $url = $shopService->getBasketLink($useRedirect); + + $removeModuleMethodCalls = $visitor->GetSourceObject('removeModuleMethodCalls'); + if ($removeModuleMethodCalls) { + $url = $this->removeModuleMethodCalls($url);",- +TPkgShopBasketMapper_BasketItemsEndPoint,GetRequirements,"* always use TPkgShopBasketMapper_BasketItems instead of TPkgShopBasketMapper_BasketItemsEndPoint. +/*","$oRequirements->NeedsSourceObject('oBasket', 'TShopBasket', TShopBasket::GetInstance()); + $oRequirements->NeedsSourceObject('oCurrency', 'TdbPkgShopCurrency', TdbPkgShopCurrency::GetActiveInstance()); + $oRequirements->NeedsSourceObject('generateAbsoluteProductUrls', 'bool', false, true);",- +TPkgShopBasketMapper_BasketItemsEndPoint,Accept,* {@inheritdoc},"/** @var $oBasket TShopBasket */ + $oBasket = $oVisitor->GetSourceObject('oBasket'); + + /** @var $oCurrency TdbPkgShopCurrency */ + $oCurrency = $oVisitor->GetSourceObject('oCurrency'); + + $generateAbsoluteProductUrls = $oVisitor->GetSourceObject('generateAbsoluteProductUrls'); + + $aBasketItems = array(); + $oBasketContents = $oBasket->GetBasketContents(); + $oBasketContents->GoToStart(); + /** @var $oItem TShopBasketArticle */ + while ($oItem = $oBasketContents->Next()) { + $aBasketItem = array( + 'sId' => $oItem->id, + 'sBasketItemKey' => $oItem->sBasketItemKey, + 'sImageId' => $oItem->GetImagePreviewObject('basket')->GetImageObject()->id, + 'iAmount' => $oItem->dAmount, + 'sManufacturer' => '', + 'sArticleName' => $oItem->GetName(), + 'sPrice' => TCMSLocal::GetActive()->FormatNumber($oItem->dPrice, 2), + 'sCurrency' => $oCurrency->fieldSymbol, + 'sArticleDetailURL' => $oItem->getLink($generateAbsoluteProductUrls), + 'sNoticeListLink' => $oItem->GetToNoticeListLink(), + 'sRemoveFromBasketLink' => $oItem->GetRemoveFromBasketLink(), + 'bAllowChangeAmount' => true, + 'sPriceTotal' => TCMSLocal::GetActive()->FormatNumber($oItem->dPriceTotal, 2), + ); + if ($oItem instanceof IPkgShopBasketArticleWithCustomData && true === $oItem->isConfigurableArticle()) { + $aBasketItem['customData'] = $oItem->getCustomDataForTwigOutput(); + $aBasketItem['customDataTwigTemplate'] = $oItem->getCustomDataTwigTemplate();",- +WITHOUT,GetRequirements,"* collects all sum-values for the basket (tax, vouchers, discounts, shipping, etc) + * note: always use the class WITHOUT the EndPoint (ie. use TPkgShopBasketMapper_BasketSummary). +/*","$oRequirements->NeedsSourceObject('oBasket', 'TShopBasket', TShopBasket::GetInstance());",- +WITHOUT,Accept,* {@inheritdoc},"/** @var $oBasket TShopBasket */ + $oBasket = $oVisitor->GetSourceObject('oBasket'); + + $aData = array( + 'dSumProducts' => $oBasket->dCostArticlesTotal, + 'dSumDiscounts' => -1 * $oBasket->dCostDiscounts, + 'aDiscountList' => array(), + 'dSumDiscountVouchers' => -1 * $oBasket->dCostNoneSponsoredVouchers, + 'aDiscountVoucherList' => array(), + 'dSumProductsAfterDiscountsAndDiscountVouchers' => $oBasket->dCostArticlesTotalAfterDiscounts, // after discounts and sponsored vouchers + + 'dSumShipping' => $oBasket->dCostShipping, + 'dSumPaymentSurcharge' => $oBasket->dCostPaymentMethodSurcharge, + + 'dSumVat' => $oBasket->dCostVAT, + 'aVatList' => array(), + 'dSumVatWithoutShipping' => $oBasket->dCostVATWithoutShipping, + + 'dSumSponsoredVouchers' => -1 * $oBasket->dCostVouchers, + 'aSponsoredVoucherList' => array(), + 'dSumGrandTotal' => $oBasket->dCostTotal, + 'dBasketTotalWithoutSponsoredVouchers' => $oBasket->dCostTotal + $oBasket->dCostVouchers, + + 'iNumberOfUniqueProducts' => $oBasket->iTotalNumberOfUniqueArticles, + 'iNumberOfProducts' => $oBasket->dTotalNumberOfArticles, + 'shippingCountryKnown' => false, + 'oDefaultCountry' => $this->getShop()->GetFieldDataCountry(), + ); + + $user = $this->getActiveUser(); + $shippingAddress = $user->GetShippingAddress(); + if (null !== $shippingAddress->GetFieldDataCountry()) { + $aData['shippingCountryKnown'] = true;",- +TPkgShopBasketMapper_ToMiniBasket,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oBasket', 'TShopBasket', TShopBasket::GetInstance()); + $oRequirements->NeedsSourceObject('oShop', 'TdbShop', TdbShop::GetInstance());",- +TPkgShopBasketMapper_ToMiniBasket,Accept,* {@inheritdoc},"/** @var $oShop TdbShop */ + $oShop = $oVisitor->GetSourceObject('oShop'); + if ($oShop && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oShop->table, $oShop->id);",- +TPkgShopBasketMapper_VoucherInput,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oMessageManager', 'TCMSMessageManager', TCMSMessageManager::GetInstance()); + $oRequirements->NeedsSourceObject('oActivePage', 'TCMSActivePage', $this->getActivePageService()->getActivePage(), true);",- +TPkgShopBasketMapper_VoucherInput,Accept,* {@inheritdoc},"$sMessageConsumerParameterName = MTShopBasketCore::URL_REQUEST_PARAMETER.'['.MTShopBasket::URL_MESSAGE_CONSUMER_NAME.']'; + + $sFormInputName = MTShopBasket::URL_REQUEST_PARAMETER.'['.MTShopBasket::URL_VOUCHER_CODE.']'; + $oMessageManager = $oVisitor->GetSourceObject('oMessageManager'); + /** @var $oMessageManager TCMSMessageManager* */ + if ($oMessageManager->ConsumerHasMessages('sAddVoucherField')) { + $oVisitor->SetMappedValue('sErrorMessage', $oMessageManager->RenderMessages('sAddVoucherField'));",- +TPkgShopMapper_ArticleAddToBasket,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle'); + $oRequirements->NeedsSourceObject('bRedirectToBasket', 'bool', false);",- +TPkgShopMapper_ArticleAddToBasket,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleAddToBasketAjax,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle'); + $oRequirements->NeedsSourceObject('bRedirectToBasket', 'bool', false);",- +TPkgShopMapper_ArticleAddToBasketAjax,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if (!is_null($oArticle) && !is_null($oArticle->id)) { + $oVisitor->SetMappedValue('sBasketFormId', 'tobasket'.$oArticle->sqlData['cmsident']); + $sAjaxBasketLink = ""CHAMELEON.Custom.AddToBasket('"".TdbShop::GetInstance()->GetBasketModuleSpotName().""', '"".TGlobal::OutHTML($oArticle->id).""', document.tobasket{$oArticle->sqlData['cmsident']",- +TPkgShopMapper_ArticleTransferToBasket,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle'); + $oRequirements->NeedsSourceObject('bRedirectToBasket', 'bool', false); + $oRequirements->NeedsSourceObject('oShop', 'TdbShop', TdbShop::GetInstance());",- +TPkgShopMapper_ArticleTransferToBasket,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TCMSPageBreadcrumbMapper,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oBreadCrumb', 'TCMSPageBreadcrumb');",- +TCMSPageBreadcrumbMapper,Accept,* {@inheritdoc},"/** @var $oBreadCrumb TCMSPageBreadcrumb */ + $oBreadCrumb = $oVisitor->GetSourceObject('oBreadCrumb'); + $aTree = array(); + $oBreadCrumb->GoToStart(); + while ($oNode = $oBreadCrumb->Next()) { /*@var $oNode TCMSTreeNode */ + $aTree[] = array('bIsActive' => false, + 'bIsExpanded' => true, + 'sLink' => $oNode->GetLink(), + 'sTitle' => $oNode->GetName(), );",- +AbstractPkgShopMapper_Category,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oObject', 'TdbShopCategory');",- +TPkgShopMapper_CategoryDescription,Accept,* {@inheritdoc},"/** @var $oCategory TdbShopCategory */ + $oCategory = $oVisitor->GetSourceObject('oObject'); + if ($oCategory && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oCategory->table, $oCategory->id);",- +TPkgShopMapper_CategorySeoText,Accept,* {@inheritdoc},"/** @var $oCategory TdbShopCategory */ + $oCategory = $oVisitor->GetSourceObject('oObject'); + if ($oCategory && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oCategory->table, $oCategory->id);",- +TPkgShopMapper_CategorySubCategories,Accept,* {@inheritdoc},"/** @var $oCategory TdbShopCategory */ + $oCategory = $oVisitor->GetSourceObject('oObject'); + if ($oCategory && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oCategory->table, $oCategory->id);",- +TPkgShopMapper_CategoryTeaserBase,Accept,* {@inheritdoc},"/** @var $oCategory TdbShopCategory */ + $oCategory = $oVisitor->GetSourceObject('oObject'); + if ($oCategory && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oCategory->table, $oCategory->id);",- +TPkgShopMapper_ArticleListHeader,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('sListOptionSort', 'string');",- +TPkgShopMapper_ArticleListHeader,Accept,* {@inheritdoc},"$oVisitor->SetMappedValue('sListOptionSort', $oVisitor->GetSourceObject('sListOptionSort'));",- +TPkgShopMapper_ArticleListOrderBy,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oOrderByList', 'TdbShopModuleArticlelistOrderbyList'); + $oRequirements->NeedsSourceObject('sActiveOrderById', 'string', null); + $oRequirements->NeedsSourceObject('sOrderByTitle', 'string'); + $oRequirements->NeedsSourceObject('sFieldName', 'string');",- +TPkgShopMapper_ArticleListOrderBy,Accept,* {@inheritdoc},"/** @var $oOrderByList TdbShopModuleArticlelistOrderbyList */ + $oOrderByList = $oVisitor->GetSourceObject('oOrderByList'); + + if (!is_object($oOrderByList) || 0 == $oOrderByList->Length()) { + return;",- +TPkgShopMapper_ArticleListPager,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oList', 'TdbShopArticleList'); + $oRequirements->NeedsSourceObject('listIdent', 'string');",- +TPkgShopMapper_ArticleListPager,Accept,* {@inheritdoc},"/** @var $oArticleList TdbShopArticleList */ + $oArticleList = $oVisitor->GetSourceObject('oList'); + + $aListPaging = array( + 'iActivePage' => $oArticleList->GetCurrentPageNumber(), + 'iLastPage' => $oArticleList->GetTotalPageCount(), + 'sURL' => str_replace(TdbShopArticleList::URL_LIST_CURRENT_PAGE.'=0', TdbShopArticleList::URL_LIST_CURRENT_PAGE.'={[pageNumber0]",- +TPkgShopMapper_ArticleListResultInfo,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oList', 'TdbShopArticleList'); + $oRequirements->NeedsSourceObject('oLocal', 'TCMSLocal', TCMSLocal::GetActive());",- +TPkgShopMapper_ArticleListResultInfo,Accept,* {@inheritdoc},"/** @var $oArticleList TdbShopArticleList */ + $oArticleList = $oVisitor->GetSourceObject('oList'); + + /** @var $oLocal TCMSLocal */ + $oLocal = $oVisitor->GetSourceObject('oLocal'); + + $iStartItem = $oArticleList->GetStartRecordNumber() + 1; + $iMaxItems = $oArticleList->Length(); + $iEndItem = $oArticleList->GetStartRecordNumber() + $oArticleList->GetPageSize(); + if ($iEndItem > $iMaxItems) { + $iEndItem = $iMaxItems;",- +AbstractPkgShopMapper_Manufacturer,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oObject', 'TdbShopManufacturer');",- +TPkgShopManufacturerMapper_Intro,Accept,* {@inheritdoc},"/** @var $oManufacturer TdbShopManufacturer */ + $oManufacturer = $oVisitor->GetSourceObject('oObject'); + if ($oManufacturer && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oManufacturer->table, $oManufacturer->id);",- +TPkgShopManufacturerMapper_Overview,__construct,* @var TranslatorInterface,"if (null === $translator) { + $this->translator = \ChameleonSystem\CoreBundle\ServiceLocator::get('translator');",- +TPkgShopManufacturerMapper_Overview,GetRequirements,* @param TranslatorInterface|null $translator,"$oRequirements->NeedsSourceObject('oConfig', 'TdbShopManufacturerModuleConf'); + $oRequirements->NeedsSourceObject('oManufacturerList', 'TdbShopManufacturerList');",- +TPkgShopManufacturerMapper_Overview,Accept,* {@inheritdoc},"/** @var $oConfig TdbShopManufacturerModuleConf */ + $oConfig = $oVisitor->GetSourceObject('oConfig'); + if ($oConfig && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oConfig->table, $oConfig->id);",- +TPkgShopManufacturerMapper_OverviewNavigation,__construct,* @var UrlNormalizationUtil,"if (null === $urlNormalizationUtil) { + $this->urlNormalizationUtil = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.util.url_normalization');",- +TPkgShopManufacturerMapper_OverviewNavigation,GetRequirements,* @param UrlNormalizationUtil|null $urlNormalizationUtil,"$oRequirements->NeedsSourceObject('oManufacturerList', 'TdbShopManufacturerList');",- +TPkgShopManufacturerMapper_OverviewNavigation,Accept,* {@inheritdoc},"/** @var $oManufacturerList TdbShopManufacturerList */ + $oManufacturerList = $oVisitor->GetSourceObject('oManufacturerList'); + if ($bCachingEnabled) { + $oCacheTriggerManager->addTrigger('shop_manufacturer', null);",- +MTMyAccountMapper_Newsletter,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oNewsletterUser', 'TdbPkgNewsletterUser', null, true); + $oRequirements->NeedsSourceObject('oMyAccountModuleConfig', 'TdbDataExtranetModuleMyAccount'); + $oRequirements->NeedsSourceObject('sActionLink', '');",- +MTMyAccountMapper_Newsletter,Accept,* {@inheritdoc},"/** @var $oNewsletterUser TdbPkgNewsletterUser */ + $oNewsletterUser = $oVisitor->GetSourceObject('oNewsletterUser'); + $bNewsletterSubscribed = true; + if (is_null($oNewsletterUser) || !$oNewsletterUser->fieldOptin) { + $bNewsletterSubscribed = false;",- +TPkgShopMapper_ArticleRemoveNoticeList,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle');",- +TPkgShopMapper_ArticleRemoveNoticeList,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_ArticleToNoticeList,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle');",- +TPkgShopMapper_ArticleToNoticeList,Accept,* {@inheritdoc},"/** @var $oArticle TdbShopArticle */ + $oArticle = $oVisitor->GetSourceObject('oObject'); + if ($oArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id);",- +TPkgShopMapper_Order,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oObject', 'TdbShopOrder', null, true);",- +TPkgShopMapper_Order,Accept,* {@inheritdoc},"/** @var $oOrder TdbShopOrder */ + $oOrder = $oVisitor->GetSourceObject('oObject'); + if (null !== $oOrder) { + if ($bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oOrder->table, $oOrder->id);",- +TPkgShopMapper_OrderArticleList,GetRequirements,@var bool,"$oRequirements->NeedsSourceObject('oObject', 'TdbShopOrder', null, true); + $oRequirements->NeedsSourceObject('bAbsoluteArticleUrls', null, false);",- +TPkgShopMapper_OrderArticleList,Accept,* {@inheritdoc},"/** @var $oOrder TdbShopOrder */ + $oOrder = $oVisitor->GetSourceObject('oObject'); + $this->bAbsoluteArticleUrls = $oVisitor->GetSourceObject('bAbsoluteArticleUrls'); + if (null !== $oOrder) { + if ($bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oOrder->table, $oOrder->id);",- +TPkgShopMapper_OrderArticleListSummary,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oObject', 'TdbShopOrder', null, true);",- +TPkgShopMapper_OrderArticleListSummary,Accept,* {@inheritdoc},"/** @var $oOrder TdbShopOrder */ + $oOrder = $oVisitor->GetSourceObject('oObject'); + if (null !== $oOrder) { + if ($bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oOrder->table, $oOrder->id);",- +TPkgShopMapper_OrderPayment,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oObject', 'TdbShopOrder', null, true); + $oRequirements->NeedsSourceObject('sPaymentHtml', 'string', '', true);",- +TPkgShopMapper_OrderPayment,Accept,* {@inheritdoc},"/** @var $oOrder TdbShopOrder */ + $oOrder = $oVisitor->GetSourceObject('oObject'); + + if (null !== $oOrder) { + if ($bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oOrder->table, $oOrder->id);",- +TPkgShopMapper_OrderUserData,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oObject', 'TdbShopOrder', null, true);",- +TPkgShopMapper_OrderUserData,Accept,* {@inheritdoc},"/** @var $oOrder TdbShopOrder */ + $oOrder = $oVisitor->GetSourceObject('oObject'); + + if (null !== $oOrder) { + if ($bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oOrder->table, $oOrder->id);",- +TPkgShopMapperOrderwizard_AddressSelection,GetRequirements,* {@inheritdoc},"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('selectedAddressId', 'string', null, true);",- +TPkgShopMapperOrderwizard_AddressSelection,Accept,* {@inheritdoc},"parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); + /** @var $oAddressObject TdbDataExtranetUserAddress */ + $oAddressObject = $oVisitor->GetSourceObject('oAddressObject'); + $selectedAddressId = $oVisitor->GetSourceObject('selectedAddressId'); + + $oVisitor->SetMappedValue('bActive', $oAddressObject->id == $selectedAddressId); + $oVisitor->SetMappedValue('sAddressId', $oAddressObject->id);",- +TPkgShopMapper_OrderCompleted,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oThankYouOrderStep', 'TdbShopOrderStep'); + $oRequirements->NeedsSourceObject('sPaymentHtml'); + $oRequirements->NeedsSourceObject('oOrder', 'TdbShopOrder');",- +TPkgShopMapper_OrderCompleted,Accept,* {@inheritdoc},"/** @var $oActiveOrderStep TdbShopOrderStep */ + $oActiveOrderStep = $oVisitor->GetSourceObject('oThankYouOrderStep'); + if ($oActiveOrderStep && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oActiveOrderStep->table, $oActiveOrderStep->id);",- +TPkgShopMapper_OrderStep,__construct,* @var InputFilterUtilInterface,"if (null === $inputFilterUtil) { + $this->inputFilterUtil = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.util.input_filter');",- +TPkgShopMapper_OrderStep,GetRequirements,* @param InputFilterUtilInterface|null $inputFilterUtil,"$oRequirements->NeedsSourceObject('sBackLink'); + $oRequirements->NeedsSourceObject('shop', 'TdbShop', TShop::GetInstance());",- +TPkgShopMapper_OrderStep,Accept,* {@inheritdoc},"/** @var $shop TdbShop */ + $shop = $oVisitor->GetSourceObject('shop'); + $oVisitor->SetMappedValueFromArray($shop->GetSQLWithTablePrefix()); + $oVisitor->SetMappedValue('sSupportMail', $shop->fieldCustomerServiceEmail); + $sBackLink = $oVisitor->GetSourceObject('sBackLink'); + $sBackLink = $this->inputFilterUtil->filterValue($sBackLink, TCMSUserInput::FILTER_URL_INTERNAL); + $oVisitor->SetMappedValue('sBackLink', $sBackLink);",- +TPkgShopMapper_PaymentList,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oPaymentMethodList', 'TdbShopPaymentMethodList', null, true); + $oRequirements->NeedsSourceObject('oActivePaymentMethod', 'TdbShopPaymentMethod', null, true); + $oRequirements->NeedsSourceObject('oLocal', 'TCMSLocal', TCMSLocal::GetActive());",- +TPkgShopMapper_PaymentList,Accept,* {@inheritdoc},"/** @var $oPaymentMethodList TdbShopPaymentMethodList */ + $oPaymentMethodList = $oVisitor->GetSourceObject('oPaymentMethodList'); + /** @var $oActivePaymentMethod TdbShopPaymentMethod */ + $oActivePaymentMethod = $oVisitor->GetSourceObject('oActivePaymentMethod'); + if ($oActivePaymentMethod && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oActivePaymentMethod->table, $oActivePaymentMethod->id);",- +TPkgShopMapper_ShippingGroupList,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oShippingGroupList', 'TdbShopShippingGroupList'); + $oRequirements->NeedsSourceObject('oActiveShippingGroup', 'TdbShopShippingGroup', null, true); + $oRequirements->NeedsSourceObject('oLocal', 'TCMSLocal', TCMSLocal::GetActive());",- +TPkgShopMapper_ShippingGroupList,Accept,* {@inheritdoc},"/** @var $oShippingGroupList TdbShopShippingGroupList */ + $oShippingGroupList = $oVisitor->GetSourceObject('oShippingGroupList'); + /** @var $oActiveShippingGroup TdbShopShippingGroup */ + $oActiveShippingGroup = $oVisitor->GetSourceObject('oActiveShippingGroup'); + /** @var $oLocal TCMSLocal */ + $oLocal = $oVisitor->GetSourceObject('oLocal'); + + $aFormControlParameter = array( + 'module_fnc' => array('[{sModuleSpotName",- +TPkgShopMapper_SocialSharePrivacy,__construct,* @deprecated since 6.2.11 - not used anymore,"if (null === $languageService) { + $this->languageService = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.language_service');",- +TPkgShopMapper_SocialSharePrivacy,GetRequirements,* @var LanguageServiceInterface,"$oRequirements->NeedsSourceObject( + 'activeLanguage', + 'TdbCmsLanguage', + $this->languageService->getActiveLanguage() + );",- +TPkgShopMapper_SocialSharePrivacy,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",* @param LanguageServiceInterface|null $languageService,"$language = 'en'; + /** @var TdbCmsLanguage $activeLanguage */ + $activeLanguage = $oVisitor->GetSourceObject('activeLanguage'); + if (null !== $activeLanguage && 'de' === $activeLanguage->fieldIso6391) { + $language = 'de';",- +AbstractPkgShopPaymentHandlerMapper,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oPaymentHandler', 'TdbShopPaymentHandler'); + $oRequirements->NeedsSourceObject('sPaymentMethodId', 'string'); // the payment method using the payment handler",- +AbstractPkgShopPaymentHandlerMapper_iPayment,Accept,* {@inheritdoc},"/** @var $oPaymentHandler TShopPaymentHandlerIPaymentCreditCard */ + $oPaymentHandler = $oVisitor->GetSourceObject('oPaymentHandler'); + if ($oPaymentHandler && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oPaymentHandler->table, $oPaymentHandler->id);",- +TPkgShopPaymentHandlerMapper_IPaymentCreditCard,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",* {@inheritdoc},"parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); + + /** @var $oPaymentHandler TShopPaymentHandlerIPaymentCreditCard */ + $oPaymentHandler = $oVisitor->GetSourceObject('oPaymentHandler'); + $cards = $oPaymentHandler->GetConfigParameter('cards'); + + //{'sValue':'AmexCard','sName':'AmericanExpress'",- +TPkgShopPaymentHandlerMapper_PayPalExpressBasket,GetRequirements,* {@inheritdoc},"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('sSpotName');",- +TPkgShopPaymentHandlerMapper_PayPalExpressBasket,Accept,* {@inheritdoc},"$oPaymentMethod = TdbShopPaymentMethod::GetNewInstance(); + if ($oPaymentMethod->LoadFromFields(array('name_internal' => 'paypal-express', 'active' => '1'))) { + if (false === \TdbShopShippingGroupList::GetShippingGroupsThatAllowPaymentWith('paypal-express')) { + $oVisitor->SetMappedValue('sPayPalExpressLink', false); + + return;",- +TPkgShopPaymentHandlerMapper_PayPalViaLinkOrderCompleted,GetRequirements,* {@inheritdoc},"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('oOrder', 'TdbShopOrder'); + $oRequirements->NeedsSourceObject('oTextBlock');",- +TPkgShopPaymentHandlerMapper_PayPalViaLinkOrderCompleted,Accept,* {@inheritdoc},"/** @var $oOrder TdbShopOrder */ + $oOrder = $oVisitor->GetSourceObject('oOrder'); + /** @var $oPaymentHandler TdbShopPaymentHandler */ + $oPaymentHandler = $oVisitor->GetSourceObject('oPaymentHandler'); + /** @var $oTextBlock TdbPkgCmsTextBlock */ + $oTextBlock = $oVisitor->GetSourceObject('oTextBlock'); + if ($oTextBlock && $oTextBlock instanceof TdbPkgCmsTextBlock) { + $sPaymentText = $oTextBlock->GetTextField('content'); + $oVisitor->SetMappedValue('sPaymentText', $sPaymentText);",- +AbstractTCMSWizardStepMapper,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oObject', 'TCMSWizardStep');",- +TCMSWizardStepListMapper_Basket,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oStepList', 'TdbShopOrderStepList'); + $oRequirements->NeedsSourceObject('oActiveStep', 'TdbShopOrderStep');",- +TCMSWizardStepListMapper_Basket,Accept,* {@inheritdoc},"/** @var $oActiveStep TdbShopOrderStep */ + $oActiveStep = $oVisitor->GetSourceObject('oActiveStep'); + if ($oActiveStep && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oActiveStep->table, $oActiveStep->id);",- +TCMSWizardStepMapper_UserAddressForm,Accept,* {@inheritdoc},"$oExtranetConfig = TdbDataExtranet::GetInstance(); + if ($oExtranetConfig && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oExtranetConfig->table, $oExtranetConfig->id);",- +TCMSWizardStepMapper_UserAddressType,GetRequirements,* {@inheritdoc},"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('bIsBillingAddress', 'boolean');",- +TCMSWizardStepMapper_UserAddressType,Accept,* {@inheritdoc},"$bIsBillingAddress = $oVisitor->GetSourceObject('bIsBillingAddress'); + $oVisitor->SetMappedValue('bIsBillingAddress', $bIsBillingAddress);",- +TCMSWizardStepMapper_UserProfile,Accept,* {@inheritdoc},"$aUserData = $oVisitor->GetSourceObject('aUserInput'); + $sSpotName = $oVisitor->GetSourceObject('sSpotName'); + $aFieldMessages = $oVisitor->GetSourceObject('aFieldMessages'); + $sWizardSpotName = $oVisitor->GetSourceObject('sWizardModuleModuleSpot'); + /** @var $oWizardStep TCMSWizardStep */ + $oWizardStep = $oVisitor->GetSourceObject('oObject'); + + $aFieldBirthdate = array(); + $aFieldBirthdate['sError'] = $this->GetMessageForField('birthdate', $aFieldMessages); + $aFieldBirthdate['sValue'] = $this->GetValueForField('birthdate', $aUserData); + $oVisitor->SetMappedValue('aFieldBirthdate', $aFieldBirthdate); + + $aTextData = array(); + $aTextData['sTitle'] = $oWizardStep->fieldName; + $aTextData['sText'] = $oWizardStep->GetTextField('description'); + + $sUrl = $oWizardStep->GetStepURL(); + + $oVisitor->SetMappedValue('sSpotName', $sSpotName); + $oVisitor->SetMappedValue('sWizardSpotName', $sWizardSpotName); + $oVisitor->SetMappedValue('aTextData', $aTextData); + $oVisitor->SetMappedValue('sWizardSpotName', $sWizardSpotName); + $oVisitor->SetMappedValue('sStepURL', $sUrl);",- +TCMSWizardStepMapper_UserProfile,GetRequirements,@var $oWizardStep TCMSWizardStep,"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('sSpotName'); + $oRequirements->NeedsSourceObject('sWizardModuleModuleSpot'); + $oRequirements->NeedsSourceObject('aUserInput'); + $oRequirements->NeedsSourceObject('aFieldMessages');",- +TCMSWizardStepMapper_UserProfileEmail,Accept,* {@inheritdoc},"$sSpotName = $oVisitor->GetSourceObject('sSpotName'); + $sWizardSpotName = $oVisitor->GetSourceObject('sWizardModuleModuleSpot'); + $sCustomMSGConsumer = $oVisitor->GetSourceObject('sCustomMSGConsumer'); + /** @var $oWizardStep TCMSWizardStep */ + $oWizardStep = $oVisitor->GetSourceObject('oObject'); + + $aFieldList = array('aFieldEmail' => 'name', 'aFieldPassword' => 'sRequirePassword'); + $this->SetInputFields($aFieldList, $oVisitor, $sCustomMSGConsumer); + + $aTextData = array(); + $aTextData['sTitle'] = $oWizardStep->fieldName; + $aTextData['sText'] = $oWizardStep->GetTextField('description'); + + $sUrl = $oWizardStep->GetStepURL(); + + $oVisitor->SetMappedValue('sSpotName', $sSpotName); + $oVisitor->SetMappedValue('sWizardSpotName', $sWizardSpotName); + $oVisitor->SetMappedValue('aTextData', $aTextData); + $oVisitor->SetMappedValue('sWizardSpotName', $sWizardSpotName); + $oVisitor->SetMappedValue('sStepURL', $sUrl); + $oVisitor->SetMappedValue('sCustomMSGConsumer', $sCustomMSGConsumer); + $oVisitor->SetMappedValue('sSuccessMessage', $this->GetMessageForField('sChangeEmailSuccess', $sCustomMSGConsumer));",- +TCMSWizardStepMapper_UserProfileEmail,GetRequirements,@var $oWizardStep TCMSWizardStep,"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('sSpotName'); + $oRequirements->NeedsSourceObject('sWizardModuleModuleSpot'); + $oRequirements->NeedsSourceObject('sCustomMSGConsumer');",- +TCMSWizardStepMapper_UserProfilePassword,Accept,* {@inheritdoc},"$sSpotName = $oVisitor->GetSourceObject('sSpotName'); + $sWizardSpotName = $oVisitor->GetSourceObject('sWizardModuleModuleSpot'); + $sCustomMSGConsumer = $oVisitor->GetSourceObject('sCustomMSGConsumer'); + /** @var $oWizardStep TCMSWizardStep */ + $oWizardStep = $oVisitor->GetSourceObject('oObject'); + $aFieldList = array('aFieldOldPassword' => 'sRequirePassword', 'aFieldNewPassword' => 'password', 'aFieldNewPasswordCheck' => 'password2'); + $this->SetInputFields($aFieldList, $oVisitor, $sCustomMSGConsumer); + + $aTextData = array(); + $aTextData['sTitle'] = $oWizardStep->fieldName; + $aTextData['sText'] = $oWizardStep->GetTextField('description'); + + $sUrl = $oWizardStep->GetStepURL(); + + $oVisitor->SetMappedValue('sSpotName', $sSpotName); + $oVisitor->SetMappedValue('sWizardSpotName', $sWizardSpotName); + $oVisitor->SetMappedValue('aTextData', $aTextData); + $oVisitor->SetMappedValue('sWizardSpotName', $sWizardSpotName); + $oVisitor->SetMappedValue('sStepURL', $sUrl); + $oVisitor->SetMappedValue('sCustomMSGConsumer', $sCustomMSGConsumer); + $oVisitor->SetMappedValue('sSuccessMessage', $this->GetMessageForField('sChangePasswordSuccess', $sCustomMSGConsumer));",- +TCMSWizardStepMapper_UserProfilePassword,GetRequirements,@var $oWizardStep TCMSWizardStep,"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('sSpotName'); + $oRequirements->NeedsSourceObject('sWizardModuleModuleSpot'); + $oRequirements->NeedsSourceObject('sCustomMSGConsumer');",- +FilterFactory,createFilter,"* This works because `ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Filter` extends + * `ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\FilterDefinition`. + * + * @psalm-suppress InvalidReturnType, InvalidReturnStatement + * + * @param FilterDefinitionInterface $filterDefinition + * + * @return FilterInterface",return $filterDefinition; // currently the filter is an extension of the filter definition - that is nonsense but can not be changed without breaking oodles of old code.,- +FilterFactory,createFallbackFilter,"* @param FilterInterface $filter + * + * @return FilterInterface|null","if (true === $filter->PreventUseOfParentObjectWhenNoRecordsAreFound()) { + return null;",- +Module,"__construct( + array $viewToListViewMapping, + RequestStack $requestStack, + StateFactoryInterface $stateFactory, + DbAdapterInterface $dbAdapter, + ResultFactoryInterface $resultFactory, + StateRequestExtractorCollectionInterface $requestExtractorCollection, + ActivePageServiceInterface $activePageService, + ViewRenderer $viewRenderer, + CacheInterface $cache, + StateElementPageSize $stateElementPageSize, + array $validPageSizes, + UrlUtil $urlUtil, + MapperLoaderInterface $mapperLoader + )",* @var StateFactoryInterface,"parent::__construct(); + $this->requestStack = $requestStack; + $this->stateFactory = $stateFactory; + $this->dbAdapter = $dbAdapter; + $this->resultFactory = $resultFactory; + + $this->requestExtractorCollection = $requestExtractorCollection; + $this->activePageService = $activePageService; + $this->viewRenderer = $viewRenderer; + $this->cache = $cache; + $this->viewToListViewMapping = $viewToListViewMapping; + $this->stateElementPageSize = $stateElementPageSize; + $this->validPageSizes = $validPageSizes; + $this->urlUtil = $urlUtil; + $this->mapperLoader = $mapperLoader;",- +Module,Init,* @var RequestStack,"parent::Init(); + $this->loadConfiguration(); // need to load config in init because this may affect what get/post parameter are relevant for the state (and thus for caching). + $this->initializeListState(); + $this->resultFactory->moduleInitHook($this->configuration); + $this->initProductListResult();",- +Module,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",* @var State,"$enrichedState = $this->enrichStateWithDefaultsFromConfiguration(); + $results = $this->moduleListResult; + if (null === $results) { + $results = $this->getResults($enrichedState);",- +Module,_GetCacheParameters,* @var DbAdapterInterface,"$cacheParameter = parent::_GetCacheParameters(); + $cacheParameter['list_class'] = 'ChameleonSystem\ShopBundle\objects\ArticleList\Module'; + + $resultParameters = $this->resultFactory->_GetCacheParameters($this->configuration, $this->state); + $cacheParameter = array_merge_recursive($cacheParameter, $resultParameters); + + return $cacheParameter;",- +Module,_AllowCache,* @var ConfigurationInterface,"if (true === $this->preventCaching) { + return false;",- +ResultData,count,* @var \TdbShopArticle[],return $this->totalNumberOfResults;,- +ResultData,setTotalNumberOfResults,* @var int,$this->totalNumberOfResults = (int) $totalNumberOfResults;,- +ResultData,getTotalNumberOfResults,* @var int,return $this->totalNumberOfResults;,- +ResultData,getPage,* @var int,return $this->page;,- +ResultData,setPage,* @var ResultInterface,"$this->page = (int) $page; + + return $this;",- +ResultData,asArray,* @return int,return $this->items;,- +ResultData,setItems,* @return \TdbShopArticle[],"$this->items = $items; + + return $this;",- +ResultData,getNumberOfPages,"* @param \TdbShopArticle[] $items + * + * @return $this","if ($this->pageSize < 1) { + return 1;",- +ResultData,setPageSize,"* @return int + * @psalm-suppress InvalidReturnType, InvalidReturnStatement","$this->pageSize = (int) $pageSize; + + return $this;",- +ResultData,getPageSize,* @return void,return $this->pageSize;,- +ResultData,setRawResult,* @return ResultInterface,$this->rawResult = $rawResult;,- +ResultFactory,__construct,* @var DatabaseAccessLayer\Interfaces\DbAdapterInterface,"$this->dbAdapter = $dbAdapter; + $this->filterFactory = $filterFactory; + $this->resultModifier = $resultModifier; + $this->eventDispatcher = $eventDispatcher;",- +ResultFactory,createResult,* @var Interfaces\FilterFactoryInterface,"$results = $this->createUnfilteredResults($moduleConfiguration); + + $results = $this->applyMaxAllowedResults($results, $moduleConfiguration); + + $results = $this->applyStateToResults($results, $moduleConfiguration->getAsArray(), $state); + + $resultData = $this->createResultDataFromResults($results); + + $this->triggerFilterExecutedEvent($resultData, $moduleConfiguration, $state); + + return $resultData;",- +ResultFactory,_AllowCache,* @var ResultModifier\Interfaces\ResultModifierInterface,return $this->getFilter($moduleConfiguration)->_AllowCache();,- +ResultFactory,_GetCacheParameters,* @var DatabaseAccessLayer\Interfaces\FilterInterface[],"$cacheParameter = $this->getFilter($moduleConfiguration)->_GetCacheParameters(); + $cacheParameter['state'] = $state->getStateArray(); + $cacheParameter['configuration_id'] = $moduleConfiguration->getId(); + + return $cacheParameter;",- +ResultFactory,_GetCacheTableInfos,* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface,"$filter = $this->getFilter($moduleConfiguration)->_GetCacheTableInfos(); + $result = array( + array('table' => 'shop_module_article_list', 'id' => $moduleConfiguration->getId()), + array('table' => 'shop_article', 'id' => null), + array('table' => 'shop', 'id' => null), + array('table' => 'shop_category', 'id' => null), + array('table' => 'shop_manufacturer', 'id' => null), + ); + + return array_merge($filter, $result);",- +ResultFactory,getFilterQuery,"* @param ConfigurationInterface $moduleConfiguration + * + * @return ResultInterface",return $this->getFilter($moduleConfiguration)->getFilterQuery($moduleConfiguration);,- +ResultFactory,moduleInitHook,"* @param ResultInterface $results + * @param array $moduleConfig + * @param StateInterface $state + * @return ResultInterface",$this->getFilter($moduleConfiguration)->ModuleInitHook();,- +ResultFactoryCache,"__construct( + ResultFactoryInterface $resultFactory, + CacheInterface $cache, + FilterFactoryInterface $filterFactory, + EventDispatcherInterface $eventDispatcher, + DbAdapterInterface $dbAdapter + )",* @var Interfaces\ResultFactoryInterface,"$this->resultFactory = $resultFactory; + $this->cache = $cache; + $this->filterFactory = $filterFactory; + $this->eventDispatcher = $eventDispatcher; + $this->dbAdapter = $dbAdapter;",- +ResultFactoryCache,createResult,* @var \esono\pkgCmsCache\CacheInterface,"if (false === $this->_AllowCache($moduleConfiguration)) { + return $this->resultFactory->createResult($moduleConfiguration, $state);",- +ResultFactoryCache,_AllowCache,* @var FilterFactoryInterface,return $this->resultFactory->_AllowCache($moduleConfiguration);,- +ResultFactoryCache,_GetCacheParameters,* @var EventDispatcherInterface,"return $this->resultFactory->_GetCacheParameters($moduleConfiguration, $state);",- +ResultFactoryCache,_GetCacheTableInfos,* @var DbAdapterInterface,return $this->resultFactory->_GetCacheTableInfos($moduleConfiguration);,- +ResultFactoryCache,getFilterQuery,"* @param ResultFactoryInterface $resultFactory + * @param CacheInterface $cache + * @param FilterFactoryInterface $filterFactory + * @param EventDispatcherInterface $eventDispatcher + * @param DbAdapterInterface $dbAdapter",return $this->resultFactory->getFilterQuery($moduleConfiguration);,- +ResultFactoryCache,moduleInitHook,"* Note: If an invalid page is requested via state, then the first page will be returned instead. + * + * @param ConfigurationInterface $moduleConfiguration + * @param StateInterface $state + * + * @return ResultDataInterface","/** + * @psalm-suppress InvalidReturnStatement + * @FIXME Returning `void` result + */ + return $this->resultFactory->moduleInitHook($moduleConfiguration);",- +SortString,__construct,* @var string,$this->sqlOrderByString = $sqlOrderByString;,- +SortString,getAsArray,* @param string $sqlOrderByString,"$sort = array(); + $parts = explode(',', $this->sqlOrderByString); + foreach ($parts as $part) { + $part = trim($part); + if ('' === $part) { + continue;",- +State,setStateFromString,"* @var array","$parts = explode(',', $stateString); + foreach ($parts as $statePartial) { + $statePartialParts = explode(':', $statePartial); + if (2 !== count($statePartialParts)) { + continue;",- +State,setState,"* @var array","if ('' === $value) { + if (true === isset($this->stateData[$name])) { + unset($this->stateData[$name]);",- +State,getStateString,"* @param string $name + * @param mixed $value + * @return void","$stateInput = $this->getStateArrayWithoutQueryParameter(); + $parts = array(); + foreach ($stateInput as $key => $value) { + if (null !== $varyingStateParameter && in_array($key, $varyingStateParameter)) { + continue;",- +State,getState,"* returns a string representation of the state, excluding the parameter specified by varyingStateParameter. + * + * @param array|null $varyingStateParameter + * + * @return string","if (false === isset($this->stateData[$name])) { + return $default;",- +State,getStateArray,"* @param string $name + * @param mixed $default + * @return mixed",return $this->stateData;,- +State,getStateArrayWithoutQueryParameter,"* does not include query parameter. + * + * @return array","$stateData = $this->getStateArray(); + if (isset($stateData[StateInterface::QUERY])) { + unset($stateData[StateInterface::QUERY]);",- +State,getStateAsUrlQueryArray,"* @return array","$urlQueryData = array(); + + $state = $this->getStateString($varyingStateParameter); + if ('' !== $state) { + $urlQueryData[$parameterIdentifier] = array(StateInterface::STATE_STRING => $state);",- +State,getQueryParameter,"* @param string $name + * @param mixed $value + * @return bool","return $this->getState(StateInterface::QUERY, array());",- +State,registerStateElement,"* @return array",$this->stateElement[$element->getKey()] = $element;,- +State,setUnsetStatesOnly,"* @param string $name + * @return bool","foreach ($stateValues as $key => $value) { + if (null === $this->getState($key, null)) { + $this->setState($key, $value);",- +StateFactory,registerStateElement,* @var StateElementInterface[],$this->stateElements[$stateElement->getKey()] = $stateElement;,- +StateFactory,createState,* {@inheritdoc},"$state = $this->createStateObject(); + + if (null === $userData) { + return $state;",- +StateFactory,createStateEnrichedWithDefaults,* {@inheritdoc},"$defaultValues = array( + StateInterface::PAGE_SIZE => $configuration->getDefaultPageSize(), + StateInterface::SORT => $configuration->getDefaultSortId(), + ); + $enrichedState = clone $state; + $enrichedState->setUnsetStatesOnly($defaultValues); + + return $enrichedState;",- +Configuration,getDefaultPageSize,"* returns null if there is no page size set. + * + * @return int|null",return $this->fieldNumberOfArticlesPerPage;,- +Configuration,getDefaultSortId,* @return string,return $this->fieldShopModuleArticlelistOrderbyId;,- +Configuration,getDefaultFilterId,* @return string,return $this->fieldShopModuleArticleListFilterId;,- +Configuration,getId,* @return string,return $this->id;,- +Configuration,getMaxResultLimitation,* @return \TdbShopModuleArticleList,return ($this->fieldNumberOfArticles > 0) ? (int) $this->fieldNumberOfArticles : null;,- +Configuration,getDatabaseObject,"* @return array",return $this;,- +DbAdapter,getConfigurationFromInstanceId,* @var Connection,"$configuration = \TdbShopModuleArticleList::GetNewInstance(); + $configuration->LoadFromField('cms_tpl_module_instance_id', $instanceID); + + return $configuration;",- +DbAdapter,getFilterDefinitionFromId,"* @param string $instanceID + * + * @return \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\ConfigurationInterface",return \TdbShopModuleArticleListFilter::GetNewInstance($filterId);,- +DbAdapter,getListResults,"* @param string $filterId + * + * @return \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\FilterDefinitionInterface","$query = $filter->getFilterQuery($moduleConfiguration); + $list = \TdbShopArticleList::GetList($query); + + return new Result($list);",- +DbAdapter,getSortTypeFromId,"* @param \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\ConfigurationInterface $moduleConfiguration + * @param \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\FilterInterface $filter + * + * @return \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\ResultInterface",return \TdbShopModuleArticlelistOrderby::GetNewInstance($sortTypeId);,- +DbAdapter,setDatabaseConnection,"* @param string $sortTypeId + * + * @return SortTypeInterface",$this->databaseConnection = $connection;,- +DbAdapter,getSortListForConfiguration,"* @param Connection $connection + * + * @return void","// shop_module_article_list_shop_module_articlelist_orderby_mlt + $sortList = array(); + $query = 'SELECT `shop_module_articlelist_orderby`.* + FROM `shop_module_articlelist_orderby` + INNER JOIN `shop_module_article_list_shop_module_articlelist_orderby_mlt` ON `shop_module_articlelist_orderby`.`id` = `shop_module_article_list_shop_module_articlelist_orderby_mlt`.`target_id` + WHERE `shop_module_article_list_shop_module_articlelist_orderby_mlt`.`source_id` = '.$this->getDatabaseConnection()->quote($configurationId).' + ORDER BY `shop_module_articlelist_orderby`.`position` ASC + '; + $list = \TdbShopModuleArticlelistOrderbyList::GetList($query); + while ($listItem = $list->Next()) { + $sortList[] = array( + 'id' => $listItem->id, + 'name' => $listItem->fieldNamePublic, + );",- +Result,__construct,* @var \TdbShopArticleList,$this->content = $content;,- +Result,count,@var int,return $this->content->Length();,- +Result,setPageSize,@var int,"$this->pageSize = (int) $pageSize; + + $this->transferPagingToContentObject();",- +Result,getPageSize,"* @var array + * @psalm-var array",return $this->pageSize;,- +Result,setPage,* @return void,"$this->page = (int) $page; + if ($this->pageSize < 1 && 0 !== $this->page) { + throw new \InvalidArgumentException('trying to move to another page, but page size is set to infinity');",- +Result,getPage,* @return int,return $this->page;,- +Result,setSort,* @return \TdbShopArticle[],"$this->sort = $sort; + $this->content->ChangeOrderBy($this->sort);",- +Result,asArray,@var int,"$data = array(); + $this->content->GoToStart(); + while ($item = $this->content->Next()) { + $data[] = $item;",- +Result,getNumberOfPages,"* limit result to this. pass null to remove limit. + * + * @param int $maxAllowedResults + * + * @return void","if ($this->pageSize < 1) { + return 1;",- +ArticleListFilterExecutedEvent,"__construct( + FilterInterface $filter, + ResultDataInterface $resultData, + ConfigurationInterface $moduleConfiguration, + StateInterface $state, + $resultFromCache = false + )",* @var ResultDataInterface,"$this->resultData = $resultData; + $this->moduleConfiguration = $moduleConfiguration; + $this->state = $state; + $this->filter = $filter; + $this->resultFromCache = $resultFromCache;",- +ArticleListFilterExecutedEvent,getModuleConfiguration,* @var ConfigurationInterface,return $this->moduleConfiguration;,- +ArticleListFilterExecutedEvent,getResultData,* @var StateInterface,return $this->resultData;,- +ArticleListFilterExecutedEvent,getState,* @var \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\FilterInterface,return $this->state;,- +ArticleListFilterExecutedEvent,getFilter,* @var bool,return $this->filter;,- +ArticleListFilterExecutedEvent,isResultFromCache,"* ArticleListFilterExecutedEvent constructor. + * + * @param FilterInterface $filter + * @param ResultDataInterface $resultData + * @param ConfigurationInterface $moduleConfiguration + * @param StateInterface $state + * @param bool $resultFromCache",return $this->resultFromCache;,- +ArticleListLegacyMapper,GetRequirements,* maps the output of the new list to the legacy views.,"$oRequirements->NeedsSourceObject( + 'results', + '\ChameleonSystem\ShopBundle\objects\ArticleList\Interfaces\ResultDataInterface' + ); + $oRequirements->NeedsSourceObject('items', 'array'); + $oRequirements->NeedsSourceObject('itemsMappedData', 'array'); + $oRequirements->NeedsSourceObject('listPagerUrl', 'string'); + $oRequirements->NeedsSourceObject('numberOfPages', 'int'); + $oRequirements->NeedsSourceObject('state', 'array'); + $oRequirements->NeedsSourceObject('sortList', 'array'); + $oRequirements->NeedsSourceObject('sortFieldName', 'string'); + $oRequirements->NeedsSourceObject('sortFormAction', 'string'); + $oRequirements->NeedsSourceObject('sortFormStateInputFields', 'string'); + $oRequirements->NeedsSourceObject( + 'stateObject', + '\ChameleonSystem\ShopBundle\objects\ArticleList\Interfaces\StateInterface' + ); + $oRequirements->NeedsSourceObject( + 'listConfiguration', + '\ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\ConfigurationInterface' + ); + $oRequirements->NeedsSourceObject('local', '\TdbCmsLocals'); + $oRequirements->NeedsSourceObject('currency', '\TdbPkgShopCurrency'); + + $oRequirements->NeedsSourceObject('legacyItemView', 'string'); + $oRequirements->NeedsSourceObject('sModuleSpotName', 'string');",- +ArticleListLegacyMapper,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",* {@inheritdoc},"/** @var $results ResultDataInterface */ + $results = $oVisitor->GetSourceObject('results'); + + $sortList = $oVisitor->GetSourceObject('sortList'); + + $itemsMappedData = $oVisitor->GetSourceObject('itemsMappedData'); + + /** @var $stateObject StateInterface */ + $stateObject = $oVisitor->GetSourceObject('stateObject'); + + $output = array( + 'sListOptionSort' => $this->getListOptionSort( + $sortList, + $stateObject->getState(StateInterface::SORT), + $oVisitor->GetSourceObject('sortFieldName'), + $oVisitor->GetSourceObject('sortFormStateInputFields'), + $oVisitor->GetSourceObject('sortFormAction') + ), + 'oList' => $this->getListProxy( + $results, + $stateObject->getState(StateInterface::PAGE), + $stateObject->getState(StateInterface::PAGE_SIZE), + $oVisitor->GetSourceObject('listPagerUrl'), + $oVisitor->GetSourceObject('sModuleSpotName') + ), + 'listIdent' => $oVisitor->GetSourceObject('sModuleSpotName'), + 'aArticleList' => $this->getRenderedItemList($itemsMappedData, $oVisitor->GetSourceObject('legacyItemView')), + 'oLocal' => $oVisitor->GetSourceObject('local'), + 'oCurrency' => $oVisitor->GetSourceObject('currency'), + ); + + $oVisitor->SetMappedValueFromArray($output);",- +ItemMapperNoticeList,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('itemMapperBaseData', 'array'); + $oRequirements->NeedsSourceObject('items', 'array'); + $oRequirements->NeedsSourceObject('shop', 'TdbShop'); + $oRequirements->NeedsSourceObject('local', 'TdbCmsLocals'); + $oRequirements->NeedsSourceObject('currency', 'TdbPkgShopCurrency');",- +ItemMapperNoticeList,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",* {@inheritdoc},"/** @var TdbShopArticle[] $items */ + $items = $oVisitor->GetSourceObject('items'); + + $itemMapperBaseData = $oVisitor->GetSourceObject('itemMapperBaseData'); + $additionalParameter = array( + 'oShop' => $oVisitor->GetSourceObject('shop'), + 'oLocal' => $oVisitor->GetSourceObject('local'), + 'oCurrency' => $oVisitor->GetSourceObject('currency'), + ); + $additionalParameter = array_merge($itemMapperBaseData, $additionalParameter); + $oVisitor->SetMappedValue('itemsMappedData', $this->mapItems($oVisitor, $items, $additionalParameter)); + $oVisitor->SetMappedValue('legacyItemView', '/common/teaser/notice-with-hover.html.twig');",- +ItemMapperStandard,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('itemMapperBaseData', 'array'); + $oRequirements->NeedsSourceObject('items', 'array'); + $oRequirements->NeedsSourceObject('shop', 'TdbShop'); + $oRequirements->NeedsSourceObject('local', 'TdbCmsLocals'); + $oRequirements->NeedsSourceObject('currency', 'TdbPkgShopCurrency'); + $oRequirements->NeedsSourceObject('sModuleSpotName', 'string');",- +ItemMapperStandard,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",* {@inheritdoc},"/** @var TdbShopArticle[] $items */ + $items = $oVisitor->GetSourceObject('items'); + + $itemMapperBaseData = $oVisitor->GetSourceObject('itemMapperBaseData'); + + $additionalParameter = array( + 'oShop' => $oVisitor->GetSourceObject('shop'), + 'oLocal' => $oVisitor->GetSourceObject('local'), + 'oCurrency' => $oVisitor->GetSourceObject('currency'), + ); + $additionalParameter = array_merge($itemMapperBaseData, $additionalParameter); + $oVisitor->SetMappedValue('itemsMappedData', $this->mapItems($oVisitor, $items, $additionalParameter)); + $oVisitor->SetMappedValue('legacyItemView', '/common/teaser/standard-with-hover.html.twig');",- +LegacyMockArticleListWrapper,__construct,* @var ResultDataInterface,"$this->result = $result; + $this->currentPage = $currentPage; + $this->pageSize = $pageSize; + $this->listPagerUrl = $listPagerUrl; + $this->sModuleSpotName = $sModuleSpotName;",- +LegacyMockArticleListWrapper,GetCurrentPageNumber,* @var int,return $this->currentPage + 1;,- +LegacyMockArticleListWrapper,GetTotalPageCount,* @var int,return $this->result->getNumberOfPages();,- +LegacyMockArticleListWrapper,GetPageJumpLink,* @var string,"return str_replace('_pageNumber_', '{[pageNumber0]",- +LegacyMockArticleListWrapper,GetPageJumpLinkAsAJAXCall,* @var string,"$listPageUrl = $this->GetPageJumpLink($iPageNumber); + $listPageUrl .= \TTools::GetArrayAsURL(array( + 'module_fnc' => array($this->sModuleSpotName => 'ExecuteAjaxCall'), + '_fnc' => 'getRenderedList', + ), '&'); + + return $listPageUrl;",- +LegacyMockArticleListWrapper,GetStartRecordNumber,"* @param ResultDataInterface $result + * @param int $currentPage + * @param int $pageSize + * @param string $listPagerUrl + * @param string $sModuleSpotName","if ($this->pageSize < 1) { + return 1;",- +LegacyMockArticleListWrapper,Length,* @return int,return $this->result->count();,- +LegacyMockArticleListWrapper,GetPageSize,* @return int,return $this->pageSize;,- +ResultModification,__construct,* @var \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\DbAdapterInterface,$this->dbAdapter = $dbAdapter;,- +ResultModification,apply,"* @param ResultInterface $result + * @param array $configuration + * @param int $filterDepth + * + * @return ResultInterface",return $result;,- +ResultModification,applyState,"* @param ResultInterface $result + * @param array $configuration + * @param StateInterface $state + * + * @return ResultInterface","$result->setPageSize($state->getState(StateInterface::PAGE_SIZE)); + + $result->setPage($state->getState(StateInterface::PAGE, 0)); + + $result = $this->applySortStateToResult($result, $state->getState(StateInterface::SORT)); + + return $result;",- +ResultModifier,addModification,* @var ResultModificationInterface[],$this->modifications[] = $resultModification;,- +ResultModifier,apply,"* @param ResultInterface $result + * @param array $configuration + * @param int $filterDepth + * + * @return ResultInterface","foreach ($this->modifications as $modification) { + $result = $modification->apply($result, $configuration, $filterDepth);",- +ResultModifier,applyState,"* @param ResultInterface $result + * @param array $configuration + * @param StateInterface $state + * @return ResultInterface","foreach ($this->modifications as $modification) { + $result = $modification->applyState($result, $configuration, $state);",- +StateElementCurrentPage,getKey,* @implements StateElementInterface,return 'p';,- +StateElementCurrentPage,validate,* @return string,"if (false === is_numeric($value)) { + throw new InvalidPageNumberException('current page must be numeric. given: '.$value);",- +StateElementPageSize,getKey,* @implements StateElementInterface,return 'ps';,- +StateElementPageSize,validate,* @var list,"if (false === is_numeric($value)) { + throw new InvalidPageSizeException(""Page size must be numeric. Given: $value"");",- +StateElementPageSize,normalize,* @return string,"$pageSize = intval($value); + if ($pageSize <= 0 && -1 !== $pageSize) { + return current($this->validOptions);",- +StateElementPageSize,setValidOptions,* @return void,$this->validOptions = $validOptions;,- +StateElementQuery,getKey,* @implements StateElementInterface,return 'q';,- +StateElementQuery,validate,* @return string,return true;,- +StateElementSort,getKey,* @implements StateElementInterface,return 's';,- +StateElementSort,validate,"* @var mixed + * @FIXME This property is private and is never used.",return true;,- +StateElementSort,normalize,* @return string,return $value;,- +StateRequestExtractorCollection,extract,* @var StateRequestExtractorInterface[],"$data = isset($requestData[$listSpotName]) ? $requestData[$listSpotName] : array(); + foreach ($this->extractorList as $extractor) { + $data = array_merge_recursive($data, $extractor->extract($configuration, $requestData, $listSpotName));",- +StateRequestExtractorCollection,registerExtractor,"* @param array $configuration + * @param array $requestData + * @param string $listSpotName + * + * @return array",$this->extractorList[] = $extractor;,- +CMSShopArticleIndex,TickerIndexGeneration,@var bool,"$this->bIndexIsRunning = true; + // see if some indexer exists + $oIndexers = TdbShopSearchIndexerList::GetList(); + // $bRegenerateCompleteIndex = false; + $oIndex = null; + if ($oIndexers->Length() < 1) { + $oIndex = TdbShopSearchIndexer::GetNewInstance(); + /** @var $oIndex TdbShopSearchIndexer */ + // $oIndex->bRegenerateCompleteIndex = $bRegenerateCompleteIndex; + $oIndex->InitializeIndexer();",- +CMSShopArticleIndex,ClearSearchCacheTables,@var bool,"$sQuery = 'TRUNCATE TABLE `shop_search_cache_item`'; + \MySqlLegacySupport::getInstance()->query($sQuery); + $sQuery = 'TRUNCATE TABLE `shop_search_cache`'; + \MySqlLegacySupport::getInstance()->query($sQuery);",- +CMSShopArticleIndex,Execute,@var float|false,"parent::Execute(); + $this->data['bIndexIsRunning'] = $this->bIndexIsRunning; + $this->data['bPercentDone'] = $this->bPercentDone; + $this->data['bIndexCompleted'] = $this->bIndexCompleted; + + return $this->data;",- +MTShopStatistic,Init,"* module is used to display and export sales stats for the shop. +/*","parent::Init(); + $this->sStartDate = $this->GetUserInput('sStartDate', date('1.m.Y')); + $this->sEndDate = $this->GetUserInput('sEndDate', date('d.m.Y')); + $this->sDateGroupType = $this->GetUserInput('sDateGroupType', 'day'); + /** + * @FIXME `bShowChange` is probably meant to be a bool field. However, `GetUserInput` writes strings (probably '1' & '0') + * @psalm-suppress InvalidPropertyAssignmentValue + */ + $this->bShowChange = $this->GetUserInput('bShowChange', '0'); + + $this->sViewName = $this->GetUserInput('sViewName', 'html.table'); + $this->selectedPortalId = $this->GetUserInput('portalId', ''); + $this->portalList = $this->getPortalList();",- +MTShopStatistic,Execute,@var string,"parent::Execute(); + + $this->data['oStats'] = $this->GetStats(); + //print_r($this->data['aStats']); + $this->data['sStartDate'] = $this->sStartDate; + $this->data['sEndDate'] = $this->sEndDate; + $this->data['sDateGroupType'] = $this->sDateGroupType; + $this->data['bShowChange'] = $this->bShowChange; + $this->data['sViewName'] = $this->sViewName; + $this->data['portalList'] = $this->portalList; + $this->data['selectedPortalId'] = $this->selectedPortalId; + + return $this->data;",- +MTShopStatistic,GetHtmlHeadIncludes,@var string,"$aIncludes = parent::GetHtmlHeadIncludes(); + $aIncludes[] = ' '; + $aIncludes[] = ' '; + + return $aIncludes;",- +MTShopStatistic,GetColumn,@var string,"// the column is the sume of the sub columns - if there are any + $dValue = 0; + if (!array_key_exists($sColName, $this->aColumns) && count($this->aSubGroups) > 0) { + if ($this->bShowGrandTotal) { + reset($this->aSubGroups); + foreach ($this->aSubGroups as $iSubGroup => $oGroupData) { + $dValue = $dValue + $oGroupData->GetColumn($sColName);",- +MTShopStatistic,AddSubgroupingForField,@var bool|'0'|'1',// split the result by field name,- +MTShopStatistic,AddGroupValue,@var string,"// subdivide by $aSubGrupping -> nested grupping.. + if (count($aSubGrupping) > 0) { + foreach ($aSubGrupping as $sField) {",- +MTShopStatistic,Render,@var string[],"$oView = new TViewParser(); + /** @var $oView TViewParser */ + $oView->AddVar('oGroup', $this); + $oView->AddVarArray($aOtherParamter); + $oView->AddVar('aSubGroups', $this->aSubGroups); + + return $oView->RenderBackendModuleView($sViewName, 'MTShopStatistic', 'Customer');",- +MTShopStatistic,GetColumnNames,@var string,"$aColumnNames = array_keys($this->aColumns); + if (count($this->aSubGroups)) { + reset($this->aSubGroups); + foreach ($this->aSubGroups as $oSubGroup) { + $aSubGroupColumns = $oSubGroup->GetColumnNames(); + foreach ($aSubGroupColumns as $sCol) { + if (!in_array($sCol, $aColumnNames)) { + $aColumnNames[] = $sCol;",- +MTShopStatistic,GetColumnGroupDepth,"* @FIXME `bShowChange` is probably meant to be a bool field. However, `GetUserInput` writes strings (probably '1' & '0') + * @psalm-suppress InvalidPropertyAssignmentValue","$iDepth = 1; + $iMaxSubDepth = 0; + reset($this->aSubGroups); + foreach ($this->aSubGroups as $oSubGroup) { + $iMaxDepth = $oSubGroup->GetColumnGroupDepth(); + $iMaxSubDepth = max($iMaxSubDepth, $iMaxDepth);",- +TPkgShopOrderPaymentConfig,__construct,"* @var string + * @psalm-var self::ENVIRONMENT_*","$this->environment = $environment; + $this->data = new ParameterBag(); + + if (isset($configData['captureOnShipment'])) { + $configData['captureOnShipment'] = (true === $configData['captureOnShipment'] || 'true' === $configData['captureOnShipment'] || 1 === $configData['captureOnShipment'] || '1' === $configData['captureOnShipment']);",- +TPkgShopOrderPaymentConfig,getEnvironment,* @var ParameterBag,return $this->environment;,- +TPkgShopOrderPaymentConfig,isCaptureOnShipment,"* @param string $environment self::ENVIRONMENT_SANDBOX or self::ENVIRONMENT_PRODUCTION + * @param string[] $configData + * @psalm-param self::ENVIRONMENT_* $environment","return $this->getValue('captureOnShipment', false);",- +TPkgShopOrderPaymentConfig,setCaptureOnShipment,"* @return string - self::ENVIRONMENT_PRODUCTION|self::ENVIRONMENT_SANDBOX + * @psalm-return self::ENVIRONMENT_*","if (false === is_bool($captureOnShipment)) { + throw new \InvalidArgumentException('captureOnShipment must be boolean');",- +TPkgShopOrderPaymentConfig,getValue,* @return bool,"return $this->data->get($key, $default);",- +TPkgShopOrderPaymentConfig,getAllValues,"* @param bool $captureOnShipment + * + * @throws InvalidArgumentException + * + * @return void",return $this->data->all();,- +TCMSCronJob_ShopSendOrderNotifications,__construct,"* resend unsent order emails flagged by TShopOrder (try n times). +/*","parent::__construct(); + $this->developmentEmailAddress = $developmentEmailAddress; + $this->languageService = $languageService;",- +TPkgShopPaymentIPayment_TShopPaymentHandlerGroup,getIPNStatus,"* @param TPkgShopPaymentIPNRequest $oRequest + * + * @return TdbPkgShopPaymentIpnStatus|null","$aPayload = $oRequest->getRequestPayload(); + $sStatusCode = null; + if (false === isset($aPayload['ret_status'])) { + return null;",- +TPkgShop_CmsLanguage,GetTranslatedPageURL,"* Return translated page URL. + * + * @return string","$sTranslatesPageURL = ''; + $this->TargetLanguageSimulation(true); + + // product page + $oActiveProduct = TdbShop::GetActiveItem(); + if (is_object($oActiveProduct)) { + $oNewProduct = TdbShopArticle::GetNewInstance($oActiveProduct->id, $this->id); + $oActiveProductCategory = TdbShop::GetActiveCategory(); + + $sCatId = null; + if (is_object($oActiveProductCategory)) { + $sCatId = $oActiveProductCategory->id;",- +TShop,SetAffiliateCode,"* the shop config object. use GetInstance to fetch the current config. +/*",$_SESSION[TdbShop::SESSION_AFFILIATE_CODE] = $sCode;,- +TShop,GetAffilateCode,"* the active search object. + * + * @var TdbShopSearchCache","$sCode = false; + if (array_key_exists(TdbShop::SESSION_AFFILIATE_CODE, $_SESSION)) { + $sCode = $_SESSION[TdbShop::SESSION_AFFILIATE_CODE];",- +TShop,allowPurchaseAsGuest,"* set the affiliate partner code for the current session. + * + * @param string $sCode + * + * @return void","if (property_exists($this, 'fieldAllowGuestPurchase')) { + return $this->fieldAllowGuestPurchase;",- +TShop,SetActiveSearchCacheObject,"* return the affiliate partner code for the current session. + * + * @return string|false","$this->oActiveSearchCache = $oActiveSearchCache; + if (!is_null($oActiveSearchCache)) { + $_SESSION[self::SESSION_ACTIVE_SEARCH_CACHE_ID] = base64_encode(serialize($oActiveSearchCache));",- +TShop,GetActiveSearchObject,"* return true if guest purchases are allowed - false if a customer account is required. + * + * @return bool","if (is_null($this->oActiveSearchCache) && array_key_exists(self::SESSION_ACTIVE_SEARCH_CACHE_ID, $_SESSION)) { + $this->oActiveSearchCache = unserialize(base64_decode($_SESSION[self::SESSION_ACTIVE_SEARCH_CACHE_ID])); + // $this->oActiveSearchCache = TdbShopSearchCache::GetNewInstance(); + // if (!$this->oActiveSearchCache->Load($_SESSION[self::SESSION_ACTIVE_SEARCH_CACHE_ID])) $this->oActiveSearchCache = null;",- +TShop,GetDefaultCountryId,"* Factory to fetch the config for the active portal. + * Note: the method fetches the portal id through the active page, if no portal id is passed. So make sure + * an active page exists if you are not passing a portal id. + * + * @param int $iPortalId - optional portal id. method fetches the id from the TCMSActivePage if iPortalId is not given + * + * @return TdbShop + * + * @deprecated use service chameleon_system_shop.shop_service instead",// Not yet implemented,- +TShop,GetBasketModuleSpotName,"* store a copy of the active search object. + * + * @param TdbShopSearchCache $oActiveSearchCache + * + * @return void",return $this->fieldBasketSpotName;,- +TShop,GetVat,"* return pointer to the search cache object. + * + * @return TdbShopSearchCache",return $this->GetFieldShopVat();,- +TShop,GetNextFreeOrderNumber,"* return assoc array with the categories starting from the current root category + * to the current active category (in that order). return null if there is no active category. + * + * @return array|null","$cmsCounter = new \esono\pkgCmsCounter\CmsCounter(\ChameleonSystem\CoreBundle\ServiceLocator::get('database_connection')); + + return $cmsCounter->get($this, self::CMS_COUNTER_ORDER);",- +TShop,GetNextFreeCustomerNumber,"@var array|null $aCategoryList","$cmsCounter = new \esono\pkgCmsCounter\CmsCounter(\ChameleonSystem\CoreBundle\ServiceLocator::get('database_connection')); + + return $cmsCounter->get($this, self::CMS_COUNTER_CUSTOMER);",- +TShop,GetBasketLink,"* Returns the active manufacturer. + * + * @return TdbShopManufacturer|null","$aParams = array('module_fnc['.$this->GetBasketModuleSpotName().']' => 'JumpToBasketPage'); + if ($bJumpAsFarAsPossible) { + $aParams['bJumpAsFarAsPossible'] = '1';",- +TShop,GetLinkToSystemPage,"* returns the current active category. + * + * @return TdbShopCategory|null + * + * @deprecated - use the service chameleon_system_shop.shop_service instead (method getActiveCategory)","if (null === $aParameters) { + $aParameters = array();",- +TShop,getLinkToSystemPageRelative,"* return the active root category. + * + * @return TdbShopCategory|null","if (null === $aParameters) { + $aParameters = array();",- +TShop,GetSystemPageNames,"* return current active filter conditions. + * + * @return array","$aSystemPages = array(); + $oPortal = self::getPortalDomainService()->getActivePortal(); + if ($oPortal) { + $aSystemPages = $oPortal->GetSystemPageNames();",- +TShop,GetLinkToSystemPageAsPopUp,"* return an sql string for the current filter. + * + * @return string + * + * @param string $sExcludeKey","$sLink = ''; + $oPortal = self::getPortalDomainService()->getActivePortal(); + if ($oPortal) { + $sLink = $oPortal->GetLinkToSystemPageAsPopUp($sLinkText, $sSystemPageName, $aParameters, $bForcePortalLink, $iWidth, $iHeight, false, $sCSSClass, $sAnchorName);",- +TShop,GetSystemPageNodeId,"* @param string $sFilterKey + * @param string $sFilterVal + * + * @psalm-param string|TdbShopCategory::FILTER_KEY_* $sFilterKey + * + * @return string","$systemPage = $this->getSystemPageService()->getSystemPage($sSystemPageName); + if (null === $systemPage) { + return null;",- +TShop,GetShopInfo,@var $oCat TdbShopCategory,"$oInfo = TdbShopSystemInfo::GetNewInstance(); + if (!$oInfo->LoadFromFields(array('shop_id' => $this->id, 'name_internal' => $sShopInfoName))) { + $oInfo = null;",- +TShop,RenderShippingInfo,"* returns all fields that may be passed as filter fields. + * + * @return array","$oView = new TViewParser(); + $oView->AddVar('oShop', $this); + $oShippingIntroText = $this->GetShopInfo('shipping-intro'); + $oShippingEndText = $this->GetShopInfo('shipping-end'); + $oView->AddVar('oShippingIntroText', $oShippingIntroText); + $oView->AddVar('oShippingEndText', $oShippingEndText); + + // get the shipping list for users not sigend in + $oPublicShippingGroups = TdbShopShippingGroupList::GetPublicShippingGroups(); + $oView->AddVar('oPublicShippingGroups', $oPublicShippingGroups); + + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShop,GetCentralShopHandlerAjaxURL,"* Get the current active item. + * + * @return TdbShopArticle|null + * + * @deprecated - use the service chameleon_system_shop.shop_service instead (method getActiveProduct)","$oGlobal = TGlobal::instance(); + + $aParameter[MTShopCentralHandler::URL_CALLING_SPOT_NAME] = $oGlobal->GetExecutingModulePointer()->sModuleSpotName; + $aRealParams = array('module_fnc' => array($this->fieldShopCentralHandlerSpotName => 'ExecuteAjaxCall'), '_fnc' => $sMethod, MTShopCentralHandler::URL_DATA => $aParameter); + $oActivePage = self::getActivePageService()->getActivePage(); + + return $oActivePage->GetRealURLPlain($aRealParams);",- +TShop,GetFieldShopPrimaryNaviList,"* Returns the active variant for given article. + * If no Variant is active return given article. + * + * @param TdbShopArticle $oArticle + * + * @return TdbShopArticle + * + * @deprecated since 6.2.13 - replaced by ProductVariantServiceInterface::getProductBasedOnSelection()","$oNaviList = $this->GetFromInternalCache('oFieldShopPrimaryNaviList'); + if (is_null($oNaviList)) { + $oNaviList = TdbShopPrimaryNaviList::GetListForShopId($this->id, $this->iLanguageId); + $oNaviList->bAllowItemCache = true; + $this->SetInternalCache('oFieldShopPrimaryNaviList', $oNaviList);",- +TShop,CacheGetTriggerList,@var TdbShopArticle $oArticle,"return array(array('table' => $this->table, 'id' => $this->id));",- +TShop,CacheCommit,@var TdbShopArticle $oArticle,,- +TShopArticle,AllowDetailviewInShop,* @var float holds the original item price,return $this->isActive() && !$this->fieldVirtualArticle;,- +TShopArticle,GetContributorList,"* the volumn of the article. + * + * @var float","if (!is_array($aContributorTypes)) { + $aContributorTypes = array($aContributorTypes);",- +TShopArticle,GetBasePrice,"* used to store the pre-discounted price of the article. + * + * @var array|null","$dBasePrice = $this->GetFromInternalCache('dBasePrice'); + if (is_null($dBasePrice)) { + $dBasePrice = false; + $oUnitsOfMeasurement = $this->GetFieldShopUnitOfMeasurement(); + if ($oUnitsOfMeasurement) { + $dBasePrice = $oUnitsOfMeasurement->GetBasePrice($this->dPrice, $this->fieldQuantityInUnits);",- +TShopArticle,GetReviewsPublished,* @return void,"$oReviews = $this->GetFromInternalCache('oPublishedReviews'); + if (is_null($oReviews)) { + $oReviews = TdbShopArticleReviewList::GetPublishedReviews($this->id, $this->iLanguageId); + $this->SetInternalCache('oPublishedReviews', $oReviews);",- +TShopArticle,GetReviewAverageScore,"* return true if the item is active (ie may be shown in the detail view of the shop). + * + * @return bool","if ($bRecount) { + $oReviews = $this->GetReviewsPublished(); + + return $oReviews->GetAverageScore();",- +TShopArticle,GetReviewCount,"* Returns Contributors for article for given types. + * + * @param array $aContributorTypes (from field 'identifier') + * + * @return TdbShopContributorList","if ($bRecount) { + $oReviews = $this->GetReviewsPublished(); + + return $oReviews->Length();",- +TShopArticle,GetVat,"* fetch the base price of the item. + * + * @return float","/** @var TdbShopVat|null $oVat */ + $oVat = $this->GetFromInternalCache('ovat'); + + if (is_null($oVat)) { + $oVat = $this->getOwnVat(); + if (is_null($oVat)) { + // try to fetch from article group + $oArticleGroups = $this->GetArticleGroups(); + $oVat = $oArticleGroups->GetMaxVat();",- +TShopArticle,getLink,"* return the base price for 1 base unit as defined through the shop_unit_of_measurement and quantity_in_units. + * + * @return float|bool","// if no category is given, fetch the first category of the article + $shopService = $this->getShopService(); + $oShop = $shopService->getActiveShop(); + $sCategoryId = null; + if (true === array_key_exists(TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY, $aOptionalParameters)) { + $sCategoryId = $aOptionalParameters[TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY]; + unset($aOptionalParameters[TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY]);",- +TShopArticle,GetDetailLink,"* return all published reviews for the article. + * + * @return TdbShopArticleReviewList","return $this->getLink( + $bIncludePortalLink, + null, + array(TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY => $iCategoryId) + );",- +TShopArticle,GetReviewFormLink,"* return the average rating of the article based on the customer reviews for the article. + * + * @param bool $bRecount - force a recount of the actual data + * + * @return float","return $this->GetDetailLink($bIncludePortalLink, $iCategoryId).'#review'.TGlobal::OutHTML($this->id);",- +TShopArticle,GetToBasketLink,"* return the total number of reviews (published). + * + * @param bool $bRecount - force a recount of the actual data + * + * @return int","$sLink = ''; + $aParameters = $this->GetToBasketLinkParameters($bRedirectToBasket, $bReplaceBasketContents, $bGetAjaxParameter, $sMessageConsumer); + // convert module_fnc to array to string + $aIncludeParams = TdbShop::GetURLPageStateParameters(); + $oGlobal = TGlobal::instance(); + foreach ($aIncludeParams as $sKeyName) { + if ($oGlobal->UserDataExists($sKeyName) && !array_key_exists($sKeyName, $aParameters)) { + $aParameters[$sKeyName] = $oGlobal->GetUserData($sKeyName);",- +TShopArticle,GetToBasketLinkForExternalCalls,"* return the vat group of the article. + * + * @return TdbShopVat|null",return 'http://'.$this->getPortalDomainService()->getActiveDomain()->getInsecureDomainName().'/'.TdbShopArticle::URL_EXTERNAL_TO_BASKET_REQUEST.'/id/'.urlencode($this->id);,- +TShopArticle,GetToBasketLinkParameters,@var TdbShopVat|null $oVat,"$aParameters = $this->getToBasketLinkBasketParameters($bRedirectToBasket, $bReplaceBasketContents, $bGetAjaxParameter, $sMessageConsumer); + $aParameters = $this->getToBasketLinkOtherParameters($aParameters); + + return $aParameters;",- +TShopArticle,GetToNoticeListLink,"* Returns the VAT based on $fieldShopVatId. + * When saving through the table editor, fields are not initialized, + * so we are falling back to the value from sqlData here + * (this is a workaround chosen for simplicity, this would need to be changed in the table editor instead). + * + * @return TdbShopVat|null","if (false === $sMsgConsumerName) { + $sMsgConsumerName = $this->GetMessageConsumerName();",- +TShopArticle,GetRemoveFromNoticeListLink,"* return the link to the detail view of the product. + * + * @param bool $bAbsolute set to true to include the domain in the link + * @param string|null $sAnchor + * @param array $aOptionalParameters supported optional parameters: + * TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY - (string) force the article link to be within the given category id (only works if the category is assigned to the article) + * @param TdbCmsPortal|null $portal + * @param TdbCmsLanguage|null $language + * + * @return string","$oShopConfig = TdbShop::GetInstance(); + if (false === $sMsgConsumerName) { + $sMsgConsumerName = $this->GetMessageConsumerName();",- +TShopArticle,GetPrimaryCategory,"* @deprecated use new getLink($sAnchor = null, $bAbsolute = false, $aOptionalParameters = array()) method - see method documentation how to pass old parameters + * + * return the link to the detail view of the product + * + * @param bool $bIncludePortalLink - set to true to include the domain in the link + * @param int $iCategoryId - pass a category to force a category (only works if the category is assigned to the article) + * + * @return string","$oCategory = null; + // if this is a variant, then we want to take the parent object instead - at least if no data is set for the child + if (!empty($this->fieldShopCategoryId)) { + $oCategory = $this->GetFieldShopCategory(); + if (!is_null($oCategory) && false == $oCategory->AllowDisplayInShop()) { + $oCategory = null;",- +TShopArticle,GetFieldShopCategoryList,"* return the link to the detail view of the product (classic URL). + * + * @param bool $bIncludePortalLink - set to true to include the domain in the link + * @param int $iCategoryId - pass a category to force a category (only works if the category is assigned to the article) + * + * @return string","$oCategories = $this->GetFromInternalCache('oCategories'); + if (is_null($oCategories)) { + $oCategories = TdbShopCategoryList::GetArticleCategories($this->id, $this->iLanguageId); + $this->SetInternalCache('oCategories', $oCategories);",- +TShopArticle,GetArticleGroups,@var $oCategory TdbShopCategory,"$oArticleGroups = $this->GetFromInternalCache('oArticleGroups'); + if (is_null($oArticleGroups)) { + $oArticleGroups = TdbShopArticleGroupList::GetArticleGroups($this->id); + $this->SetInternalCache('oArticleGroups', $oArticleGroups);",- +TShopArticle,Render,"* a better SEO URL (depends on TCMSSmartURLHandler_ShopProductV2). + * + * @param bool $bIncludePortalLink - set to true to include the domain in the link + * @param int $iCategoryId - pass a category to force a category (only works if the category is assigned to the article) + * @param TdbCmsPortal $portal + * @param TdbCmsLanguage $language + * + * @return string","if (!$this->IsVariant()) { + $sActiveVariantForCurrentSpot = TdbShop::GetRegisteredActiveVariantForCurrentSpot($this->id); + if (false != $sActiveVariantForCurrentSpot) { + // render the variant instead of the current article + $oVariant = TdbShopArticle::GetNewInstance(); + /** @var $oVariant TdbShopArticle */ + $oVariant->Load($sActiveVariantForCurrentSpot); + + return $oVariant->Render($sViewName, $sViewType, $aCallTimeVars);",- +TShopArticle,RenderPreviewThumbnail,"* return the link to the review page of the product. + * + * @param bool $bIncludePortalLink - set to true to include the domain in the link + * @param int $iCategoryId - pass a category to force a category (only works if the category is assigned to the article) + * + * @return string","$sHTML = ''; + $oPreviewImage = $this->GetImagePreviewObject($sImageSizeName); + if (!is_null($oPreviewImage)) { + $sHTML = $oPreviewImage->Render($sViewName, $sViewType, $aEffects);",- +TShopArticle,GetPrimaryImage,"* generates a link that can be used to add this product to the basket. + * + * @param bool $bIncludePortalLink - include domain in link + * @param bool $bRedirectToBasket - redirect to basket page after adding product + * @param bool $bReplaceBasketContents - set to true if you want the contents of the basket to be replaced by the product wenn added to basket + * @param bool $bGetAjaxParameter - set to true if you want to get basket link for ajax call + * @param string $sMessageConsumer - set custom message consumer + * + * @return string","/** @var TdbShopArticleImage|null $oPrimaryImage */ + $oPrimaryImage = $this->GetFromInternalCache('oPrimaryImage'); + + if (is_null($oPrimaryImage)) { + if (!empty($this->fieldCmsMediaDefaultPreviewImageId) && (!is_numeric($this->fieldCmsMediaDefaultPreviewImageId) || intval($this->fieldCmsMediaDefaultPreviewImageId) > 1000)) { + $oShop = TdbShop::GetInstance(); + $aData = array('shop_article_id' => $this->id, 'cms_media_id' => $this->fieldCmsMediaDefaultPreviewImageId, 'position' => 1); + $oPrimaryImage = TdbShopArticleImage::GetNewInstance(); + $oPrimaryImage->LoadFromRow($aData);",- +TShopArticle,GetImagePreviewObject,"* Creates to basket link from given to basket parameters. + * + * @param array $aParameters + * @param bool $bIncludePortalLink + * + * @return string","// check if the type has been defined... + $oPreviewObject = TdbShopArticlePreviewImage::GetNewInstance(); + + if (!$oPreviewObject->LoadByName($this, $sImageSizeName)) { + // if the article is a varaint, try the parent + if ($this->IsVariant()) { + $oParent = $this->GetFieldVariantParent(); + $oPreviewObject = null; + if (null != $oParent) { + $oPreviewObject = $oParent->GetImagePreviewObject($sImageSizeName);",- +TShopArticle,IsInArticleGroups,@var Request $request,"$bIsInGroups = false; + $aArticleGroups = $this->GetMLTIdList('shop_article_group'); + $aIntersec = array_intersect($aArticleGroups, $aGroupList); + + if (0 == count($aIntersec) && 0 == count($aArticleGroups) && $this->IsVariant()) { + $oParent = $this->GetFieldVariantParent(); + if ($oParent) { + $bIsInGroups = $oParent->IsInArticleGroups($aGroupList);",- +TShopArticle,GetExportObject,"* returns a url to place the item in the basket from an external location. + * + * @return string","$oExportObject = new stdClass(); + $oExportObject->id = $this->id; + foreach ($this as $sPropName => $sPropVal) { + if ('field' == substr($sPropName, 0, 5)) { + $oExportObject->{$sPropName",- +TShopArticle,IsInCategory,"* return parameters needed for a to basket call. + * + * @param bool $bRedirectToBasket - redirect to basket page after adding product + * @param bool $bReplaceBasketContents - set to true if you want the contents of the basket to be replaced by the product wenn added to basket + * @param bool $bGetAjaxParameter - set to true if you want to get basket link for ajax call + * @param string $sMessageConsumer - set custom message consumer + * + * @return array","$bIsInCategory = false; + if (in_array($this->fieldShopCategoryId, $aCategoryList)) { + $bIsInCategory = true;",- +TShopArticle,UpdateProductViewCount,"* generate a link used to add the article to the notice list. + * + * @param bool $bIncludePortalLink - include domain in link + * @param bool $sMsgConsumerName + * + * @return string","if (CMS_SHOP_TRACK_ARTICLE_DETAIL_VIEWS && !is_null($this->id)) { + $this->getProductStatsService()->add($this->id, ProductStatisticsServiceInterface::TYPE_DETAIL_VIEWS, 1);",- +TShopArticle,UpdateStatsReviews,"* return link that can be used to remove the item from the notice list. + * + * @param bool $bIncludePortalLink + * @param string|false $sMsgConsumerName + * + * @return string","$sArticleId = $this->id; + if ($this->IsVariant()) { + $sArticleId = $this->fieldVariantParentId;",- +TShopArticle,GetMetaKeywords,"* return the primary category of the article (usually just the first one found. + * + * @return TdbShopCategory|null","if (strlen(trim(strip_tags($this->fieldMetaKeywords))) > 0) { + $aKeywords = explode(',', trim(strip_tags($this->fieldMetaKeywords)));",- +TShopArticle,GetMetaDescription,@var TdbShopCategory $oCategory,"$sDes = trim($this->fieldMetaDescription); + if (empty($sDes)) { + $sDes = mb_substr(strip_tags($this->fieldDescriptionShort.' '.$this->fieldDescription), 0, 160); + $sDes = trim($sDes); + if (empty($sDes)) { + $sDes = $this->fieldName;",- +TShopArticle,GetOwningBundleItem,"* return all categories assigned to the article. + * + * @param string $sOrderBy + * + * @return TdbShopCategoryList","/** @var TdbShopArticle|null $oOwningBundleItem */ + $oOwningBundleItem = $this->GetFromInternalCache('oOwningBundleItem'); + + if (is_null($oOwningBundleItem)) { + $oOwningBundleItem = false; + if (!is_null($this->id)) { + $query = ""SELECT `shop_article`.* + FROM `shop_article` + INNER JOIN `shop_bundle_article` ON `shop_article`.`id` = `shop_bundle_article`.`shop_article_id` + WHERE `shop_bundle_article`.`bundle_article_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' + ""; + if ($aOwner = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { + $oOwningBundleItem = TdbShopArticle::GetNewInstance(); + $oOwningBundleItem->LoadFromRow($aOwner);",- +TShopArticle,GetOwningBundleConnection,"* return all article groups assigend to the article. + * + * @return TdbShopArticleGroupList","/** @var TdbShopBundleArticle|null $oOwningBundleConnection */ + $oOwningBundleConnection = $this->GetFromInternalCache('oOwningBundleConnection'); + + if (is_null($oOwningBundleConnection)) { + $oOwningBundleConnection = false; + if (!is_null($this->id)) { + $oOwningOrderItem = TdbShopBundleArticle::GetNewInstance(); + /** @var $oOwningOrderItem TdbShopBundleArticle */ + if (!$oOwningOrderItem->LoadFromField('bundle_article_id', $this->id)) { + $oOwningOrderItem = false;",- +TShopArticle,BelongsToABundle,"* used to display an article. + * + * @param string $sViewName - the view to use + * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) + * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here + * @param bool $bAllowCache - set to false if you want to suppress caching for the call + * + * @return string",return false !== $this->GetOwningBundleConnection();,- +TShopArticle,IsVariant,@var $oVariant TdbShopArticle,return !empty($this->fieldVariantParentId);,- +TShopArticle,HasVariants,"* uses message manager to render messages and return them as string. + * + * @param string[] $aMessageConsumerToCheck + * + * @return string","if ($this->IsVariant()) { + return false;",- +TShopArticle,GetFieldShopArticleVariantsList,"* add cache parameters (trigger clear for render). + * + * @param array $aCacheParameters + * + * @return void","$sKey = 'oFieldShopArticleVariantsList'.serialize($aSelectedTypeValues); + if ($bLoadOnlyActive) { + $sKey .= 'active';",- +TShopArticle,GetLowestPricedVariant,"* use this method to add any variables to the render method that you may + * require for some view. + * + * @param string $sViewName - the view being requested + * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) + * + * @return array","$oLowestPrictedVariant = null; + + $oVariants = $this->GetFieldShopArticleVariantsList(); + while ($oVariant = $oVariants->Next()) { + if (is_null($oLowestPrictedVariant) || $oVariant->fieldPrice < $oLowestPrictedVariant->fieldPrice) { + $oLowestPrictedVariant = $oVariant;",- +TShopArticle,GetFieldShopVariantTypeValueList,"* return the preview image for the article using the image size given by sImageSizeName + * Note: if the article has no image, then the view 'no-preview-image-defined' in the article object view dir + * will be rendered instead (viewType will be the same as passed to this function - so make sure to define the view + * in your extensions if you call this method with sViewType = 'Customer'. + * + * @param string $sImageSizeName - sImageSizeName is a system name defined in the shop_article_image_size table + * @param string $sViewName - use view name to render the image using different views (views can be found in ./objectviews/shop/TShopArticlePreviewImage) + * @param string $sViewType - defines in which objectviews dir the system looks for the view (Core, Custom-Core, or Customer) + * @param string[] $aEffects + * + * @return string","$oVariantValueList = $this->GetFromInternalCache('oFieldShopVariantTypeValueList'); + if (is_null($oVariantValueList)) { + $query = ""SELECT `shop_variant_type_value`.* + FROM `shop_variant_type_value` + INNER JOIN `shop_variant_type` ON `shop_variant_type_value`.`shop_variant_type_id` = `shop_variant_type`.`id` + INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id` + WHERE `shop_article_shop_variant_type_value_mlt`.`source_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' + ORDER BY `shop_variant_type`.`position` + ""; + $oVariantValueList = TdbShopVariantTypeValueList::GetList($query, $this->iLanguageId); + $this->SetInternalCache('oFieldShopVariantTypeValueList', $oVariantValueList);",- +TShopArticle,getVariantIDList,@var $oView TViewParser,"$aArticleIdList = array(); + $oVariantList = null; + if ($this->IsVariant()) { + $oParent = $this->GetFieldVariantParent(); + $oVariantList = $oParent->GetFieldShopArticleVariantsList($aSelectedTypeValues, $bLoadActiveOnly);",- +TShopArticle,GetVariantValuesAvailableForType,"* return the primary image object of the shop article. this is either the cms_media_default_preview_image_id + * or the first image in the image list. + * + * @return TdbShopArticleImage|null","$oVariantValueList = null; + $aArticleIdList = $this->getVariantIDList($aSelectedTypeValues, true); + + if (count($aArticleIdList) > 0) { + $query = ""SELECT `shop_variant_type_value`.* + FROM `shop_variant_type_value` + INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id` + WHERE `shop_variant_type_value`.`shop_variant_type_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->id).""' + AND `shop_article_shop_variant_type_value_mlt`.`source_id` IN ('"".implode(""','"", $aArticleIdList).""') + GROUP BY `shop_variant_type_value`.`id` + ORDER BY `shop_variant_type_value`.`"".MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->fieldShopVariantTypeValueCmsfieldname).'` + '; + + $oVariantValueList = TdbShopVariantTypeValueList::GetList($query);",- +TShopArticle,GetVariantValuesAvailableForTypeIncludingInActive,@var TdbShopArticleImage|null $oPrimaryImage,"$oVariantValueList = null; + $aArticleIdList = $this->getVariantIDList($aSelectedTypeValues, false); + + if (count($aArticleIdList) > 0) { + $query = ""SELECT `shop_variant_type_value`.*, SUM(CASE WHEN `shop_article`.`active` = '1' THEN 1 ELSE 0 END) AS articleactive + FROM `shop_variant_type_value` + INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id` + LEFT JOIN `shop_article` ON `shop_article`.`id` = `shop_article_shop_variant_type_value_mlt`.`source_id` + WHERE `shop_variant_type_value`.`shop_variant_type_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->id).""' + AND `shop_article_shop_variant_type_value_mlt`.`source_id` IN ('"".implode(""','"", $aArticleIdList).""') + GROUP BY `shop_variant_type_value`.`id` + ORDER BY `shop_variant_type_value`.`"".MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->fieldShopVariantTypeValueCmsfieldname).'` + '; + $oVariantValueList = TdbShopVariantTypeValueList::GetList($query);",- +TShopArticle,GetVariantsForVariantTypeName,"* Enter description here... + * + * @param string $sImageSizeName - the image size name (found in shop_article_image_size) + * + * @return TdbShopArticlePreviewImage|null","/** @var TdbShopArticleList|null $oArticleList */ + $oArticleList = $this->GetFromInternalCache('VariantsForVariantTypeName'.$sVariantTypeIdentifier); + + if (is_null($oArticleList)) { + $oArticleList = null; + $oVariantSet = $this->GetFieldShopVariantSet(); + if (!is_null($oVariantSet)) { + $oVariantType = $oVariantSet->GetVariantTypeForIdentifier($sVariantTypeIdentifier); + if (!is_null($oVariantType)) { + $sQueryAddition = ''; + if ($this->IsVariant()) { + $sCommmonParentId = $this->fieldVariantParentId; + // make sure the current article is part of the list + $sActingValueForTypeId = $this->GetVariantTypeActiveValue($oVariantType->id); + $sQueryAddition .= ""AND ((`shop_article`.`id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' AND `shop_variant_type_value`.`id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($sActingValueForTypeId).""') OR (`shop_article`.`id` != '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' AND `shop_variant_type_value`.`id` != '"".MySqlLegacySupport::getInstance()->real_escape_string($sActingValueForTypeId).""'))"";",- +TShopArticle,GetActiveVariantValue,"* returns an array with all table names that are relevant for the render function. + * + * @param string $sViewName - the view name being requested (if know by the caller) + * @param string $sViewType - the view type (core, custom-core, customer) being requested (if know by the caller) + * + * @return string[]","$oVariantValueObject = null; + + /** + * Use variant type name as key + * @var array|null $aVariantValues + */ + $aVariantValues = $this->GetFromInternalCache('aActiveVariantValues'); + + if (is_null($aVariantValues)) { + $query = ""SELECT `shop_variant_type_value`.*, `shop_variant_type`.`identifier` AS variantTypeName + FROM `shop_variant_type_value` + INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id` + INNER JOIN `shop_variant_type` ON `shop_variant_type_value`.`shop_variant_type_id` = `shop_variant_type`.`id` + WHERE `shop_article_shop_variant_type_value_mlt`.`source_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' + ""; + $oVariantValues = TdbShopVariantTypeValueList::GetList($query); + while ($oVariantValue = $oVariantValues->Next()) { + $aVariantValues[$oVariantValue->sqlData['variantTypeName']] = $oVariantValue;",- +TShopArticle,GetVariantTypeActiveValue,"* return true if the article is in at least one of the groups. + * + * @param array $aGroupList + * + * @return bool","$sValue = false; + + /** + * Mapping of variant type id => variant type values id + * @var array|null $aVariantValueIds + */ + $aVariantValueIds = $this->GetFromInternalCache('aActiveVariantValueIds'); + + if (is_null($aVariantValueIds)) { + $oValueList = $this->GetFieldShopVariantTypeValueList(); + while ($oValue = $oValueList->Next()) { + $aVariantValueIds[$oValue->fieldShopVariantTypeId] = $oValue->id;",- +TShopArticle,RenderVariantSelection,"* returns an article object with additional elements needed for exports and + * interfaces like full URL image links, attachment links and so on. + * + * When called from CMS BackEnd it WILL use the first portal/shop found + * + * @return stdClass","$sHTML = ''; + $oVariantSet = null; + if ($this->IsVariant()) { + $oParent = $this->GetFieldVariantParent(); + + $oVariantSet = $oParent->GetFieldShopVariantSet();",- +TShopArticle,GetVariantFromValues,"* return true if the article is in at least one of the categories. + * + * @param array $aCategoryList + * + * @return bool","$oArticle = null; + if (!$this->IsVariant()) { + $query = ""SELECT `shop_article`.* + FROM `shop_article` + INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_article`.`id` = `shop_article_shop_variant_type_value_mlt`.`source_id` + INNER JOIN `shop_variant_type_value` ON `shop_article_shop_variant_type_value_mlt`.`target_id` = `shop_variant_type_value`.`id` + WHERE `shop_article`.`variant_parent_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' + ""; + $aParts = array(); + foreach ($aTypeValuePairs as $sVariantTypeId => $sVariantTypeValueId) { + $aParts[] = ""`shop_variant_type_value`.`shop_variant_type_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($sVariantTypeId).""' AND `shop_variant_type_value`.`id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($sVariantTypeValueId).""'"";",- +TShopArticle,GetFieldShopArticleImageList,"* increase the product view counter by one. + * + * @return void","$oImages = $this->GetFromInternalCache('FieldShopArticleImageList'); + if (is_null($oImages)) { + $query = TdbShopArticleImageList::GetDefaultQuery($this->iLanguageId, ""`shop_article_image`.`shop_article_id`= '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' AND `shop_article_image`.`cms_media_id` NOT IN ('','0','1','2','3','4','5','6','7','8','9','11','12','13','14')""); // exclude broken records and template images + $oImages = TdbShopArticleImageList::GetList($query); + $oImages->bAllowItemCache = true; + if (0 == $oImages->Length() && $this->IsVariant()) { + $oParent = $this->GetFieldVariantParent(); + if ($oParent) { + $oImages = $oParent->GetFieldShopArticleImageList();",- +TShopArticle,GetMessageConsumerName,"* updates the review stats for the article. + * + * @return void","$sId = $this->id; + if ($this->IsVariant()) { + $sId = $this->fieldVariantParentId;",- +TShopArticle,GetFieldShopBundleArticleList,"* return keywords for the meta tag on article detail pages. + * + * @return array","$oBundleList = parent::GetFieldShopBundleArticleList(); + if (0 == $oBundleList->Length() && $this->IsVariant()) { + $oBundleList = $this->GetFieldVariantParent()->GetFieldShopBundleArticleList();",- +TShopArticle,GetFieldShopArticleMarkerList,"* return meta description. + * + * @return string","$oMarkerList = $this->GetMLT('shop_article_marker_mlt', 'TdbShopArticleMarker', $sOrderBy, 'CMSDataObjects', 'Core'); + if (0 == $oMarkerList->Length() && $this->IsVariant()) { + $oMarkerList = $this->GetFieldVariantParent()->GetFieldShopArticleMarkerList($sOrderBy);",- +TShopArticle,GetFieldShopAttributeValueList,"* loads the owning bundle order item IF this item belongs to a bundle. returns false if it is not. + * + * @return TdbShopArticle|false","$oAttributeValueList = parent::GetFieldShopAttributeValueList($sOrderBy); + if (0 == $oAttributeValueList->Length() && $this->IsVariant()) { + $oAttributeValueList = $this->GetFieldVariantParent()->GetFieldShopAttributeValueList($sOrderBy);",- +TShopArticle,GetNameSEO,@var TdbShopArticle|null $oOwningBundleItem,"$sFullProductName = $this->GetFromInternalCache('sFullSEOName'); + if (is_null($sFullProductName)) { + $sFullProductName = ''; + $oManufacturer = $this->GetFieldShopManufacturer(); + if ($oManufacturer) { + $sFullProductName .= $oManufacturer->fieldName.': ';",- +TShopArticle,GetBreadcrumbName,"* if this order item belongs to a bundle, then this method will return the connecting table. + * + * @return TdbShopBundleArticle|false",return $this->GetName();,- +TShopArticle,GetSeoPattern,@var TdbShopBundleArticle|null $oOwningBundleConnection,"//$sPaternIn = ""[{PORTAL_NAME",- +TShopArticle,GetFieldShopVariantSet,@var $oOwningOrderItem TdbShopBundleArticle,"/** @var TdbShopVariantSet|null $oItem */ + $oItem = $this->GetFromInternalCache('oFieldShopVariantSet'); + + if (null === $oItem) { + $oItem = parent::GetFieldShopVariantSet(); + if (null === $oItem && $this->IsVariant()) { + $oParent = $this->GetFieldVariantParent(); + $oItem = $oParent->GetFieldShopVariantSet();",- +TShopArticle,IsBuyable,"* returns true if the item belongs to a bundle. + * + * @return bool","$bIsBuyable = $this->GetFromInternalCache('bIsBuyable'); + if (is_null($bIsBuyable)) { + $bIsBuyable = $this->isActive(); + if ($bIsBuyable) { + $oShopConfig = TdbShop::GetInstance(); + + if (isset($oShopConfig->fieldAllowPurchaseOfVariantParents) && + !$oShopConfig->fieldAllowPurchaseOfVariantParents && + ($this->HasVariants() || ('' != $this->fieldShopVariantSetId && false === $this->IsVariant()))) { + $bIsBuyable = false;",- +TShopArticle,UpdateStock,"* return true if the article is a variant. + * + * @return bool","if ($this->HasVariants()) { + return false;",- +TShopArticle,setIsActive,"* return true if the article has variants. + * + * @param bool $bCheckForActiveVariantsOnly + * + * @return bool","if ($this->fieldActive === $isActive) { + return;",- +TShopArticle,setVariantParentActive,"* load list of article variants. + * + * @param array $aSelectedTypeValues - restrict list to values matching this preselection (format: array(shop_variant_type_id=>shop_variant_type_value_id,...) + * @param bool $bLoadOnlyActive + * + * @return TdbShopArticleList","if (true === $isActive) { + $activeValue = 1;",- +TShopArticle,CheckActivateOrDeactivate,"* return variant with the lowest price. + * + * @return TdbShopArticle|null","if (null === $dNewStockValue) { + $dNewStockValue = $this->getAvailableStock();",- +TShopArticle,GetFieldShopStockMessage,* {@inheritdoc},"$oItem = $this->GetFromInternalCache('oLookupshop_stock_message_id'); + if (null === $oItem) { + $oItem = $this->getShopStockMessageDataAccess()->getStockMessage($this->fieldShopStockMessageId, $this->iLanguageId); + if (null !== $oItem) { + $this->SetInternalCache('oLookupshop_stock_message_id', $oItem);",- +TShopArticle,TotalStockAvailable,"* returns an array of IDs of all variant articles of this article. + * + * @param array $aSelectedTypeValues - restrict list to values matching this preselection (format: array(shop_variant_type_id=>shop_variant_type_value_id,...) + * @param bool $bLoadActiveOnly - set to false if you want to load inactive articles too + * + * @return array","$bStock = $this->getAvailableStock(); + // if the article is set to auto deactivate on zero stock, we have a limited + // supply. if on the other hand, the article remains active on zero stock, we have an + // unlimited supply + if (1 == $this->CheckActivateOrDeactivate(0)) { + // we may also not allow any more purchases than available stock, if the article is marked as show_preorder_on_zero_stock + if (false == $this->fieldShowPreorderOnZeroStock) { + $bStock = 999999;",- +TShopArticle,getAvailableStock,"* return all variant values that are available for the given type and this article. + * + * @param TdbShopVariantType $oVariantType + * @param array $aSelectedTypeValues - restrict list to values matching this preselection (format: array(shop_variant_type_id=>shop_variant_type_value_id,...) + * + * @return TdbShopVariantTypeValueList|null",return $this->getInventoryService()->getAvailableStock($this->id);,- +TShopArticle,GetDiscountList,"* return all variant values that are available for the given type and this article. + * + * @param TdbShopVariantType $oVariantType + * @param array $aSelectedTypeValues - restrict list to values matching this preselection (format: array(shop_variant_type_id=>shop_variant_type_value_id,...) + * + * @return TdbShopVariantTypeValueList|null","$sDiscountListKey = 'oArticlePotentialDiscountList'; + if ($bIncludeUserRestrictedDiscounts) { + $sDiscountListKey .= '-IncludesUserDiscounts';",- +TShopArticle,GetPriceIfDiscounted,"* returns a list of variants for the current article each with a unqiue value for $sVariantTypeIdentifier. + * + * @param string $sVariantTypeIdentifier + * + * @return TdbShopArticleList|null","$dPrice = $this->GetFromInternalCache('dDiscountedPrice'); + if (is_null($dPrice)) { + $dPrice = $this->dPrice; + $dDiscountSum = 0; + $oDiscountList = $this->GetDiscountList(); + if ($oDiscountList && $oDiscountList->Length() > 0) { + $oDiscountList->GoToStart(); + while ($oDiscount = $oDiscountList->Next()) { + if ('prozent' == $oDiscount->fieldValueType) { + $dDiscountSum += round($dPrice * ($oDiscount->fieldValue / 100), 2);",- +TShopArticle,SetPriceBasedOnActiveDiscounts,@var TdbShopArticleList|null $oArticleList,"// this should only ever be executed once... + $bDiscountedPriceUsed = $this->GetFromInternalCache('bDiscountedPriceUsed'); + if (is_null($bDiscountedPriceUsed) || false == $bDiscountedPriceUsed) { + $bDiscountedPriceUsed = true; + $dDiscountValue = $this->GetPriceIfDiscounted(); + if ($dDiscountValue < $this->fieldPrice) { + $this->aPriceBeforeDiscount['fieldPrice'] = $this->fieldPrice; + $this->aPriceBeforeDiscount['fieldPriceReference'] = $this->fieldPriceReference; + $oLocal = TCMSLocal::GetActive(); + $this->fieldPriceReference = $this->fieldPrice; + $this->fieldPriceReferenceFormated = $this->fieldPriceFormated; + $this->fieldPrice = $dDiscountValue; + $this->fieldPriceFormated = $oLocal->FormatNumber($dDiscountValue, 2); + $this->dPrice = $this->fieldPrice;",- +TShopArticle,getPriceWithoutActiveDiscounts,"* returns the variant type value for the given identifier. + * + * note: there was a typo in the method name GetActiveVaraintValue + * please change your custom code to use the renamed method + * (the old method name is redirected, but will be removed in the future) + * + * @param string $sVariantTypeIdentifier + * + * @return TdbShopVariantTypeValue|null - returns null if $sVariantTypeIdentifier was not found","if (true === isset($this->aPriceBeforeDiscount['fieldPrice'])) { + return $this->aPriceBeforeDiscount['fieldPrice'];",- +TShopArticle,getPriceReferenceWithoutActiveDiscounts,"* Use variant type name as key + * @var array|null $aVariantValues","if (true === isset($this->aPriceBeforeDiscount['fieldPriceReference'])) { + return $this->aPriceBeforeDiscount['fieldPriceReference'];",- +TShopArticle,__call,"* returns the id of the active value for the given variant type. + * + * @param string $sVariantTypeId + * + * @return string|false","$aBackwardsCompatMethods = array(); + $aBackwardsCompatMethods['GetActiveVaraintValue'] = 'GetActiveVariantValue'; + + if (array_key_exists($name, $aBackwardsCompatMethods)) { + $sNewMethodName = $aBackwardsCompatMethods[$name]; + + return $this->$sNewMethodName(implode(', ', $arguments));",- +TShopArticle,getToBasketLinkBasketParameters,"* Mapping of variant type id => variant type values id + * @var array|null $aVariantValueIds","$oShopConfig = TdbShop::GetInstance(); + $aBasketData = array(); + $aParameters = array(); + if ($bGetAjaxParameter) { + $aModuleFnc = array($oShopConfig->GetBasketModuleSpotName() => 'ExecuteAjaxCall'); + $aParameters['_fnc'] = 'AddToBasketAjax';",- +TShopArticle,getToBasketLinkBasketParametersOnly,"* render the variant selection html using the display handler defined through the variant set. + * + * @param string $sViewName + * @param string $sViewType + * + * @return string","$aParameters = $this->getToBasketLinkBasketParameters($bRedirectToBasket, $bReplaceBasketContents, $bGetAjaxParameter, $sMessageConsumer); + + return $this->generateLinkForToBasketParameters($aParameters, $bIncludePortalLink);",- +TShopArticle,isActive,"* return the variant matching the shop_variant_type_value paris. + * + * @param array $aTypeValuePairs + * + * @return TdbShopArticle|null + * + * @deprecated since 6.2.13 - replaced by ProductVariantServiceInterface::getProductBasedOnSelection()",return $this->fieldActive && $this->fieldVariantParentIsActive;,- +TShopArticleCatalogConf,GetDefaultOrderBy,"* Returns the active order by for the given category. + * + * @param TdbShopCategory $oActiveCategory + * + * @return string","$sDefaultOrderBy = $this->fieldShopModuleArticlelistOrderbyId; + + $bDone = false; + $sActiveCategoryId = $oActiveCategory->id; + + do { + // is there another order by set for this category or any of its parents + $query = ""SELECT `shop_category`.`id`, `shop_category`.`url_path`, `shop_category`.`shop_category_id`, + `shop_article_catalog_conf_default_order`.`shop_module_articlelist_orderby_id` + FROM `shop_category` + LEFT JOIN `shop_article_catalog_conf_default_order_shop_category_mlt` ON `shop_category`.`id` = `shop_article_catalog_conf_default_order_shop_category_mlt`.`target_id` + LEFT JOIN `shop_article_catalog_conf_default_order` ON (`shop_article_catalog_conf_default_order_shop_category_mlt`.`source_id` = `shop_article_catalog_conf_default_order`.`id` AND `shop_article_catalog_conf_default_order`.`shop_article_catalog_conf_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""') + WHERE `shop_category`.`id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($sActiveCategoryId).""' + ""; + if ($aCategoryDetails = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { + if (isset($aCategoryDetails['shop_module_articlelist_orderby_id']) && !empty($aCategoryDetails['shop_module_articlelist_orderby_id'])) { + $bDone = true; + $sDefaultOrderBy = $aCategoryDetails['shop_module_articlelist_orderby_id'];",- +TShopArticleGroup,GetVat,"* return the vat group of the article group. + * + * @return TdbShopVat|null",return $this->GetFieldShopVat();,- +TShopArticleGroupList,GetMaxVat,"* return article group list for an article. + * + * @param int $iArticleId + * + * @return TdbShopArticleGroupList","$iPointer = $this->getItemPointer(); + $oMaxVatItem = null; + $this->GoToStart(); + while ($oItem = $this->Next()) { + $oCurrentVat = $oItem->GetVat(); + if (!is_null($oCurrentVat)) { + if (is_null($oMaxVatItem)) { + $oMaxVatItem = $oCurrentVat;",- +TShopArticleList,Render,"* identifies the list object with a module spot. + * + * @var string","$oView = new TViewParser(); + $sViewIdentKey = $this->StoreListObjectInSession($sViewName, $sViewType, $aCallTimeVars); + $this->GoToStart(); + $oView->AddVar('oArticleList', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $oView->AddVar('sViewIdentKey', $sViewIdentKey); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, TdbShopArticleList::VIEW_PATH, $sViewType);",- +TShopArticleList,GetListIdentKey,"* returns a subquery that can be used to reduce a query set to only active articles. + * + * @param bool $bRestrictToVariantParentArticles + * + * @return string","if (null === $this->sListIdentKey) { + $oGlobal = TGlobal::instance(); + $oExecutingModule = $oGlobal->GetExecutingModulePointer(); + $this->sListIdentKey = $oExecutingModule->sModuleSpotName;",- +TShopArticleList,StoreListObjectInSession,"* return active article list for the given category id. + * + * @param int $iCategoryId - this may alos be an ARRAY! in that case all articles from any of the listed categories IDs will be returned + * @param string $sOrderString + * @param int $iLimit + * @param array $aFilter - any filters you want to add to the list + * + * @return TdbShopArticleList","$oGlobal = TGlobal::instance(); + $sItemKey = $this->GetListIdentKey(); + $oExecutingModule = $oGlobal->GetExecutingModulePointer(); + + if (!array_key_exists(TdbShopArticleList::SESSIN_DUMP_NAME, $_SESSION)) { + $_SESSION[TdbShopArticleList::SESSIN_DUMP_NAME] = array();",- +TShopArticleList,RestorePagingInfoFromSession,"* return active article list for the given category id. + * + * @param array $aCategoryIdList - an array of categories + * @param string $sOrderString + * @param int $iLimit + * @param array $aFilter - any filters you want to add to the list + * @param string $sCustomBaseQuery + * + * @return TdbShopArticleList","$identKey = $this->GetListIdentKey(); + $aTmpData = TdbShopArticleList::GetInstanceDataFromSession($identKey); + $bPagingWasRestoredFromSession = false; + if (!is_null($aTmpData)) { + $bPagingWasRestoredFromSession = $this->SetPagingInfo($aTmpData['iStartRecord'], $aTmpData['iPageSize']);",- +TShopArticleList,GetNextPageLink,"* for some reason, ordering the subquery with a select on only id and then joining that with the full article table is a) super fast and b) results in the correct order + * while select all records right away on the order query is extremely slow (factor 10).","$sLink = false; + if ($this->HasNextPage()) { + $oGlobal = TGlobal::instance(); + $oExecutingModule = $oGlobal->GetExecutingModulePointer(); + $aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'ChangePage', TdbShopArticleList::URL_LIST_KEY_NAME => $this->GetListIdentKey(), TdbShopArticleList::URL_LIST_REQUEST => 'NextPage', TdbShopArticleList::URL_LIST_CURRENT_PAGE => $this->GetCurrentPageNumber()); + $sLink = $this->getActivePageService()->getLinkToActivePageRelative($aAdditionalParameters, TdbShopArticleList::GetParametersToIgnoreInPageLinks());",- +TShopArticleList,GetNextPageLinkAsAJAXCall,"* return active article list. + * + * @param int $iCategoryId + * @param string $sOrderString + * @param int $iLimit + * @param array $aFilter - any filters you want to add to the list + * + * @return TdbShopArticleList","$sLink = false; + if ($this->HasNextPage()) { + $oGlobal = TGlobal::instance(); + $oExecutingModule = $oGlobal->GetExecutingModulePointer(); + $aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'ExecuteAjaxCall', '_fnc' => 'ChangePageAjax', TdbShopArticleList::URL_LIST_KEY_NAME => $this->GetListIdentKey(), TdbShopArticleList::URL_LIST_REQUEST => 'NextPage', + ); + $sLink = $this->getActivePageService()->getLinkToActivePageRelative($aAdditionalParameters, TdbShopArticleList::GetParametersToIgnoreInPageLinks()); + if ($bGetAsJSFunction) { + $sLink = ""GetAjaxCall('{$sLink",- +TShopArticleList,GetPreviousPageLinkAsAJAXCall,"* used to display the article list. + * + * @param string $sViewName - the view to use + * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) + * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here + * + * @return string","$sLink = false; + if ($this->HasPreviousPage()) { + $oGlobal = TGlobal::instance(); + $oExecutingModule = $oGlobal->GetExecutingModulePointer(); + $aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'ExecuteAjaxCall', '_fnc' => 'ChangePageAjax', TdbShopArticleList::URL_LIST_KEY_NAME => $this->GetListIdentKey(), TdbShopArticleList::URL_LIST_REQUEST => 'PreviousPage', TdbShopArticleList::URL_LIST_CURRENT_PAGE => $this->GetCurrentPageNumber() - 2, + ); + $sLink = $this->getActivePageService()->getLinkToActivePageRelative($aAdditionalParameters, TdbShopArticleList::GetParametersToIgnoreInPageLinks()); + if ($bGetAsJSFunction) { + $sLink = ""GetAjaxCall('{$sLink",- +TShopArticleList,GetPreviousPageLink,"* return an IdentKey for this list. + * + * @return string","$sLink = false; + if ($this->HasPreviousPage()) { + $oGlobal = TGlobal::instance(); + $oExecutingModule = $oGlobal->GetExecutingModulePointer(); + $aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'ChangePage', TdbShopArticleList::URL_LIST_KEY_NAME => $this->GetListIdentKey(), TdbShopArticleList::URL_LIST_REQUEST => 'PreviousPage', TdbShopArticleList::URL_LIST_CURRENT_PAGE => ($this->GetCurrentPageNumber() - 2)); + $sLink = $this->getActivePageService()->getLinkToActivePageRelative($aAdditionalParameters, TdbShopArticleList::GetParametersToIgnoreInPageLinks());",- +TShopArticleList,GetPageJumpLinkAsAJAXCall,"* restore serialized dump in session. returns id key for item. also calls + * session cleanup method. + * + * @return string + * + * @param null|string $sViewName + * @param null|string $sViewType + * @param array|null $aCallTimeVars","$sLink = false; + if ($iPageNumber < $this->GetTotalPageCount()) { + $oGlobal = TGlobal::instance(); + $oExecutingModule = $oGlobal->GetExecutingModulePointer(); + $aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'ExecuteAjaxCall', '_fnc' => 'ChangePageAjax', TdbShopArticleList::URL_LIST_KEY_NAME => $this->GetListIdentKey(), TdbShopArticleList::URL_LIST_REQUEST => 'GoToPage', TdbShopArticleList::URL_LIST_CURRENT_PAGE => $iPageNumber, + ); + $sLink = $this->getActivePageService()->getLinkToActivePageRelative($aAdditionalParameters, TdbShopArticleList::GetParametersToIgnoreInPageLinks()); + if ($bGetAsJSFunction) { + $sLink = ""GetAjaxCall('{$sLink",- +TShopArticleList,GetPageJumpLink,"* return list data for key stored in session. returns NULL if no item or no session is found + * note: the item will be removed from session. + * + * @param string $sListSessionKey + * + * @return array|null","$sLink = false; + if ($iPageNumber < $this->GetTotalPageCount()) { + $oGlobal = TGlobal::instance(); + $oExecutingModule = $oGlobal->GetExecutingModulePointer(); + $aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'ChangePage', TdbShopArticleList::URL_LIST_KEY_NAME => $this->GetListIdentKey(), TdbShopArticleList::URL_LIST_REQUEST => 'GoToPage', TdbShopArticleList::URL_LIST_CURRENT_PAGE => $iPageNumber); + $sLink = $this->getActivePageService()->getLinkToActivePageRelative($aAdditionalParameters, TdbShopArticleList::GetParametersToIgnoreInPageLinks());",- +TShopArticleList,HandleURLRequest,"* create a list based on the session data for the session key passed + * returns NULL if the object can not be found. + * + * @param string $sListSessionKey + * + * @return TdbShopArticleList|null","$bAllowRequest = true; + if ($bCheckIdentKey) { + $currentListKey = $this->GetListIdentKey(); + $oGlobal = TGlobal::instance(); + $callingIdentKey = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_KEY_NAME); + if ($callingIdentKey != $currentListKey) { + $bAllowRequest = false;",- +TShopArticlePreviewImage,LoadByName,"* the connected article. + * + * @var TdbShopArticle","$bLoaded = false; + $this->oArticle = $oArticle; + $this->oImageSize = TdbShopArticleImageSize::GetNewInstance(); + /** @var $oImageSize TdbShopArticleImageSize */ + if ($this->oImageSize->LoadFromField('name_internal', $sInternalName)) { + if ($this->LoadFromFields(array('shop_article_id' => $oArticle->id, 'shop_article_image_size_id' => $this->oImageSize->id))) { + $bLoaded = true;",- +TShopArticlePreviewImage,Render,"* the preview image object. + * + * @var TCMSImage","$oView = new TViewParser(); + + $oArticle = $this->GetArticleObject(); + $oArticleSize = $this->GetImageSizeObject(); + $oImage = $this->GetImageObject(); + + $oView->AddVar('oArticle', $oArticle); + $oView->AddVar('oImageSize', $oArticleSize); + $oView->AddVar('oImage', $oImage); + $oView->AddVar('oPreviewImage', $this); + $oView->AddVar('bHideNewMarker', $bHideNewMarker); + $oThumb = $this->GetImageThumbnailObject($aEffects); + $oView->AddVar('oImageThumbnail', $oThumb); + + return $oView->RenderObjectPackageView($sView, self::VIEW_PATH, $type);",- +TShopArticlePreviewImage,GetArticleObject,"* the image size of the preview image. + * + * @var TdbShopArticleImageSize","if (is_null($this->oArticle)) { + $this->oArticle = TdbShopArticle::GetNewInstance(); + if (!$this->oArticle->Load($this->sqlData['shop_article_id'])) { + $this->oArticle = null;",- +TShopArticlePreviewImage,GetImageObject,"* return the image preview object. if the shop did not define one for this size, + * then we create a virtual instance based on the first image of the article. + * + * @param TdbShopArticle $oArticle - the article object + * @param string $sInternalName - image size name + * + * @return bool","if (is_null($this->oImage)) { + $this->oImage = $this->GetImage(0, 'cms_media_id', true);",- +TShopArticlePreviewImage,GetImageThumbnailObject,@var $oImageSize TdbShopArticleImageSize,"$oImageSize = $this->GetImageSizeObject(); + $oImage = $this->GetImageObject(); + $oThumb = null; + TdbCmsConfigImagemagick::SetEnableEffects(true); + $bEnableEffects = TdbCmsConfigImagemagick::GetEnableEffects(); + + if ($oImageSize->fieldForceSize) { + $oThumb = $oImage->GetForcedSizeThumbnail($oImageSize->fieldWidth, $oImageSize->fieldHeight);",- +TShopArticlePreviewImage,GetImageSizeObject,@var $oPrimaryImage TdbShopArticleImage,"if (is_null($this->oImageSize)) { + $this->oImageSize = TdbShopArticleImageSize::GetNewInstance(); + if (!$this->oImageSize->Load($this->sqlData['shop_article_image_size_id'])) { + $this->oImageSize = null;",- +TShopArticleReview,GetReviewAgeAsString,"* return the age of the review as a string. + * + * @return string","$iNow = time(); + $dYear = date('Y', $iNow); + $dMonth = date('n', $iNow); + $dDay = date('j', $iNow); + $dHour = date('G', $iNow); + $dMin = date('i', $iNow); + if ('0' == substr($dMin, 0, 1)) { + $dMin = substr($dMin, 1);",- +TShopArticleReview,Render,"* used to display an article. + * + * @param string $sViewName - the view to use + * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) + * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here + * @param bool $bAllowCache + * + * @return string","$oView = new TViewParser(); + $oView->AddVar('oReview', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopArticleReview,LoadFromRowProtected,"* @param string $id + * @param array $aCallTimeVars + * + * @return array","$whitelist = $this->getFieldWhitelistForLoadByRow(); + $safeData = []; + foreach ($aRow as $key => $val) { + if (\in_array($key, $whitelist, true)) { + $safeData[$key] = $val;",- +TShopArticleReview,SendNewReviewNotification,"* use this method to add any variables to the render method that you may + * require for some view. + * + * @param string $sViewName - the view being requested + * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) + * + * @return array","$oMail = TDataMailProfile::GetProfile('shop-new-review'); + $aData = $this->sqlData; + $oArticle = $this->GetFieldShopArticle(); + $aData['ArtikelName'] = $oArticle->GetName(); + $oMail->AddDataArray($aData); + $oMail->SendUsingObjectView('emails', 'Customer');",- +TShopArticleReviewList,GetAverageScore,"* set to the owning article id, if list is generated via GetPublishedReviews. + * + * @var string","$dAvgScore = 0; + if ($this->Length() > 0) { + $iPt = $this->getItemPointer(); + $this->GoToStart(); + $dScore = 0; + while ($oitem = $this->Next()) { + $dScore += $oitem->fieldRating;",- +TShopArticleReviewList,SetOwningArticleId,"* return the average score for the review list. + * + * @return float",$this->iArticleId = $iArticleId;,- +TShopArticleReviewList,Render,"* return all published items. + * + * @param int $iArticle + * @param int $iLanguage + * + * @return TdbShopArticleReviewList","$oView = new TViewParser(); + $oView->AddVar('oReviewList', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $oView->AddVar('iArticleId', $this->iArticleId); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopBundleArticle,Render,"* used to display an article. + * + * @param string $sViewName - the view to use + * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) + * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here + * + * @return string","$oView = new TViewParser(); + $oView->AddVar('oShopBundleArticle', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopBundleArticleList,Render,"* used to display an article. + * + * @param string $sViewName - the view to use + * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) + * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here + * + * @return string","$oView = new TViewParser(); + $oView->AddVar('oShopBundleArticleList', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopCategory,GetVat,"* return the vat group of the category. + * + * @return TdbShopVat|null",return $this->GetFieldShopVat();,- +TShopCategory,GetSearchRestrictionLink,"* returns a link that restricts the current search to the category. + * + * @return string","// get current search... then add filter + $oShop = $this->getShopService()->getActiveShop(); + $oSearchCache = $oShop->GetActiveSearchObject(); + //$oSearchCache->aFilter[TdbShopCategory::FILTER_KEY_NAME] = $this->id; + return $oSearchCache->GetSearchLink(array(TdbShopCategory::FILTER_KEY_NAME => $this->id));",- +TShopCategory,GetLink,"* return the link to the category. note: if the category is connected to a primary navi + * of the shop AND that navi node also has a page attached, then we return the link + * to that page, instead of the link to the category (this allows us to create category entry pages). + * + * @param bool $bAbsolute - set to true if you want to include the domain in the link (absolute link) + * @param string $sAnchor - Anchor to add to the link (Part after #) + * @param array $aOptionalParameters + * @param TdbCmsPortal $portal + * @param TdbCmsLanguage $language + * + * @return string","$sInternalCacheKey = 'sLinkToCategory'; + if ($bAbsolute) { + $sInternalCacheKey .= 'WithPortal';",- +TShopCategory,GetURLPath,"* returns a URL escaped path to the current category. + * + * @return string",return $this->fieldUrlPath;,- +TShopCategory,GetAllChildrenIds,"* return an ID list of all child categories (complete depth). + * + * @return array","$aChildIdList = $this->GetFromInternalCache('aChildIdList'); + if (null !== $aChildIdList) { + return $aChildIdList;",- +TShopCategory,GetChildren,"* return all children of this category. + * + * @return TdbShopCategoryList","return TdbShopCategoryList::GetChildCategories($this->id, null, $this->GetLanguage());",- +TShopCategory,GetNumberOfArticlesInCategory,"* returns a count of the number of articles in the category. the method caches + * the data since a count is expensive. + * + * @param bool $bIncludeSubcategoriesInCount + * + * @return int","if ($bIncludeSubcategoriesInCount) { + $oArticleList = $this->GetArticleListIncludingSubcategories();",- +TShopCategory,GetArticleList,"* return article list for current category + * note: the result ist cached in the class instance... + * + * @param string $sOrderBy + * @param array $aFilter - any filter restrictions you want to add (must be filds within the shop table) + * + * @return TdbShopArticleList","$oCategoryArticles = $this->GetFromInternalCache('oArticleList'); + if (is_null($oCategoryArticles)) { + $oCategoryArticles = TdbShopArticleList::LoadCategoryArticleList($this->id, $sOrderBy, -1, $aFilter); + $this->SetInternalCache('oArticleList', $oCategoryArticles);",- +TShopCategory,GetArticleListIncludingSubcategories,"* return article list for current category including articles for all subcategories + * note: the result ist cached in the class instance... + * + * @param string $sOrderBy + * @param array $aFilter - any filter restrictions you want to add (must be filds within the shop table) + * + * @return TdbShopArticleList","$sCacheKey = $this->getCacheKeyForArticleList($sOrderBy, $aFilter); + $oCategoryArticles = $this->GetFromInternalCache($sCacheKey); + if (is_null($oCategoryArticles)) { + $aCategoryIds = $this->GetAllChildrenIds(); + $aCategoryIds[] = $this->id; + $oCategoryArticles = TdbShopArticleList::LoadCategoryArticleListForCategoryList($aCategoryIds, $sOrderBy, -1, $aFilter); + $this->SetInternalCache($sCacheKey, $oCategoryArticles);",- +TShopCategory,GetParent,"* @param null|string $sOrderBy + * @param array $aFilter + * + * @return string","$oParent = null; + if (!empty($this->fieldShopCategoryId)) { + $oParent = TdbShopCategory::GetNewInstance(); + $oParent->SetLanguage($this->iLanguageId); + if (!$oParent->Load($this->fieldShopCategoryId)) { + $oParent = null;",- +TShopCategory,IsInActivePath,"* return the parent category, or null if no parent is found. + * + * @return TdbShopCategory|null","/** @var true|null $bIsInActivePath */ + $bIsInActivePath = $this->GetFromInternalCache('bIsInActivePath'); + if (is_null($bIsInActivePath)) { + $aCatPath = TdbShop::GetActiveCategoryPath(); + if (!is_null($aCatPath) && array_key_exists($this->id, $aCatPath)) { + $bIsInActivePath = true;",- +TShopCategory,IsInCategoryPath,"* returns true if this category is in the active category path (ie is the active + * category, or a parent of the active category). + * + * @return true|null","$oBreadCrumb = $this->GetBreadcrumb(); + $oMatchingNode = $oBreadCrumb->FindItemWithProperty('id', $sCategoryId); + if ($oMatchingNode) { + return true;",- +TShopCategory,GetCategoryPathAsString,@var true|null $bIsInActivePath,"$sKey = 'sCatPathCache'.$sSeparator; + + $sPath = $this->GetFromInternalCache($sKey); + if (is_null($sPath)) { + $sPath = ''; + $oParent = $this->GetParent(); + if ($oParent) { + $sPath = $oParent->GetCategoryPathAsString($sSeparator);",- +TShopCategory,GetRootCategory,"* return true if the category id passed is in the path to this category. + * + * @param string $sCategoryId + * + * @return bool","/** @var TdbShopCategory|null $oRootCategory */ + $oRootCategory = $this->GetFromInternalCache('oRootCategory'); + + if (is_null($oRootCategory)) { + $oRootCategory = clone $this; + while (!empty($oRootCategory->fieldShopCategoryId)) { + /** @var TdbShopCategory $oRootCategory */ + $oRootCategory = $oRootCategory->GetParent();",- +TShopCategory,GetBreadcrumb,"* return the category path as a string, each node separated by the sSeparator. + * + * @param string $sSeparator + * + * @return string","$oBreadCrumb = $this->GetFromInternalCache('oCategoryBreadcrumb'); + if (is_null($oBreadCrumb)) { + $oBreadCrumb = TdbShopCategoryList::GetCategoryPath($this->id, null, $this->GetLanguage()); + $this->SetInternalCache('oCategoryBreadcrumb', $oBreadCrumb);",- +TShopCategory,Render,"* return the currents category root category. + * + * @return TdbShopCategory","$oView = new TViewParser(); + $oView->AddVar('oCategory', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopCategory,GetMetaKeywords,@var TdbShopCategory|null $oRootCategory,"if (strlen(trim(strip_tags($this->fieldMetaKeywords))) > 0) { + $aKeywords = explode(',', trim(strip_tags($this->fieldMetaKeywords)));",- +TShopCategory,GetMetaDescription,@var TdbShopCategory $oRootCategory,"$sDesc = trim($this->fieldMetaDescription); + if (empty($sDesc)) { + $oParent = $this->GetParent(); + if (!is_null($oParent)) { + $sDesc .= $oParent->GetMetaDescription().' ';",- +TShopCategory,AllowDisplayInShop,"* return a list of all categories to the current category. + * + * @return TIterator","if (false === $this->fieldActive || false === $this->fieldTreeActive) { + return false;",- +TShopCategory,GetSeoPattern,"* used to display an article. + * + * @param string $sViewName - the view to use + * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) + * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here + * + * @return string","//$sPaternIn = ""[{PORTAL_NAME",- +TShopCategory,GetBreadcrumbName,"* use this method to add any variables to the render method that you may + * require for some view. + * + * @param string $sViewName - the view being requested + * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) + * + * @return array",return $this->GetName();,- +TShopCategory,GetProductNameExtensions,"* returns an array with all table names that are relevant for the render function. + * + * @param string $sViewName - the view name being requested (if know by the caller) + * @param string $sViewType - the view type (core, custom-core, customer) being requested (if know by the caller) + * + * @return string[]","$sName = trim($this->fieldNameProduct); + if (empty($sName)) { + $sName = $this->fieldName;",- +TShopCategory,GetCurrentColorCode,"* return keywords for the meta tag on article detail pages. + * + * @return array","$oRootCat = $this->GetRootCategory(); + /** @var $oRootCat TdbShopCategory */ + $sColorcode = $oRootCat->fieldColorcode; + if ('' == $sColorcode) { + $sColorcode = $sDefaultColor;",- +TShopCategory,getParentCategories,"* return meta description. + * + * @return string",return TdbShopCategoryList::getParentCategoryList($this->id);,- +TShopCategory,parentCategoriesAreActive,"* Hook for implementing category display logic. + * + * @return bool","$treeIsActive = true; + $parentCategoryList = $this->getParentCategories(); + while ($category = $parentCategoryList->Next()) { + if (false === $category->fieldActive) { + $treeIsActive = false; + break;",- +TShopCategory,getTargetPage,"* Get SEO pattern of actual article. + * + * @param string $sPaternIn + * + * @return array","static $defaultPage = null; // since most categories will have the same default page, we store a static copy for performance + $targetPage = $this->GetFromInternalCache('target_page'); + if (null !== $targetPage) { + return $targetPage;",- +TShopCategoryList,GetMaxVat,"* return all categories connected to the article + * Add main category from article to list on first position. + * + * @param int $iArticleId + * @param string $sLanguageID + * + * @return TdbShopCategoryList","$iPointer = $this->getItemPointer(); + $oMaxVatItem = null; + $this->GoToStart(); + while ($oItem = $this->Next()) { + $oCurrentVat = $oItem->GetVat(); + if (!is_null($oCurrentVat)) { + if (is_null($oMaxVatItem)) { + $oMaxVatItem = $oCurrentVat;",- +TShopCategoryList,Render,"* return root category list. + * + * @param string|null $sLanguageID + * + * @return TdbShopCategoryList","$oView = new TViewParser(); + $oView->AddVar('oCategoryList', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, TdbShopCategoryList::VIEW_PATH, $sViewType);",- +TShopContributorList,Render,"* used to display an article. + * + * @param string $sViewName - the view to use + * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) + * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here + * + * @return string","$oView = new TViewParser(); + + // add view variables + $oView->AddVar('oContributorList', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopDiscount,IsActive,"* constants below define the status returned when checking if a discount can be + * used in the current basket.","$sToday = date('Y-m-d H:i:s'); + $bIsActive = ($this->fieldActive && ($this->fieldActiveFrom <= $sToday && ($this->fieldActiveTo >= $sToday || '0000-00-00 00:00:00' == $this->fieldActiveTo))); + + return $bIsActive;",- +TShopDiscount,AllowUseOfDiscount,* discount may be used.,"$bAllowUse = TdbShopDiscount::ALLOW_USE; + + $oBasket = TShopBasket::GetInstance(); + $oUser = TdbDataExtranetUser::GetInstance(); + + // check if the series is active + if (!$this->IsActive()) { + $bAllowUse = TdbShopDiscount::USE_ERROR_DISCOUNT_INACTIVE;",- +TShopDiscount,GetValue,* the discount is not active (respects both the boolean field and the date fields).,"$dValue = $this->fieldValue; + $oBasket = TShopBasket::GetInstance(); + $dBasketValueApplicableForDiscount = $oBasket->GetBasketSumForDiscount($this); + $dValue = $this->GetValueForBasketValue($dBasketValueApplicableForDiscount); + + return $dValue;",- +TShopDiscount,GetValueForBasketValue,* the basket value is below the minimum value specified for the voucher series.,"$dValue = $this->fieldValue; + $oBasket = TShopBasket::GetInstance(); + if ('prozent' == $this->fieldValueType) { + $dValue = round($dBasketValueApplicableForDiscount * ($dValue / 100), 2);",- +TShopDiscount,AllowDiscountForArticle,"* the discount has been restricted to a set of customers, and the current customer is not in that list.","$bMayBeUsed = true; + if ($oArticle->fieldExcludeFromDiscounts) { + $bMayBeUsed = false;",- +TShopDiscount,AllowDiscountForUser,"* the discount has been restricted to a set of customer groups, none of which the current customer is in.","$bIsValid = $this->AllowDiscountForNonUsers(); + if (!$bIsValid && $oUser) { + $bIsValid = true; + $aExtranetGroup = $this->GetFieldDataExtranetGroupWithInverseEmptySelectionLogicIdList(); + if (null === $aExtranetGroup) { + $bIsValid = false;",- +TShopDiscount,AllowDiscountForNonUsers,* the discount may not be used for the shipping country selected by the user.,"$bIsValid = true; + $aExtranetGroup = $this->GetFieldDataExtranetGroupWithInverseEmptySelectionLogicIdList(); + if (null === $aExtranetGroup || count($aExtranetGroup) > 0) { + $bIsValid = false;",- +TShopDiscount,HasBasketRestrictions,* flags can be used to enable/disable checks when calling AllowUseOfDiscount.,"$bRestrictedToBasket = (($this->fieldRestrictToArticlesFrom > 0) || ($this->fieldRestrictToArticlesTo > 0) || ($this->fieldRestrictToValueFrom > 0) || ($this->fieldRestrictToValueTo > 0)); + + return $bRestrictedToBasket;",- +TShopDiscount,HasBasketContentRestrictions,"* the real value of the discount used for an article. this value + * is set from the controlling TShopBasketArticle. + * + * @var float","$bHasArticleRestriction = $this->GetFromInternalCache('bHasArticleRestriction'); + if (is_null($bHasArticleRestriction)) { + $aCategoryRestrictons = $this->GetMLTIdList('shop_category_mlt'); + $bHasArticleRestriction = (count($aCategoryRestrictons) > 0); + if (!$bHasArticleRestriction) { + $aArticleRestrictons = $this->GetMLTIdList('shop_article_mlt'); + $bHasArticleRestriction = (count($aArticleRestrictons) > 0);",- +TShopDiscount,ClearCacheOnAllAffectedArticles,"* return true if the discount is active. + * + * @return bool","$iStartOperation = time(); + $aArticleRestrictions = $this->GetMLTIdList('shop_article_mlt'); + foreach ($aArticleRestrictions as $sArticelId) { + TCacheManager::PerformeTableChange('shop_article', $sArticelId);",- +TShopManufacturer,GetLinkProducts,"* return link to the product pages for the manufacturer. + * + * @param bool $bUseAbsoluteURL + * + * @return string","$oShop = TdbShop::GetInstance(); + $sLink = $oShop->GetLinkToSystemPage('manufacturer'); + if ('.html' == substr($sLink, -5)) { + $sLink = substr($sLink, 0, -5).'/';",- +TShopManufacturer,GetSearchRestrictionLink,"* returns a link that restricts the current search to the category. + * + * @return string","// get current search... then add filter + $oShop = TdbShop::GetInstance(); + $oSearchCache = $oShop->GetActiveSearchObject(); + //$oSearchCache->aFilter[TdbShopManufacturer::FILTER_KEY_NAME] = $this->id; + return $oSearchCache->GetSearchLink(array(TdbShopManufacturer::FILTER_KEY_NAME => $this->id));",- +TShopManufacturer,Render,"* return an instance for the current filter (if the filter defines a manufacturer) + * null if it does not. + * + * @return TdbShopManufacturer|null","$oView = new TViewParser(); + $oView->AddVar('oManufacturer', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, TdbShopManufacturer::VIEW_PATH, $sViewType);",- +TShopManufacturer,GetNumberOfHitsForSearchCacheId,@var $oInstance TdbShopManufacturer,"$iNumHits = 0; + + if ($bApplyActiveFilter) { + $query = ""SELECT COUNT(DISTINCT `shop_search_cache_item`.`id`) AS hits + FROM `shop_search_cache_item` + INNER JOIN `shop_article` ON `shop_search_cache_item`.`shop_article_id` = `shop_article`.`id` + LEFT JOIN `shop_article_shop_category_mlt` ON `shop_article`.`id` = `shop_article_shop_category_mlt`.`source_id` + WHERE `shop_search_cache_item`.`shop_search_cache_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($iShopSearchCacheId).""' + AND `shop_article`.`shop_manufacturer_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' + ""; + $sFilter = TdbShop::GetActiveFilterString(TdbShopManufacturer::FILTER_KEY_NAME); + if (!empty($sFilter)) { + $query .= "" AND {$sFilter",- +TShopManufacturer,GetIcon,"* used to display the manufacturer. + * + * @param string $sViewName - the view to use + * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) + * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here + * + * @return string","/** @var TCMSImage|null $oIcon */ + $oIcon = $this->GetFromInternalCache('oIcon'); + if (is_null($oIcon)) { + $oIcon = $this->GetImage(0, 'cms_media_id', $bReturnDefaultImageIfNoneSet); + if (is_null($oIcon)) { + $oIcon = false;",- +TShopManufacturer,GetLogo,"* use this method to add any variables to the render method that you may + * require for some view. + * + * @param string $sViewName - the view being requested + * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) + * + * @return array","/** @var TCMSImage|null $oLogo */ + $oLogo = $this->GetFromInternalCache('oLogo'); + if (is_null($oLogo)) { + $oLogo = $this->GetImage(1, 'cms_media_id', $bReturnDefaultImageIfNoneSet); + if (is_null($oLogo)) { + $oLogo = $this->GetIcon($bReturnDefaultImageIfNoneSet);",- +TShopManufacturerList,Load,"* @param string $sQuery + * @param array $queryParameters - PDO style parameters + * @param array $queryParameterTypes - PDO style parameter types + * + * @return void + * @psalm-suppress AssignmentToVoid, InvalidReturnStatement + * @FIXME Saving the result of `parent::DeleteExecute()` and returning does not make sense for a `void` return","$returnValue = parent::Load($sQuery, $queryParameters, $queryParameterTypes); + if (!TGlobal::IsCMSMode()) { + $this->AddFilterString('`shop_manufacturer`.`active`=""1""');",- +TShopModuleArticleList,UpdateOrderById,"* set a new order by id - we need to do this using a method so that we can + * reset the internal cache for the connected lookup. + * + * @param string $iId + * + * @return void","$this->sqlData['shop_module_articlelist_orderby_id'] = $iId; + $this->fieldShopModuleArticlelistOrderbyId = $iId; + $oItem = null; + $this->SetInternalCache('oLookupshop_module_articlelist_orderby_id', $oItem);",- +TShopModuleArticlelistOrderby,GetOrderByString,"* return order by string. + * + * @param string $sDirection - ASC or DESC. if set to NULL the value set in the class will be used + * + * @return string","if (is_null($sDirection)) { + $sDirection = $this->fieldOrderDirection;",- +TShopModuleArticlelistOrderbyList,Render,"* return list for a set of ids. + * + * @param array $aIdList + * @param int $iLanguageId + * + * @return TdbShopModuleArticlelistOrderbyList","$oView = new TViewParser(); + $oView->AddVar('oList', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $oView->AddVar('iActiveId', $iActiveId); + $oView->AddVar('sFormName', $sFormName); + $oView->AddVar('sFieldName', $sFieldName); + + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + $sHTML = $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); + + $sActivePageUrl = $this->getActivePageService()->getLinkToActivePageRelative(array(), array('module_fnc', 'listkey', 'listrequest', 'listpage')); + $stringReplacer = new TPkgCmsStringUtilities_VariableInjection(); + + return $stringReplacer->replace($sHTML, ['sActivePageUrl' => $sActivePageUrl]);",- +TShopOrder,LoadFromBasket,"* we use the post insert hook to set the ordernumber for the order. + * + * @return void","$oShop = TdbShop::GetInstance(); + $oPortal = $this->getPortalDomainService()->getActivePortal(); + $oUser = TdbDataExtranetUser::GetInstance(); + $oBillingAdr = $oUser->GetBillingAddress(); + + $sAffiliateCode = $oShop->GetAffilateCode(); + if (false === $sAffiliateCode) { + $sAffiliateCode = '';",- +TShopOrder,SaveCustomDataFromBasket,"* fill the order object with data from the basket + * NOTE: this fills the base order only. None of the lists (article, vat, etc) will be added yet. + * + * @param TShopBasket $oBasket + * + * @return void",,- +TShopOrder,SaveVouchers,"* method can be used to modify the data saved to order before the save is executed. + * + * @param TShopBasket $oBasket + * @param array $aOrderData + * + * @return void","if (!is_null($this->id) && !is_null($oBasketVoucherList) && $oBasketVoucherList->Length() > 0) { + $oBasketVoucherList->GoToStart(); + while ($oVoucherItemUsed = $oBasketVoucherList->Next()) { + $oVoucherItemUsed->CommitVoucherUseForCurrentUser($this->id);",- +TShopOrder,SaveArticles,"* method can be used to save any custom data to the order. The method is called + * after all core data has been saved to the order (but before the order is marked as complete). + * + * @param TShopBasket $oBasket + * + * @return void","if (!is_null($this->id)) { + $oBasketArticleList->GoToStart(); + while ($oBasketItem = $oBasketArticleList->Next()) { + $this->SaveArticle($oBasketItem);",- +TShopOrder,SaveVATList,"* Saves the vouchers passed to the order to the shop_voucher_use table + * Note: this will only work if the order has an id. + * Also Note: existing voucher uses will NOT be removed. + * + * @param TShopBasketVoucherList $oBasketVoucherList + * + * @return void","// TODO + if (!is_null($this->id)) { + while ($oVat = $oVatList->Next()) { + $oOrderVat = TdbShopOrderVat::GetNewInstance(); + /** @var $oOrderVat TdbShopOrderVat */ + $aVatData = array('shop_order_id' => $this->id, 'name' => $oVat->GetName(), 'vat_percent' => $oVat->fieldVatPercent, 'value' => $oVat->GetVatValue()); + $oOrderVat->LoadFromRow($aVatData); + $oOrderVat->AllowEditByAll(true); + $oOrderVat->Save();",- +TShopOrder,SaveShippingUserData,"* save basket articles to order. NOTE: the order object must have an id for + * this method to work. + * + * @param TShopBasketArticleList $oBasketArticleList + * + * @return void","// TODO + if (!is_null($this->id)) {",- +TShopOrder,SavePaymentUserData,"* store one article with order. + * + * @param TShopBasketArticle $oBasketItem + * + * @return TdbShopOrderItem","if (!is_null($this->id)) { + $oHandler = $oPaymentMethod->GetFieldShopPaymentHandler(); + if (!is_null($oHandler)) { + $oHandler->SaveUserPaymentDataToOrder($this->id);",- +TShopOrder,GetPaymentHandler,@var $oOrderItem TdbShopOrderItem,"$oPaymentHandler = $this->GetFromInternalCache('oOrderPaymentHandler'); + if (is_null($oPaymentHandler)) { + $oPaymentMethod = $this->GetFieldShopPaymentMethod(); + if ($oPaymentMethod) { + $aParameter = array(); + $oPaymentParameterList = $this->GetFieldShopOrderPaymentMethodParameterList(); + while ($oParam = $oPaymentParameterList->Next()) { + $aParameter[$oParam->fieldName] = $oParam->fieldValue;",- +TShopOrder,CreateOrderInDatabaseCompleteHook,"* use this method to make changes to the order item data before it is saved to the database. + * + * @param TShopBasketArticle $oBasketItem + * @param array $aOrderItemData + * + * @return void","$aData = $this->sqlData; + $aData['system_order_save_completed'] = '1'; + $this->LoadFromRow($aData); + $bAllowEdit = $this->bAllowEditByAll; + $this->AllowEditByAll(true); + $this->Save(); + $this->AllowEditByAll($bAllowEdit); + + // update auto groups + $oTmpuser = null; + if (!empty($this->fieldDataExtranetUserId)) { + $oTmpuser = $this->GetFieldDataExtranetUser(); + if (!is_null($oTmpuser)) { + TdbDataExtranetGroup::UpdateAutoAssignToUser($oTmpuser);",- +TShopOrder,ExportOrderForWaWiHook,"* save an article (pointed to by $oBundleArticle) belonging to a bundle ($oBasketItem) within the order. + * + * @param TShopBasketArticle $oBasketItem - the original basket item + * @param TdbShopOrderItem $oOrderItem - the generated order item (ie the bundle owner) + * @param TdbShopBundleArticle $oBundleArticle - the bundle connection between the owning item and the owned item + * + * @return void",return true;,- +TShopOrder,MarkOrderAsExportedToWaWi,@var $oVirtualBasketArticleForBundle TShopBasketArticle,"if ($bExported) { + $sDate = date('Y-m-d H:i:s');",- +TShopOrder,SendOrderNotification,@var $oBundleConnection TdbShopOrderBundleArticle,"$orderNotificationBeforeSendStatus = $this->fieldSystemOrderNotificationSend; + $this->updateSendOrderNotificationState(true); + + if (is_null($sSendToMail)) { + $sSendToMail = $this->fieldUserEmail;",- +TShopOrder,ExecutePayment,"* save vat list to basket. NOTE: the order object must have an id for + * this method to work. + * + * @param TdbShopVatList $oVatList + * + * @return void","$bPaymentOk = false; + $bAllowEdit = $this->bAllowEditByAll; + $this->AllowEditByAll(true); + $aData = $this->sqlData; + $aData['system_order_payment_method_executed'] = '0'; + $aData['system_order_payment_method_executed_date'] = date('Y-m-d H:i:s'); + $this->LoadFromRow($aData); + $this->Save(); + + $bPaymentOk = $this->ExecutePaymentHook($oPaymentHandler, $sMessageConsumer); + + $this->AllowEditByAll($bAllowEdit); + + return $bPaymentOk;",- +TShopOrder,Render,@var $oOrderVat TdbShopOrderVat,"$oView = new TViewParser(); + $oView->AddVar('oOrder', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopOrder,GetNetProductValue,"* save any user data for the shipping group in the basket + * NOTE: the order object must have an id for this method to work. + * + * @param TdbShopShippingGroup $oShippingGroup + * + * @return void","$dProductNetValue = 0; + $oArticles = $this->GetFieldShopOrderItemList(); + $oArticles->GoToStart(); + $aTaxValueGroups = array(); + while ($oArticle = $oArticles->Next()) { + if (!array_key_exists($oArticle->fieldVatPercent, $aTaxValueGroups)) { + /** + * @psalm-suppress InvalidArrayOffset + * @FIXME Float array keys are converted to integers - this could lead to unwanted behaviour + */ + $aTaxValueGroups[$oArticle->fieldVatPercent] = 0;",- +TShopOrder,SetStatusPaid,"* save any user data for the payment method in the basket + * NOTE: the order object must have an id for this method to work. + * + * @param TdbShopPaymentMethod $oPaymentMethod + * + * @return void","if ($this->fieldOrderIsPaid != $bIsPaid) { + $sDate = ''; + if ($bIsPaid) { + $sDate = date('Y-m-d H:i:s');",- +TShopOrder,SetStatusCanceled,"* return the payment handler for the order - the handler is initialized + * with the payment data from the order object. + * + * @return TdbShopPaymentHandler|null","if ($this->fieldCanceled != $bIsCanceled) { + $sDate = ''; + if ($bIsCanceled) { + $sDate = date('Y-m-d H:i:s');",- +TShopOrder,UpdateUsedVouchers,* @return ShopPaymentHandlerFactoryInterface,"$oShopVoucherUseList = $this->GetFieldShopVoucherUseList(); + $oShopVoucherUseList->GoToStart(); + if ($bIsCanceled) { + while ($oShopVoucherUse = $oShopVoucherUseList->Next()) { + $oShopVoucher = $oShopVoucherUse->GetFieldShopVoucher(); + if ($oShopVoucher->fieldIsUsedUp) { + $oShopVoucher->sqlData['is_used_up'] = '0'; + $oShopVoucher->sqlData['date_used_up'] = ''; + $oShopVoucher->fieldIsUsedUp = false; + $oShopVoucher->fieldDateUsedUp = ''; + $oShopVoucher->Save();",- +TShopOrder,UpdateStock,"* method is called after all data from the basket has been saved to the order tables. + * + * @return void","$oOrderItemList = $this->GetFieldShopOrderItemList(); + $oOrderItemList->GoToStart(); + while ($oOrderItem = $oOrderItemList->Next()) { + $oItem = $oOrderItem->GetFieldShopArticle(); + if ($oItem) { + $dAmount = $oOrderItem->fieldOrderAmount; + if ($bRemoveFromStock) { + $dAmount = -1 * $dAmount;",- +TShopOrder,PrePaymentExecuteHook,"* Hook used to export order for WaWi (called by TShopBasket after creating the order object) + * return true if the export worked. false if it did not. + * + * @param TdbShopPaymentHandler $oPaymentHandler - the payment handler for the order. this is passed via parameter since + * some payment handler do not save their data in the order (such as credit card) + * + * @return bool","/** + * call external api and if call fails add an error message + * $oMsgManager = TCMSMessageManager::GetInstance(); + * $oMsgManager->AddMessage($sMessageConsumer, 'ERROR-ORDER-SAVE-VIA-API-RETURNED-ERROR');. + */ + + return true;",- +TShopOrder,SaveDiscounts,"* @param bool $bExported + * + * @return void","if (!is_null($this->id) && !is_null($oShopBasketDiscountList) && $oShopBasketDiscountList->Length() > 0) { + $oShopBasketDiscountList->GoToStart(); + while ($oShopBasketDiscount = $oShopBasketDiscountList->Next()) { + //save... + $oShopOrderDiscount = TdbShopOrderDiscount::GetNewInstance(); + /** @var $oShopOrderDiscount TdbShopOrderDiscount */ + $aConnectionData = array( + 'shop_order_id' => $this->id, + 'shop_discount_id' => $oShopBasketDiscount->id, + 'name' => $oShopBasketDiscount->fieldName, + 'value' => $oShopBasketDiscount->fieldValueFormated, + 'valuetype' => $oShopBasketDiscount->fieldValueType, + 'total' => $oShopBasketDiscount->GetValue(), + ); + $aConnectionData = $this->saveDiscountsEnrichDiscountSaveData($this, $oShopBasketDiscount, $aConnectionData); + + $oShopOrderDiscount->LoadFromRow($aConnectionData); + $oShopOrderDiscount->AllowEditByAll(true); + $oShopOrderDiscount->Save();",- +TShopOrderBundleArticle,Render,"* used to display an article. + * + * @param string $sViewName - the view to use + * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) + * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here + * + * @return string","$oView = new TViewParser(); + $oView->AddVar('oShopOrderBundleArticle', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopOrderBundleArticleList,Render,"* used to display an article. + * + * @param string $sViewName - the view to use + * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) + * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here + * + * @return string","$oView = new TViewParser(); + $oView->AddVar('oShopOrderBundleArticleList', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopOrderItem,GetOwningBundleOrderItem,"* loads the owning bundle order item IF this item belongs to a bundle. returns false if it is not. + * + * @return TdbShopOrderItem|false","/** @var TdbShopOrderItem|null $oOwningOrderItem */ + $oOwningOrderItem = $this->GetFromInternalCache('oOwningOrderItem'); + + if (is_null($oOwningOrderItem)) { + $oOwningOrderItem = false; + if (!is_null($this->id)) { + $query = ""SELECT `shop_order_item`.* + FROM `shop_order_item` + INNER JOIN `shop_order_bundle_article` ON `shop_order_item`.`id` = `shop_order_bundle_article`.`shop_order_item_id` + WHERE `shop_order_bundle_article`.`bundle_article_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' + ""; + if ($aOwner = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { + $oOwningOrderItem = TdbShopOrderItem::GetNewInstance(); + /** @var $oOwningOrderItem TdbShopOrderItem */ + $oOwningOrderItem->LoadFromRow($aOwner);",- +TShopOrderItem,GetOwningBundleConnection,@var TdbShopOrderItem|null $oOwningOrderItem,"/** @var TdbShopOrderBundleArticle|null $oOwningBundleConnection */ + $oOwningBundleConnection = $this->GetFromInternalCache('oOwningBundleConnection'); + + if (is_null($oOwningBundleConnection)) { + $oOwningBundleConnection = false; + if (!is_null($this->id)) { + $oOwningBundleConnection = TdbShopOrderBundleArticle::GetNewInstance(); + /** @var $oOwningOrderItem TdbShopOrderBundleArticle */ + if (!$oOwningBundleConnection->LoadFromField('bundle_article_id', $this->id)) { + $oOwningBundleConnection = false;",- +TShopOrderItem,BelongsToABundle,@var $oOwningOrderItem TdbShopOrderItem,return false !== $this->GetOwningBundleConnection();,- +TShopOrderItem,Render,"* if this order item belongs to a bundle, then this method will return the connecting table. + * + * @return TdbShopOrderBundleArticle|false","$oView = new TViewParser(); + $oView->AddVar('oOrderItem', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopOrderItem,isDownload,@var TdbShopOrderBundleArticle|null $oOwningBundleConnection,"$db = \ChameleonSystem\CoreBundle\ServiceLocator::get('database_connection'); + $query = 'select COUNT(*) AS matches FROM `shop_order_item_download_cms_document_mlt` + WHERE `source_id` = :shopOrderItemId'; + $result = $db->fetchAssociative($query, array('shopOrderItemId' => $this->id)); + + return intval($result['matches']) > 0;",- +TShopOrderStatus,GetStatusText,"* retun the status text. + * + * @param bool $bPrepareTextForRemoteUsage + * + * @return string","$sHTML = ''; + $oOrder = $this->GetFieldShopOrder(); + $oCode = $this->GetFieldShopOrderStatusCode(); + $aData = $oOrder->GetSQLWithTablePrefix(); + $aTmpData = $this->GetSQLWithTablePrefix(); + $aData = array_merge($aData, $aTmpData); + $aData['data'] = $this->fieldData; + if ($bPrepareTextForRemoteUsage) { + $sHTML .= $oCode->GetTextForExternalUsage('info_text', 600, true, $aData);",- +TShopPaymentMethod,GetName,"* represents a payment method the user can choose from. it uses a payment handler to gather payment infos + * and execute the payment. +/*","$sName = parent::GetName(); + if (!TGlobal::IsCMSMode()) { + $dCosts = $this->GetPrice(); + if (0 != $dCosts) { + $oLocal = TCMSLocal::GetActive(); + $sName .= ' ('.$oLocal->FormatNumber($dCosts, 2).' EUR)';",- +TShopPaymentMethod,postSelectPaymentHook,* @var float|null,return $this->GetFieldShopPaymentHandler()->PostSelectPaymentHook($sMessageConsumer);,- +TShopPaymentMethod,GetFieldShopPaymentHandler,"* payment handler. + * + * @var TdbShopPaymentHandler","if (is_null($this->oPaymentHandler)) { + if (empty($this->fieldShopPaymentHandlerId)) { + return $this->oPaymentHandler;",- +TShopPaymentMethod,IsAvailable,"* we need this information to unserialize the payment handler. + * + * @var array","$bIsValid = true; + $bIsValid = ($bIsValid && $this->IsActive()); + if (!$bIsValid) { + return $bIsValid;",- +TShopPaymentMethod,IsPublic,"* called after the payment method is selected - return false the selection is invalid. + * + * @param TdbShop $oShop + * @param TShopBasket $oBasket + * @param TdbDataExtranetUser $oUser + * @param string $sMessageConsumer + * + * @return bool","$bIsPublic = true; + + if (!$this->IsActive()) { + $bIsPublic = false;",- +TShopPaymentMethod,IsActive,"* Paymenthandler. + * + * @return TdbShopPaymentHandler|null","$bIsActive = false; + if ($this->fieldActive) { + $bIsActive = true;",- +TShopPaymentMethod,IsValidForCurrentUser,"* return true if this shipping type is valid for the current user / basket. + * + * @return bool","$bIsValidForUser = false; + $bIsValidShippingCountry = false; + $bIsValidBillingCountry = false; + + $oUser = TdbDataExtranetUser::GetInstance(); + $bIsValidGroup = $this->checkUserGroup($oUser); + if ($bIsValidGroup) { + $bIsValidForUser = $this->checkUser($oUser);",- +TShopPaymentMethod,IsValidForBasket,"* returns true if the payment method has no user or user group restriction. + * + * @return bool","$bValidForBasket = false; + + $oBasket = TShopBasket::GetInstance(); + + if (false === $oBasket->isTotalCostKnown()) { + // check the total basket value + if ($this->fieldRestrictToBasketValueFrom > $oBasket->dCostTotal || ($this->fieldRestrictToBasketValueTo > 0 && $this->fieldRestrictToBasketValueTo < $oBasket->dCostTotal)) { + return false;",- +TShopPaymentMethod,GetPrice,"* returns true if the payment method is marked as active for the current time. + * + * @return bool","if (is_null($this->dPrice)) { + $this->dPrice = 0; + $oBasket = TShopBasket::GetInstance(); + if ('absolut' == $this->fieldValueType) { + $this->dPrice = $this->fieldValue;",- +TShopPaymentMethod,GetVat,"* return true if the payment method is allowed for the current user. + * + * @return bool","/** @var TdbShopVat|null $oVat */ + $oVat = $this->GetFromInternalCache('ovat'); + + if (is_null($oVat)) { + $oVat = $this->GetFieldShopVat(); + if (is_null($oVat)) { + $oShopConf = TdbShop::GetInstance(); + $oVat = $oShopConf->GetVat();",- +TShopPaymentMethod,Render,"* check user group. + * + * @param TdbDataExtranetUser $oUser + * + * @return bool","$oView = new TViewParser(); + + // add view variables + $oShop = TdbShop::GetInstance(); + $oView->AddVar('oShop', $oShop); + $oView->AddVar('oPaymentMethod', $this); + + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopPaymentMethod,PostProcessExternalPaymentHandlerHook,"* now check user id. + * + * @param TdbDataExtranetUser $oUser + * + * @return bool",return $this->GetFieldShopPaymentHandler()->PostProcessExternalPaymentHandlerHook();,- +TShopPaymentMethod,renderConfirmOrderBlock,"* check shipping country. + * + * @param TdbDataExtranetUser $oUser + * + * @return bool","if (false === $this->GetFieldShopPaymentHandler() instanceof IPkgShopPaymentHandlerCustomConfirmOrderBlockInterface) { + return '';",- +TShopPaymentMethod,processConfirmOrderUserResponse,* @return PaymentMethodDataAccessInterface,"if (false === $this->GetFieldShopPaymentHandler() instanceof IPkgShopPaymentHandlerCustomConfirmOrderBlockInterface) { + return true;",- +TShopPaymentMethodList,RemoveInvalidItems,* @var float|null,"// since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them + $aValidIds = array(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + if ($oItem->IsAvailable()) { + $aValidIds[] = MySqlLegacySupport::getInstance()->real_escape_string($oItem->id);",- +TShopPaymentMethodList,RemoveRestrictedItems,"* return list of shipping types that match the given group, the current basket, + * the current portal and the current user. + * + * @param int $iGroupId + * + * @return TdbShopPaymentMethodList","// since this is a tcmsrecord list, we need to collect all valid ids, and then reload the list with them + $aValidIds = array(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + if ($oItem->IsPublic()) { + $aValidIds[] = MySqlLegacySupport::getInstance()->real_escape_string($oItem->id);",- +TShopPaymentMethodList,GetTotalPrice,"* @param string $paymentGroupId + * + * @return string","if (is_null($this->dPrice)) { + $this->dPrice = 0; + $iPointer = $this->getItemPointer(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + $this->dPrice += $oItem->GetPrice();",- +TShopShippingGroup,__sleep,"* shipping costs are grouped into shipping groups. these groups hold the allowed payment methods, and they + * can be restricted to certain users, user groups, or delivery countries. +/*","return array('table', 'id', 'iLanguageId');",- +TShopShippingGroup,__wakeup,* @var TdbShopShippingTypeList,"$this->Load($this->id); + if (method_exists('TShopShippingGroupAutoParent', '__wakeup')) { + parent::__wakeup();",- +TShopShippingGroup,GetName,"* a list of all payment methods valid for the group (and the current user/basket). + * + * @var TdbShopPaymentMethodList","$sName = parent::GetName(); + if (!TGlobal::IsCMSMode()) { + $dCosts = $this->GetShippingCostsForBasket(); + if (0 != $dCosts) { + $oLocal = TCMSLocal::GetActive(); + $sCurrencySymbol = $this->GetCurrencySymbol(); + $sName .= ' ('.$oLocal->FormatNumber($dCosts, 2).' '.$sCurrencySymbol.')';",- +TShopShippingGroup,isAvailableIgnoreGroupRestriction,* @var float|null,"$bIsValid = true; + + $bIsValid = ($bIsValid && $this->IsActive()); + $bIsValid = ($bIsValid && $this->isValidForCurrentPortal()); + $bIsValid = ($bIsValid && $this->IsValidForCurrentUser()); + $bIsValid = ($bIsValid && $this->HasAvailableShippingTypes()); + $bIsValid = ($bIsValid && $this->HasAvailablePaymentMethods()); + + if ($bIsValid && false === $this->hasShippingTypeThatStopsTypeChain()) { + $oBasket = TShopBasket::GetInstance(); + //check to make sure that every item in the basket has one shipping type + $oBasketItemList = $oBasket->GetBasketContents(); + $oBasketItemList->GoToStart(); + while ($bIsValid && ($oBasketItem = $oBasketItemList->Next())) { + if (null === $oBasketItem->GetActingShippingType()) { + $bIsValid = false;",- +TShopShippingGroup,IsAvailable,"* returns currency symbol (by default €). + * + * @return string","$bIsValid = $this->isAvailableIgnoreGroupRestriction(); + + if ($bIsValid) { + // check group restrictions + $aShippingGroupIdList = array(); + $oShippingGroup = TShopBasket::GetInstance()->GetAvailableShippingGroups(); + if (null !== $oShippingGroup) { + $aShippingGroupIdList = $oShippingGroup->GetIdList();",- +TShopShippingGroup,allowedForShippingGroupList,"* returns true if the shipping cost group may be used for the current user / basket. + * + * @return bool","$bValid = true; + + // get list of all groups that will exclude this shipping group from the valid list + // this group is not valid if one of the restricted groups is found in the given shipping group list ($aShippingGroupIdList) + $aRestrictionGroupIdList = $this->GetFieldShopShippingGroupIdList(); + foreach ($aRestrictionGroupIdList as $sRestrictionGroupId) { + if (in_array($sRestrictionGroupId, $aShippingGroupIdList)) { + $bValid = false;",- +TShopShippingGroup,IsPublic,* @return bool,"$bIsPublic = true; + + if (!$this->IsActive()) { + $bIsPublic = false;",- +TShopShippingGroup,IsActive,"* returns true if the shipping cost group may be used for the current user / basket + * also checks if the group is invalid due to a restriction to other shipping groups. + * + * @return bool","$bIsActive = false; + $sToday = date('Y-m-d H:i:s'); + if ($this->fieldActive && $this->fieldActiveFrom <= $sToday && ('0000-00-00 00:00:00' == $this->fieldActiveTo || $this->fieldActiveTo >= $sToday)) { + $bIsActive = true;",- +TShopShippingGroup,IsValidForCurrentUser,"* check if the group is restricted by other groups (by the mlt field) and returns false if some of the restricted groups + * are found in the given list $aShippingGroupIdList. + * + * @param array $aShippingGroupIdList + * + * @return bool","$bIsValidForUser = false; + $bIsValidGroup = false; + + $shippingGroupDataAccess = $this->getShippingGroupDataAccess(); + $aUserGroups = $shippingGroupDataAccess->getPermittedUserGroupIds($this->id); + if (!is_array($aUserGroups) || count($aUserGroups) < 1) { + $bIsValidGroup = true;",- +TShopShippingGroup,isValidForCurrentPortal,"* returns true if the group has no user or user group restriction. + * + * @return bool","$aPortalIdList = $this->getShippingGroupDataAccess()->getPermittedPortalIds($this->id); + if (!is_array($aPortalIdList) || count($aPortalIdList) < 1) { + $bIsValidForPortal = true;",- +TShopShippingGroup,HasAvailableShippingTypes,"* returns true if the shipping group is marked as active for the current time. + * + * @return bool",return $this->GetActingShippingTypes()->Length() > 0;,- +TShopShippingGroup,HasAvailablePaymentMethods,* @return ShopShippingGroupDataAccessInterface,"$bValidMethods = false; + $oMethods = $this->GetValidPaymentMethods(); + $bValidMethods = ($oMethods->Length() > 0); + + return $bValidMethods;",- +TShopShippingGroup,HasPaymentMethod,"* return true if the shipping group is allowed for the current user. + * + * @return bool","$oPaymentMethods = $this->GetValidPaymentMethods(); + + return $oPaymentMethods->IsInList($sPaymentMethodId);",- +TShopShippingGroup,GetValidPaymentMethods,"* return true if the shipping group is allowed for the current portal. + * If no active portal was found and group was restricted to portal return false. + * + * @return bool","if (is_null($this->oValidPaymentMethods) || $bRefresh) { + $this->oValidPaymentMethods = TdbShopPaymentMethodList::GetAvailableMethods($this->id); + $this->oValidPaymentMethods->bAllowItemCache = true;",- +TShopShippingGroup,GetActingShippingTypes,"* returns true if the group has shipping types available for the current user/basket + * in order to do this, we need to fetch all acting shipping types. if we have at least + * one, we can continue. + * + * @return bool","if (is_null($this->oActingShippingTypeList) || $bRefresh) { + $this->oActingShippingTypeList = TdbShopShippingTypeList::GetAvailableTypes($this->id); + $this->oActingShippingTypeList->bAllowItemCache = true;",- +TShopShippingGroup,GetPublicShippingTypes,"* returns true if the group has payment methods available for the current user/basket. + * + * @return bool",return TdbShopShippingTypeList::GetPublicShippingTypes($this->id);,- +TShopShippingGroup,GetPublicPaymentMethods,"* returns true, if the requested payment method id supported by this group for + * this user, then the function returns true. + * + * @param string $sPaymentMethodId + * + * @return bool",return TdbShopPaymentMethodList::GetPublicPaymentMethods($this->id);,- +TShopShippingGroup,GetShippingCostsForBasket,"* return list of valid payment methods. + * + * @param bool $bRefresh - set to true to force a regeneration of the list + * + * @return TdbShopPaymentMethodList + * @psalm-suppress InvalidNullableReturnType, NullableReturnStatement - In this instance we know that the return type cannot be null","if (is_null($this->dPrice)) { + $this->dPrice = 0; + $oActingShippingTypes = $this->GetActingShippingTypes(); + if (!is_null($oActingShippingTypes)) { + $this->dPrice = $oActingShippingTypes->GetTotalPrice();",- +TShopShippingGroup,GetVat,"* @param bool $bRefresh - set to true to force a regeneration of the list + * + * @return TdbShopShippingTypeList + * returns a list of all shipping types that can act on the current basket/user","/** @var TdbShopVat|null $oVat */ + $oVat = $this->GetFromInternalCache('ovat'); + + if (is_null($oVat)) { + $oVat = null; + $oShopConf = TdbShop::GetInstance(); + if (true === $oShopConf->fieldShippingVatDependsOnBasketContents) { + $oBasket = TShopBasket::GetInstance(); + $oVat = $oBasket->GetLargestVATObject(); + if(null !== $oVat) { + $this->SetInternalCache('ovat', $oVat); + return $oVat;",- +TShopShippingGroup,Render,"* return all active public shipping types for group. + * + * @return TdbShopShippingTypeList","$oView = new TViewParser(); + + $oShop = TdbShop::GetInstance(); + $oView->AddVar('oShop', $oShop); + $oView->AddVar('oShippingGroup', $this); + $oView->AddVar('oPaymentMethods', $this->GetValidPaymentMethodsSelectableByTheUser()); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopShippingGroup,GetValidPaymentMethodsSelectableByTheUser,"* return all active public shipping types for group. + * + * @return TdbShopPaymentMethodList","$oPaymentMethods = clone $this->GetValidPaymentMethods(true); + $aInvalidMethods = array(); + $oPaymentMethods->GoToStart(); + while ($oPaymentMethod = $oPaymentMethods->Next()) { + $oHandler = $oPaymentMethod->GetFieldShopPaymentHandler(); + if ($oHandler && $oHandler->isBlockForUserSelection()) { + $aInvalidMethods[] = MySqlLegacySupport::getInstance()->real_escape_string($oPaymentMethod->id);",- +TShopShippingGroup,GetValidShippingTypesForBasketArticleListAndCountry,"* @return float + * calculates the shipping costs for the current basket. + * The shipping costs are calculated using the following procedure: + * 1. The system fetches a list of all active shipping types (taking the user data and the active shipping group into account) + * + * 2. The system creates a temporary copy of the basket content object + * 3. For each shipping type, we get all articles in the basket to which the shipping type would apply according to the rules defined for the shipping type by: + * a. Loop through the temporary basket contents and move every article that matches the rule into the current shipping type + * b. Check if the shipping type applies to the resulting collection of articles. If not, dump the articles back into the temporary basket. If it does, add the shipping type to the basket active shipping list (aActiveShippingList). + * 4. Now mark each article in the real basket with a pointer to the corresponding shipping type + * 5. Finally sum up the shipping costs for each active shipping type","$oValidShippingTypes = new TIterator(); + /** @var $oValidShippingTypes TIterator* */ + $oShippingTypes = $this->GetFieldShopShippingTypeList('position'); + while ($oShippingType = $oShippingTypes->Next()) { + $bIsValid = $oShippingType->IsActive(); + $bIsValid = $bIsValid && $oShippingType->isValidForCurrentPortal(); + $bIsValid = $bIsValid && $oShippingType->IsValidForCurrentUser(false); + $bIsValid = $bIsValid && $oShippingType->IsValidForCountry($sDataCountryId); + if ($bIsValid) { + $oAffectedArticles = $oBasketArticleList->GetArticlesAffectedByShippingType($oShippingType); + $bIsValid = ($oAffectedArticles->Length() > 0);",- +TShopShippingGroup,GetShippingCostsForBasketArticleListAndCountry,"* return the vat group for this shipping group. + * + * @return TdbShopVat|null","/** @var Request $request */ + $request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest(); + + $oBasketArticleList->GoToStart(); + + $oOldBasket = clone TShopBasket::GetInstance(); + $oOldUser = clone TdbDataExtranetUser::GetInstance(); + + $oTmpBasket = new TShopBasket(); + if (null !== $request && true === $request->hasSession()) { + $request->getSession()->set(TShopBasket::SESSION_KEY_NAME, $oTmpBasket);",- +TShopShippingGroupList,RemoveInvalidItems,"* return all shipping groups available to the current user with the current basket. + * + * @return TdbShopShippingGroupList","// since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them + $oBasket = TShopBasket::GetInstance(); + if (null === $oBasket) { + return;",- +TShopShippingGroupList,RemoveRestrictedItems,"* search for a shipping group that supports the given payment type + * returns false if nothing is found. + * + * @param string $sPaymentInternalName + * + * @return TdbShopShippingGroup|false","// since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them + $aValidIds = array(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + if ($oItem->IsPublic()) { + $aValidIds[] = MySqlLegacySupport::getInstance()->real_escape_string($oItem->id);",- +TShopShippingType,IsAvailable,* @var float|null,"$bIsValid = true; + $bIsValid = ($bIsValid && $this->IsActive()); + $bIsValid = ($bIsValid && $this->isValidForCurrentPortal()); + $bIsValid = ($bIsValid && $this->IsValidForCurrentUser()); + $bIsValid = ($bIsValid && $this->IsValidForBasket()); + + return $bIsValid;",- +TShopShippingType,endShippingTypeChain,"* holds a pointer to every entry in the basket that is affected by the shipping type. + * + * @var TShopBasketArticleList",return true === $this->fieldEndShippingTypeChain;,- +TShopShippingType,IsPublic,"* return true if this shipping type is valid for the current user / basket. + * + * @return bool","$bIsPublic = true; + + if (!$this->IsActive()) { + $bIsPublic = false;",- +TShopShippingType,IsActive,* @return bool,"$bIsActive = false; + $sToday = date('Y-m-d H:i:s'); + if ($this->fieldActive && $this->fieldActiveFrom <= $sToday && ('0000-00-00 00:00:00' == $this->fieldActiveTo || $this->fieldActiveTo >= $sToday)) { + $bIsActive = true;",- +TShopShippingType,IsValidForCurrentUser,"* returns true if the group has no user or user group restriction. + * + * @return bool","$bIsValidForUser = false; + $bIsValidGroup = false; + $bIsValidShippingCountry = false; + + $oUser = TdbDataExtranetUser::GetInstance(); + + if ($this->fieldRestrictToSignedInUsers || $oUser->IsLoggedIn() || $oUser->HasData()) { + $typeDataAccess = $this->getShopShippingTypeDataAccess(); + if ($oUser->IsLoggedIn() || $oUser->HasData()) { + // check user group + $aUserGroups = $typeDataAccess->getPermittedUserGroupIds($this->id); + if (!is_array($aUserGroups) || count($aUserGroups) < 1) { + $bIsValidGroup = true;",- +TShopShippingType,IsValidForCountry,"* returns true if the shipping group is marked as active for the current time. + * + * @return bool","$bIsValidForCountry = false; + $aShippingCountryRestriction = $this->getShopShippingTypeDataAccess()->getPermittedCountryIds($this->id); + if (count($aShippingCountryRestriction) > 0) { + if (in_array($sDataCountryId, $aShippingCountryRestriction)) { + $bIsValidForCountry = true;",- +TShopShippingType,isValidForCurrentPortal,"* return true if the shipping group is allowed for the current user. + * + * @return bool + * + * @param bool $bCheckShippingCountry","$aPortalIdList = $this->getShopShippingTypeDataAccess()->getPermittedPortalIds($this->id); + if (!is_array($aPortalIdList) || count($aPortalIdList) < 1) { + $bIsValidForPortal = true;",- +TShopShippingType,IsValidForBasket,"* @param null|string $sDataCountryId + * + * @return bool","$bValidForBasket = false; + $oArticles = $this->GetAffectedBasketArticles(); + $bValidForBasket = ($oArticles->Length() > 0); + + return $bValidForBasket;",- +TShopShippingType,GetAffectedBasketArticles,"* return true if the shipping group is allowed for the current portal. + * If no active portal was found and group was restricted to portal return false. + * + * @return bool","if (is_null($this->oAffectedBasketArticles)) { + $this->oAffectedBasketArticles = null; + $oBasket = TShopBasket::GetInstance(); + $this->oAffectedBasketArticles = $oBasket->GetArticlesAffectedByShippingType($this);",- +TShopShippingType,ArticleAffected,"* checks if the current shipping type is available for the current basket + * affected articles in the basket will be marked with the shipping type. + * + * @return bool","$shopShippingTypeDataAccess = $this->getShopShippingTypeDataAccess(); + $bAffected = false; + $oArticleShippingType = $oArticle->GetActingShippingType(); + // if the article is already marked with this shipping type, then we keep it + if (!is_null($oArticleShippingType) && $oArticleShippingType->id == $this->id) { + $bAffected = true;",- +TShopShippingType,ArticleListValidForShippingType,"* loads the affected basket articles into $this->oAffectedBasketArticles + * also returns list. will only load the articles if $this->oAffectedBasketArticles is null. + * + * @return TShopBasketArticleList","$bIsValid = true; + $dArticleValue = $oArticleList->dProductPrice; + $dNumberOfArticles = $oArticleList->dNumberOfItems; + $dArticleWeight = $oArticleList->dTotalWeight; + $dArticleVolume = $oArticleList->dTotalVolume; + + if ($this->fieldValueBasedOnEntireBasket) { + $oBasket = TShopBasket::GetInstance(); + $dArticleValue = $oBasket->dCostArticlesTotalAfterDiscounts;",- +TShopShippingType,GetPrice,* @return ShopShippingTypeDataAccessInterface,"if (is_null($this->dPrice)) { + $this->dPrice = 0; + + // price based on basket + if ($this->fieldValueBasedOnEntireBasket) { + $oBasket = TShopBasket::GetInstance(); + $iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation = 0; + $iTotalDiscountedPriceOfArticlesInBasketThatAreExcludedFromShippingCostCalculation = 0; + $oItemList = $oBasket->GetBasketContents(); + $oItemList->GoToStart(); + while ($oItem = $oItemList->Next()) { + if ($oItem->fieldExcludeFromShippingCostCalculation) { + $iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation += $oItem->dAmount; + $iTotalDiscountedPriceOfArticlesInBasketThatAreExcludedFromShippingCostCalculation += $oItem->dPriceTotalAfterDiscount;",- +TShopShippingType,GetPriceForBasketArticleList,"* checks if a basket article should be affected by this shipping type + * this can only happen if the article is not affected by any other shipping type. + * + * @param TShopBasketArticle $oArticle + * + * @return bool","if (is_null($this->dPrice)) { + $this->dPrice = 0; + + $dTotalNumberOfArticles = 0; + $oBasketArticleList->GoToStart(); + while ($oBasketArticle = $oBasketArticleList->Next()) { + /** @var $oBasketArticle TShopBasketArticle* */ + $dTotalNumberOfArticles += $oBasketArticle->dAmount;",- +TShopShippingTypeList,RemoveInvalidItems,* @var float|null,"// since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them + $allIds = array(); + $aValidIds = array(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + $allIds[] = $oItem->id; + if ($oItem->IsAvailable()) { + $aValidIds[] = MySqlLegacySupport::getInstance()->real_escape_string($oItem->id);",- +TShopShippingTypeList,RemoveRestrictedItems,* @return ShopShippingTypeDataAccessInterface,"// since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them + $aValidIds = array(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + if ($oItem->IsPublic()) { + $aValidIds[] = MySqlLegacySupport::getInstance()->real_escape_string($oItem->id);",- +TShopShippingTypeList,GetTotalPrice,* @return ShopServiceInterface,"if (is_null($this->dPrice)) { + $this->dPrice = 0; + + // we first need to check if there is one shipping type that is supposed to affect the + // complete basket. if that is the case, we need to make sure we move that to the front + // and therby ONLY use it (it will automatically affect ALL items) + $oItemForCompleteBasket = $this->FindItemWithProperty('fieldApplyToAllProducts', true); + if ($oItemForCompleteBasket) { + $this->dPrice = $oItemForCompleteBasket->GetPrice();",- +TShopStockMessage,GetShopStockMessage,"* @var null|array{amount: int, range: float, oTrigger: TdbShopStockMessageTrigger}[]","$oShopStockMessageTrigger = null; + $sMessage = $this->RenderStockMessage(); + if (is_object($this->GetArticle()) && property_exists($this->GetArticle(), 'dAmount') && is_null($this->aMessagesForQuantity)) { + /** + * @psalm-suppress UndefinedPropertyFetch - We are explicitly checking if the property exists above + */ + $this->aMessagesForQuantity = $this->GetMessagesFromTriggerForQuantity($this->GetArticle()->dAmount);",- +TShopStockMessage,SetArticle,* @var string|null,"$this->sArticleKey = $oArticle->id; + TCacheManagerRuntimeCache::SetContent($this->sArticleKey, $oArticle, 'TShopArticle', 3); + $oShopStockMessageTrigger = $this->GetFieldShopStockMessageTrigger(); + if (!is_null($oShopStockMessageTrigger)) { + $this->fieldName = $oShopStockMessageTrigger->fieldMessage; + $this->fieldClass = $oShopStockMessageTrigger->fieldCssClass;",- +TShopStockMessage,__destruct,"* @param null $sData + * @param null $sLanguage + * + * @return TdbShopStockMessage",TCacheManagerRuntimeCache::UnsetKey($this->sArticleKey);,- +TShopStockMessage,GetArticle,"* renders. + * + * @return string","if (null === $this->sArticleKey) { + return false;",- +TShopStockMessage,GetFieldShopStockMessageTrigger,* @psalm-suppress UndefinedPropertyFetch - We are explicitly checking if the property exists above,"/** @var TdbShopStockMessageTrigger|null $oShopStockMessageTrigger */ + $oShopStockMessageTrigger = $this->GetFromInternalCache('oActive_shop_stock_message_trigger_id'); + + if (is_null($oShopStockMessageTrigger)) { + $sQuery = ""SELECT * + FROM `shop_stock_message_trigger` + WHERE `shop_stock_message_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' + AND `amount` >= '"".MySqlLegacySupport::getInstance()->real_escape_string($this->GetArticle()->getAvailableStock()).""' + ORDER BY `amount` ASC + LIMIT 1 + ""; + $oShopStockMessageTrigger = TdbShopStockMessageTrigger::GetNewInstance(); + /** @var $oShopStockMessageTrigger TdbShopStockMessageTrigger */ + $oTmp = MySqlLegacySupport::getInstance()->fetch_object(MySqlLegacySupport::getInstance()->query($sQuery)); + //if (!$oShopStockMessageTrigger->LoadFromRow(MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($sQuery)))) $oShopStockMessageTrigger = null; + if (is_object($oTmp)) { + if (!$oShopStockMessageTrigger->LoadFromField('id', $oTmp->id)) { + $oShopStockMessageTrigger = null;",- +TShopStockMessage,GetFieldShopStockMessageTriggerList,"* return a css class for messages that depending on quantity + * for example article has a stock of 10 but the user wants to buy 20 so the user gets the normal stock message AND the message that there is an other stock message / state for an amount of 10 + * these class is used for the message for the amount that could not be shipped yet. + * + * @param array $aMessageForQuantity + * + * @return string",return $this->GetFieldShopStockMessageTriggerListOrdered();,- +TShopStockMessage,GetFieldShopStockMessageTriggerListOrdered,"* renders the stock message. + * + * @return string","$oTriggerList = $this->GetFromInternalCache('oShopStockMessageTriggerList'); + if (is_null($oTriggerList)) { + $oTriggerList = parent::GetFieldShopStockMessageTriggerList(); + if ($aOrderBy) { + $oTriggerList->ChangeOrderBy($aOrderBy);",- +TShopSystemInfo,Render,"* used to display the info page. + * + * @param string $sViewName - the view to use + * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) + * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here + * + * @return string","$oView = new TViewParser(); + $oView->AddVar('oInfo', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopUnitOfMeasurement,GetBasePrice,"* manages the content quantity for products (needed for base price calculations). +/*","if (empty($this->fieldFactor)) { + $factor = 1;",- +TShopUnitOfMeasurement,GetFieldShopUnitOfMeasurement,"* Returns the base price for the source price. + * + * @param float $sourcePrice + * @param float $sourceQuantity + * + * @return float","if (empty($this->fieldShopUnitOfMeasurementId)) { + return $this;",- +TShopUserNoticeList,GetRemoveFromNoticeListLink,"* return link that can be used to remove the item from the notice list. + * + * @return string","$oShop = TdbShop::GetInstance(); + $aParams = array('module_fnc['.$oShop->GetBasketModuleSpotName().']' => 'RemoveFromNoticeList', MTShopBasketCore::URL_ITEM_ID => $this->fieldShopArticleId); + + return $this->getActivePageService()->getLinkToActivePageRelative($aParams);",- +TShopUserNoticeList,GetRemoveFromNoticeListLinkAjax,* @return string,"$oShop = TdbShop::GetInstance(); + $aParams = array('module_fnc['.$oShop->GetBasketModuleSpotName().']' => 'ExecuteAjaxCall', '_fnc' => 'RemoveFromNoticeListAjax', MTShopBasketCore::URL_ITEM_ID => $this->fieldShopArticleId); + + return $this->getActivePageService()->getLinkToActivePageRelative($aParams);",- +TShopUserNoticeList,Render,"* @param string $sViewName + * @param string $sSubType + * @param string $sType + * @param array $aCallTimeVars + * + * @return string","$oView = new TViewParser(); + $oView->AddVar('oNoticeItem', $this); + $oArticle = $this->GetFieldShopArticle(); + $oView->AddVar('oArticle', $oArticle); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + + return $oView->RenderObjectPackageView($sViewName, $sSubType, 'Customer');",- +TShopVariantSet,GetChangableFieldNames,"* return an array of fields that may be edited for variants of this set. + * + * @return array","$aFieldNames = $this->GetFromInternalCache('aChangableFieldNames'); + if (is_null($aFieldNames)) { + $aFieldNames = array(); + $oFields = $this->GetFieldCmsFieldConfList(); + while ($oField = $oFields->Next()) { + $aFieldNames[] = $oField->fieldName;",- +TShopVariantSet,AllowEditOfField,"* returns true if the field name passed is allowed to be edtited for variants of this set type. + * + * @param string $sFieldName + * + * @return bool","$aFieldsEditable = $this->GetChangableFieldNames(); + $sFieldName = str_replace('`', '', $sFieldName); + + return in_array($sFieldName, $aFieldsEditable);",- +TShopVariantSet,GetFieldShopVariantDisplayHandler,"* Anzeigemanager für die Variantenauswahl im Shop. + * + * @return TdbShopVariantDisplayHandler|null","/** @var TdbShopVariantDisplayHandler|null $oItem */ + $oItem = $this->GetFromInternalCache('oLookupshop_variant_display_handler_id'); + + if (is_null($oItem)) { + $oItem = TdbShopVariantDisplayHandler::GetInstance($this->fieldShopVariantDisplayHandlerId); + $this->SetInternalCache('oLookupshop_variant_display_handler_id', $oItem);",- +TShopVariantSet,GetVariantTypeForIdentifier,@var TdbShopVariantDisplayHandler|null $oItem,"/** @var TdbShopVariantType|null $oType */ + $oType = $this->GetFromInternalCache('VariantTypeForIdentifier'.$sVariantTypeIdentifier); + + if (is_null($oType)) { + $oType = TdbShopVariantType::GetNewInstance(); + if (!$oType->Loadfromfields(array('shop_variant_set_id' => $this->id, 'identifier' => $sVariantTypeIdentifier))) { + $oType = null;",- +TShopVariantType,GetFieldShopVariantTypeValueList,"* Verfügbare Variantenwerte. + * + * @return TdbShopVariantTypeValueList","$oValueList = TdbShopVariantTypeValueList::GetListForShopVariantTypeId($this->id, $this->iLanguageId); + $oValueList->ChangeOrderBy(array($this->fieldShopVariantTypeValueCmsfieldname => 'ASC')); + + return $oValueList;",- +TShopVariantTypeValue,GetURLString,"* returns the url string part (type/value) for the value. + * + * @return string","$sURLString = $this->GetFromInternalCache('sURLString'); + + if (is_null($sURLString)) { + $oType = $this->GetFieldShopVariantType(); + + $urlNormalizationUtil = $this->getUrlNormalizationUtil(); + if (empty($oType->fieldUrlName)) { + $oType->fieldUrlName = $urlNormalizationUtil->normalizeUrl($oType->fieldName);",- +TShopVat,addValue,"* holds the gross total value on which the vat will act. + * + * @var float","$this->dTotalValue += $dValue; + $this->recalculate();",- +TShopVat,reset,@var float,"$this->dTotalValue = 0; + $this->dNetValue = 0; + $this->dGrossValue = 0; + $this->dVatValue = 0;",- +TShopVat,getTotalValue,@var float,return $this->dTotalValue;,- +TShopVat,getNetValue,@var float,"return round($this->dNetValue, 2);",- +TShopVat,getGrossValue,"* @param float|int $dValue + * + * @return void",return 0;,- +TShopVat,GetVatValue,* @return void,"return round($this->dVatValue, 2);",- +TShopVatList,GetTotalVatValue,"* get the total vat value for the current group. + * + * @return float","$dVal = 0; + $iPointer = $this->getItemPointer(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + $dVal += $oItem->GetVatValue();",- +TShopVatList,GetTotalNetValue,"* get the total net value for the current group. + * + * @return float","$dVal = 0; + $iPointer = $this->getItemPointer(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + $dVal += $oItem->getNetValue();",- +TShopVatList,GetTotalValue,"* get the total gross value for the current group. + * + * @return float","$dVal = 0; + $iPointer = $this->getItemPointer(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + $dVal += $oItem->getTotalValue();",- +TShopVatList,GetMaxItem,"* return largest item in list. + * + * @return TdbShopVat|null","/** @var null|TdbShopVat $oMaxItem */ + $oMaxItem = null; + $iPt = $this->getItemPointer(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + if ($oItem->getTotalValue() > 0 && (is_null($oMaxItem) || $oItem->getTotalValue() > $oMaxItem->getTotalValue())) { + $oMaxItem = $oItem;",- +TShopVoucher,GetRemoveFromBasketLink,"* Im System können Gutscheine hinterlegt werden, die einen absoluten oder prozentualen Wert als Nachlass gewähren. Prozentuale Nachlässe beziehen sich immer auf die Bruttosumme der Produkte, bevor Rabatte oder Ähnliches angerechnet werden. Zusätzlich kann bei einem Gutschein ein Gratisartikel hinterlegt werden. Wird ein solcher Gutschein mit Gratisartikel eingelöst, legt das System den Artikel mit einem Wert von 0€ in den Warenkorb. Zusätzlich erscheint der Hinweis über welchen Gutschein der Artikel in den Warenkorb gelegt wurde. Neben dem Hinweis erscheint zusätzlich ein Link über den der Gutschein wieder aus dem Warenkorb genommen werden kann. + * + * Geldwerte Gutscheine erscheinen unterhalb der Produktbruttosumme mit Namen und Wert. Zusätzlich wird neben jedem Gutschein ein Link angezeigt über den der Gutschein wieder aus dem Warenkorb genommen werden kann. + * Gutscheine werden generell in Gutscheinserien angelegt. Alle Einstellungen beziehen sich auf die Gutscheinserie, und damit auf alle Gutscheine in dieser Gutscheinserie. Für eine Gutscheinserie können automatisch Gutscheine generiert werden. Hier kann entweder ein fester Gutscheincode angegeben werden, oder vom System für jeden Gutschein automatisch generiert werden. + * + * Innerhalb einer Gutscheinserie darf ein Gutscheincode mehr als einmal vorkommen, ein Gutscheincode darf aber nie in mehr als einer Gutscheinserie verwendet werden. Bei jedem Gutschein wird ein Erstellungsdatum hinterlegt. + * + * Der Gutscheinwert selbst wird immer aus der Gutscheinserie genommen (verändert man diesen Wert, verändert sich auch automatisch der Gutscheinwert). Bei jeder Verwendung eines Gutscheins, wird das Datum, der Benutzer, sowie der Verbrauchswert beim Gutschein in der Gutscheinverwendungsliste hinterlegt. Sobald der Gutschein komplett verbraucht ist, wird das Verbrauchsdatum hinterlegt und der Gutschein als verbraucht markiert. + * Die Gutscheine einer Gutscheinserie können als CSV Exportiert werden. Für jeden Gutschein werden folgende Daten exportiert: + * • Code + * • Datum + * • Verbraucht (Ja/Nein) + * • Verbrauchsdatum + * • Restwert + * + * Gutscheine können für alle Benutzer verwendbar sein, oder auf bestimmte Benutzergruppen oder Benutzer eingeschränkt werden. + * + * Gutscheine können einen Gutscheinsponsor haben der für den Gutschein gezahlt hat. Gutscheinsponsoren können zusätzlich zur Gutscheininformation auf der Webseite mit Name und Bild angezeigt werden. + * + * Gutscheine (die nicht „gesponsert“ und damit nicht tatsächlich bezahlt sind) dürfen nicht auf Artikel greifen, für die die Buchpreisbindung gilt. Die für den Gutschein relevante Mindestbestellsumme, sowie der Warenkorbwert der nicht unter null fallen darf bezieht sich immer auf die Summe der Artikel die keiner Buchpreisbindung unterliegen. + * + * Folgende zusätzliche Einstellungen und Einschränkungen sind möglich: + * • Über ein Start- und Enddatum kann ein Gutschein auf eine Zeitspanne eingeschränkt werden. + * + * • Es kann ein Mindestbestellwert definiert werden, der überschritten werden muss, bevor der Gutschein akzeptiert wird. + * + * • Ob der Gutschein mit einem anderen Gutschein der gleichen Gutscheinserie verwendet werden kann + * • Ob der Gutschein mit anderen Gutscheinen (egal von welcher Gutscheinserie) verwendet werden kann. + * + * • Ob ein Kunde Gutscheine dieser Gutscheinserie generell nur einmal verwenden darf (also auch nicht bei zwei getrennten Bestellungen) + * + * • Ob der Gutschein nur bei der ersten Bestellung des Benutzers verwendet werden kann. + * + * • Ob der Gutschein die Versandkosten aufheben soll. + * + * • Es ist möglich den Gutschein als einen „gesponserten“ Gutschein zu Markieren. Zusätzlich kann der Name des Sponsors, ein Bild, und ein Logo hinterlegt werden. „Gesponserte“ Gutscheine ignorieren die Buchpreisbindungseinstellungen der Warenkorbartikel im Warenkorb. + * Die für Gutscheine relevanten Berechnungsregeln werden im Detail unter 3.a.i beschrieben. +/*","if (is_null($sMessageHandler)) { + $sMessageHandler = MTShopBasketCore::MSG_CONSUMER_NAME;",- +TShopVoucher,IsSameAs,"* constants below define the status returned when checking if a voucher can be + * used in the current basket.","if (!is_null($this->sBasketVoucherKey) || !is_null($oItem->sBasketVoucherKey)) { + return 0 == strcmp($this->sBasketVoucherKey, $oItem->sBasketVoucherKey);",- +TShopVoucher,AllowUseOfVoucher,* voucher may be used.,"$bAllowUse = TdbShopVoucher::ALLOW_USE; + + $oBasket = TShopBasket::GetInstance(); + $oExistingVouchers = $oBasket->GetVoucherList(); + if (!is_null($oExistingVouchers)) { + $oMatchingVoucher = $oExistingVouchers->FindItemWithProperty('id', $this->id); + if ($oMatchingVoucher) { + $bAllowUse = TdbShopVoucher::USE_ERROR_OTHER_VOUCHER_USED;",- +TShopVoucher,GetValue,* the voucher series to which this voucher belongs is currently inactive (or the active date is out of range).,"if ($bCalculateVoucher) { + $oSeries = $this->GetFieldShopVoucherSeries(); + $dValue = $oSeries->fieldValue; + $oBasket = TShopBasket::GetInstance(); + $dBasketValueApplicableForVoucher = $oBasket->GetBasketSumForVoucher($this); + if ('prozent' == $oSeries->fieldValueType) { + $dValue = round($dBasketValueApplicableForVoucher * ($dValue / 100), 2);",- +TShopVoucher,GetValuePreviouslyUsed,* the basket value is below the minimum value specified for the voucher series.,"// we have to make sure that is value is accurate... so we will fetch it from database every time + // performance should not be a big issue, since it only affects users that include a voucher in their basket + $dValueUsed = 0; + $query = ""SELECT SUM(`value_used`) AS totalused + FROM `shop_voucher_use` + INNER JOIN `shop_order` ON `shop_voucher_use`.`shop_order_id` = `shop_order`.`id` + WHERE `shop_voucher_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' + AND `shop_order`.`canceled` = '0' + ""; + if ($aValue = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { + if (null !== $aValue['totalused']) { + $dValueUsed = $aValue['totalused'];",- +TShopVoucher,CommitVoucherUseForCurrentUser,"* another voucher of the same series is already used within the basket even though + * the voucher series has been defined as ""only one of the same series per basket"".","$oShopVoucherUse = TdbShopVoucherUse::GetNewInstance(); + /** @var $oShopvoucherUse TdbShopVoucherUse */ + $aData = array('shop_voucher_id' => $this->id, 'date_used' => date('Y-m-d H:i:s'), 'value_used' => $this->GetValue(), 'shop_order_id' => $iShopOrderId); + // hook to post-convert value (as may be required when dealing with currency) + $this->CommitVoucherUseForCurrentUserPreSaveHook($aData); + $oShopVoucherUse->LoadFromRow($aData); + $oShopVoucherUse->AllowEditByAll(true); + $oShopVoucherUse->Save(); + + if ($this->checkMarkVoucherAsCompletelyUsed()) { + $this->MarkVoucherAsCompletelyUsed();",- +TShopVoucher,checkMarkVoucherAsCompletelyUsed,"* another voucher is already being used within the basket even though + * the voucher series has been defined as ""may not be used with any other voucher"".","$bMarkVoucherAsCompletelyUsed = false; + $oVoucherSeries = $this->GetFieldShopVoucherSeries(); + if ('absolut' == $oVoucherSeries->fieldValueType && !is_null($oVoucherSeries->GetFieldShopVoucherSeriesSponsor())) { + $dValueUsed = $this->GetValuePreviouslyUsed(); + if ($dValueUsed >= $this->GetVoucherSeriesOriginalValue()) { + $bMarkVoucherAsCompletelyUsed = true;",- +TShopVoucher,MarkVoucherAsCompletelyUsed,"* the customer used a voucher of this series before for a previous order even though + * the series has been marked as ""only one voucher per customer"".","$aData = $this->sqlData; + $aData['date_used_up'] = date('Y-m-d H:i:s'); + $aData['is_used_up'] = '1'; + $this->LoadFromRow($aData); + $bEditState = $this->bAllowEditByAll; + $this->AllowEditByAll(true); + $this->Save(); + $this->AllowEditByAll($bEditState);",- +TShopVoucher,AllowVoucherForArticle,"* this is not the first order from the customer, but the voucher series has been defined + * as ""use only on first order"".","$bMayBeUsed = true; + + $oVoucherDef = $this->GetFieldShopVoucherSeries(); + + if ($oArticle->fieldExcludeFromVouchers && empty($oVoucherDef->fieldShopVoucherSeriesSponsorId)) { + $bMayBeUsed = false;",- +TShopVoucher,IsSponsored,"* the voucher has been restricted to a set of customers, and the current customer is not in that list.","$bIsSponsored = $this->GetFromInternalCache('bVoucherIsSponsored'); + if (is_null($bIsSponsored)) { + $bIsSponsored = false; + $oVoucherSeries = $this->GetFieldShopVoucherSeries(); + if ($oVoucherSeries && !empty($oVoucherSeries->fieldShopVoucherSeriesSponsorId)) { + $bIsSponsored = true;",- +TShopVoucherSeries,GetVat,* @return TdbShopVat|null,return $this->GetFieldShopVat();,- +TShopVoucherSeries,IsActive,"* return true if the voucher series is active. + * + * @return bool","$sToday = date('Y-m-d H:i:s'); + $bIsActive = ($this->fieldActive && ($this->fieldActiveFrom <= $sToday && ($this->fieldActiveTo >= $sToday || '0000-00-00 00:00:00' == $this->fieldActiveTo))); + + return $bIsActive;",- +TShopVoucherSeries,NumberOfTimesUsedByUser,"* returns the number of vouchers from that series that have been used by the user (note, we count + * also the vouchers that have been used in part only. + * + * @param int $iDataExtranetUserId (if null, use the current user) + * @param array $aExcludeVouchers - the voucher ids to exclude from the count + * + * @return int","$iNumberOfVouchersUsed = 0; + + if (is_null($iDataExtranetUserId)) { + $oUser = TdbDataExtranetUser::GetInstance(); + $iDataExtranetUserId = $oUser->id;",- +TShopVoucherSeries,CreateNewVoucher,"* create a new voucher. + * + * @param string $sCode - code to create + * + * @return TdbShopVoucher","if (is_null($sCode)) { + $bCodeUnique = false; + $dMaxTry = 15; + $sCode = ''; + while (!$bCodeUnique && $dMaxTry > 0) { + --$dMaxTry; + $sCode = TdbShopVoucher::GenerateVoucherCode(); + $query = ""SELECT * FROM `shop_voucher` WHERE `code` = '"".MySqlLegacySupport::getInstance()->real_escape_string($sCode).""'""; + $tRes = MySqlLegacySupport::getInstance()->query($query); + if (0 == MySqlLegacySupport::getInstance()->num_rows($tRes)) { + $bCodeUnique = true;",- +TShop_DataExtranetGroup,UpdateAutoAssignAllUsers,"* @return bool + * + * @param string $sUserid + * @param float $dOrderValue","// get all users that no longer apply + $query = ""DELETE FROM `data_extranet_user_data_extranet_group_mlt` WHERE `data_extranet_user_data_extranet_group_mlt`.`target_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""'""; + MySqlLegacySupport::getInstance()->query($query); + + // now add group to every one with the corrseponding value + $query = ""SELECT `data_extranet_user`.`id` AS source_id, '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' AS target_id + FROM `data_extranet_user` + LEFT JOIN `shop_order` ON `data_extranet_user`.`id` = `shop_order`.`data_extranet_user_id` + AND (`shop_order`.`id` IS NULL OR `shop_order`.`canceled` = '0') + GROUP BY `data_extranet_user` .`id` + HAVING + (SUM(`shop_order`.`value_total`) >= {$this->fieldAutoAssignOrderValueStart",- +TCMSWizardStepShopAddressShipping,AllowedMethods,"* define any methods of the class that may be called via get or post. + * + * @return array","$externalFunctions = parent::AllowedMethods(); + $externalFunctions[] = 'ShowShippingAddressInput'; + $externalFunctions[] = 'HideShippingAddressInput'; + + return $externalFunctions;",- +TCMSWizardStepShopAddressShipping,ShowShippingAddressInput,"* @param bool $bState + * + * @return void",$this->SetShowShippingAddressInputState(true);,- +TCMSWizardStepShopAddressShipping,HideShippingAddressInput,"* set state variable to show shipping address input. method returns false, so that + * the same step is returned. + * + * @return void","$this->SetShowShippingAddressInputState(false); + $this->ExecuteStep();",- +TCMSWizardStepShopTellAFriend,Init,* @deprecated since 6.2.0 - no longer used.,"$oGlobal = TGlobal::instance(); + $this->aUserInput = $oGlobal->GetUserData('aInput'); + if (!is_array($this->aUserInput)) { + $this->aUserInput = array();",- +TShopModuleArticleListFilter,ModuleInitHook,"* set to true if the base query was generated instead of a custom query from an extension. + * + * @var bool",,- +TShopModuleArticleListFilter,PreventUseOfParentObjectWhenNoRecordsAreFound,"* set to false if you want to prevent the list from caching. + * + * @var bool",return false;,- +TShopModuleArticleListFilter,getFallbackListFilter,"* @var array","if ('tdbshopmodulearticlelistfilter' === strtolower(get_class($this))) { + return null;",- +TShopModuleArticleListFilter,GetListQuery,"* factory creates a new instance and returns it. + * + * @param string|array $sData - either the id of the object to load, or the row with which the instance should be initialized + * @param string $sLanguage - init with the language passed + * + * @return TdbShopModuleArticleListFilter","$sQuery = $this->GetListQueryBase($oListConfig); + $aRestrictions = $this->GetGlobalQueryRestrictions($oListConfig); + if (count($aRestrictions) > 0) { + $sQuery .= ' AND (('.implode(') AND (', $aRestrictions).'))';",- +TShopModuleArticleListFilter,_AllowCache,"* @psalm-suppress InvalidPropertyAssignmentValue - through `$canBeCached` we know that at this place, `$cacheKey` is not `null`",return $this->bAllowCache;,- +TShopModuleArticleListFilter,_GetCacheParameters,"* is called when the module initializes. + * + * @return void","$aParams = array(); + $oShop = TdbShop::GetInstance(); + + $oActiveCategory = $oShop->GetActiveCategory(); + if (!is_null($oActiveCategory)) { + $aParams['activecategoryid'] = $oActiveCategory->id;",- +TShopModuleArticleListFilter,_GetCacheTableInfos,"* prevent the use of the parent object when this filter finds not articles. + * + * @return bool","$aClearCacheInfo = array(); + + return $aClearCacheInfo;",- +TShopModuleArticlelistFilterAccessories,_GetCacheParameters,"* return the base of the query. overwrite this method for each filter to add custom filtering + * the method should include a query of the form select shop_article.*,... FROM shop_article ... WHERE ... + * NOTE: do not add order info or limit the query (overwrite GetListQueryOrderBy and GetListQueryLimit instead) + * NOTE 2: the query will automatically be restricted to all active articles. + * NOTE 3: you query must include a where statement. + * + * @param TdbShopModuleArticleList $oListConfig + * + * @return string","$aParams = parent::_GetCacheParameters(); + $oShop = TdbShop::GetInstance(); + + $oActiveArticle = $oShop->GetActiveItem(); + if (!is_null($oActiveArticle)) { + $aParams['articleId'] = $oActiveArticle->id;",- +TShopModuleArticlelistFilterAllArticlesOfActiveCategoryTree,PreventUseOfParentObjectWhenNoRecordsAreFound,"* show all articles in the active category... including the categories children. +/*",return true;,- +TShopModuleArticlelistFilterAllArticlesOfActiveNonLeafCategory,PreventUseOfParentObjectWhenNoRecordsAreFound,"* return the base of the query. overwrite this method for each filter to add custom filtering + * the method should include a query of the form select shop_article.*,... FROM shop_article ... WHERE ... + * NOTE: do not add order info or limit the query (overwrite GetListQueryOrderBy and GetListQueryLimit instead) + * NOTE 2: the query will automatically be restricted to all active articles. + * NOTE 3: you query must include a where statement. + * + * @param TdbShopModuleArticleList $oListConfig + * + * @return string",return true;,- +TShopModuleArticlelistFilterArticleOfActiveManufacturer,_GetCacheParameters,"* show all articles from the active manufacturer. +/*","$aParams = array(); + $oShop = TdbShop::GetInstance(); + + $oActiveCategory = $oShop->GetActiveCategory(); + if (!is_null($oActiveCategory)) { + $aParams['activecategoryid'] = $oActiveCategory->id;",- +TShopModuleArticlelistFilterArticleSuggestions,_GetCacheParameters,"* this is just a stub that acts just like a manuell selection for now - we need to define + * some algorithm that finds articles related to the current article (such as matching tags, attributes, etc). +/*","$aParams = parent::_GetCacheParameters(); + $oShop = TdbShop::GetInstance(); + + $oActiveArticle = $oShop->GetActiveItem(); + if (!is_null($oActiveArticle)) { + $aParams['articleId'] = $oActiveArticle->id;",- +TShopModuleArticlelistFilterLastViewed,_AllowCache,"* return the base of the query. overwrite this method for each filter to add custom filtering + * the method should include a query of the form select shop_article.*,... FROM shop_article ... WHERE ... + * NOTE: do not add order info or limit the query (overwrite GetListQueryOrderBy and GetListQueryLimit instead) + * NOTE 2: the query will automatically be restricted to all active articles. + * NOTE 3: you query must include a where statement. + * + * @param TdbShopModuleArticleList $oListConfig + * + * @return string",return false;,- +TShopModuleArticlelistFilterNoticeList,_AllowCache,"* return the base of the query. overwrite this method for each filter to add custom filtering + * the method should include a query of the form select shop_article.*,... FROM shop_article ... WHERE ... + * NOTE: do not add order info or limit the query (overwrite GetListQueryOrderBy and GetListQueryLimit instead) + * NOTE 2: the query will automatically be restricted to all active articles. + * NOTE 3: you query must include a where statement. + * + * @param TdbShopModuleArticleList $oListConfig + * + * @return string",return false;,- +TShopModuleArticlelistFilterRelatedArticles,_GetCacheParameters,"* return the base of the query. overwrite this method for each filter to add custom filtering + * the method should include a query of the form select shop_article.*,... FROM shop_article ... WHERE ... + * NOTE: do not add order info or limit the query (overwrite GetListQueryOrderBy and GetListQueryLimit instead) + * NOTE 2: the query will automatically be restricted to all active articles. + * NOTE 3: you query must include a where statement. + * + * @param TdbShopModuleArticleList $oListConfig + * + * @return string","$aParams = parent::_GetCacheParameters(); + $oShop = TdbShop::GetInstance(); + + $oActiveArticle = $oShop->GetActiveItem(); + if (!is_null($oActiveArticle)) { + $aParams['articleId'] = $oActiveArticle->id;",- +TShopModuleArticlelistFilterSearch,PreventUseOfParentObjectWhenNoRecordsAreFound,* @var bool,return true;,- +TShopModuleArticlelistFilterSearch,_AllowCache,"* prevent the use of the parent object when this filter finds not articles. + * + * @return bool",return false;,- +TShopModuleArticlelistFilterSearch,ModuleInitHook,* @return bool,"parent::ModuleInitHook(); + $oShop = TdbShop::GetInstance(); + if ($oShop->fieldRedirectToNotFoundPageProductSearchOnNoResults) { + /** + * in this case the shop may redirect after running the search. since this occurs in the Execute of the + * module, we need to prevent any other output from being auto-sent to the browser + * @psalm-suppress UndefinedInterfaceMethod + * @FIXME Method `SetBlockAutoFlushToBrowser` only exist on a single implementation of the interface + */ + TGlobal::GetController()->SetBlockAutoFlushToBrowser(true);",- +TShopModuleArticlelistFilterSearchFallbackAll,PreventUseOfParentObjectWhenNoRecordsAreFound,"* prevent the use of the parent object when this filter finds not articles. + * + * @return bool",return $this->getHasSearch();,- +TShopModuleArticlelistFilterSearchFallbackAll,getFallbackListFilter,"* optional allows you to specify a list filter, that will be used instead, if this list filter has 0 matches. + * if set, then this will overwrite, returns the parent as default + * note: this will only be called if PreventUseOfParentObjectWhenNoRecordsAreFound returns false. + * + * @return TdbShopModuleArticleListFilter|null","$aFilterData = $this->sqlData; + /** @var TdbShopModuleArticleListFilter $oFilterObject */ + $oFilterObject = new TShopModuleArticlelistFilterAllArticles(); + $oFilterObject->LoadFromRow($aFilterData); + + return $oFilterObject;",- +TShopOrderStep,Init,"* definiert einen Bestellschritt. +/*","$basket = $this->getShopService()->getActiveBasket(); + $basket->aCompletedOrderStepList[$this->fieldSystemname] = false; + $this->CheckBasketContents(); + + if (false === $this->AllowAccessToStep(true)) { + $this->JumpToStep($this->GetPreviousStep());",- +TShopOrderStep,IsActive,"* is used to mark the current active step within step lists. + * + * @var bool",return true;,- +TShopOrderStep,AllowAccessToStepPublic,"* Called from the init method of the calling module. + * Visitor permissions for the requested step may be checked and the user redirected. + * + * @return void",return $this->AllowAccessToStep();,- +TShopOrderStep,JumpToStep,"* Returns if the step is active and included in the order process. + * + * @return bool","$_SESSION[self::SESSION_KEY_NAME] = $this->fieldSystemname; + $statusCode = 'POST' === $this->getRequest()->getMethod() ? Response::HTTP_SEE_OTHER : Response::HTTP_FOUND; + $this->getRedirect()->redirect($this->getOrderStepPageService()->getLinkToOrderStepPageRelative($oStep), $statusCode);",- +TShopOrderStep,GetStepURL,"* Returns if the user is allowed to view the requested step. + * + * @param bool $bRedirectToPreviousPermittedStep + * + * @return bool","$sOrderPage = ''; + if ($bDisableAccessCheck || $this->AllowAccessToStep()) { + if ($bForcePortalLink) { + $sOrderPage = $this->getOrderStepPageService()->getLinkToOrderStepPageAbsolute($this, $aAdditionalParameter);",- +TShopOrderStep,GetStepURLReturnStepViaAjax,"* Method added to provide public access to the AllowAccessToStep method. + * + * @return bool","$oGlobal = TGlobal::instance(); + $aAdditionalParameter['module_fnc'] = array($oGlobal->GetExecutingModulePointer()->sModuleSpotName => 'ExecuteAjaxCall'); + $aAdditionalParameter['_fnc'] = 'GetStepAsAjax'; + $aAdditionalParameter['sStepName'] = $this->fieldSystemname; + + return $this->GetStepURL($bDisableAccessCheck, $bForcePortalLink, $aAdditionalParameter);",- +TShopOrderStep,ExecuteStep,"* Redirects back to the basket if basket is currently empty. + * + * @return void","if ($this->ProcessStep()) { + $this->ProcessStepSuccessHook(); + $oBasket = TShopBasket::GetInstance(); + $oBasket->aCompletedOrderStepList[$this->fieldSystemname] = true; + $oNextStep = $this->GetNextStep(); + $this->JumpToStep($oNextStep);",- +TShopOrderStep,GetNextStep,"* Returns the step with the systemname $sStepName (language id is taken form the active page object). + * + * @param string $sStepName + * + * @return TdbShopOrderStep|null","static $oNextStep; + if (!$oNextStep) { + $oNextStep = TdbShopOrderStepList::GetNextStep($this);",- +TShopOrderStep,AllowedMethods,@var TdbShopOrderStep $oStep,return array('ExecuteStep');,- +TShopOrderStep,GetHtmlHeadIncludes,@var $oStepData TdbShopOrderStep,return array();,- +TShopOrderStep,GetHtmlFooterIncludes,"* @param string|array|null $sData - either the id of the object to load, or the row with which the instance should be initialized + * @param string|null $sLanguage - init with the language passed + * @return TdbShopOrderStep",return array();,- +TShopOrderStep,GetDescription,"* @param TShopBasket $basket + * @param string $classList comma seperated list of class names + * + * @return TdbShopOrderStep|null","return $this->GetTextField('description', 600, true, $this->GetDescriptionVariables());",- +TShopOrderStep,Render,@var TdbShopOrderStep $classObject,"$oView = new TViewParser(); + + $oView->AddVar('oShop', $this->getShopService()->getActiveShop()); + $oView->AddVar('oStep', $this); + + $oStepNext = $this->GetNextStep(); + $oStepPrevious = $this->GetPreviousStep(); + $oView->AddVar('oStepNext', $oStepNext); + $oView->AddVar('oStepPrevious', $oStepPrevious); + + $sBackLink = $this->GetReturnToLastStepURL(); + $oView->AddVar('sBackLink', $sBackLink); + + $oView->AddVar('sSpotName', $sSpotName); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + + $sViewName = $this->GetRenderViewName(); + $sViewType = $this->GetRenderViewType(); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, $this->getStepViewPath(), $sViewType);",- +TShopOrderStepList,__construct,* the order step list should allow caching of the steps.,"parent::__construct(); + $this->bAllowItemCache = true;",- +TShopOrderStepList,GetActiveStepPosition,"* return the next step in line (null if there no other step). + * + * @param TdbShopOrderStep $oStep + * + * @return TdbShopOrderStep|null","$iActivePos = false; + $iPointer = $this->getItemPointer(); + $this->GoToStart(); + $iStepNumber = 0; + while ($oItem = $this->Next()) { + ++$iStepNumber; + if ($oItem->bIsTheActiveStep) { + $iActivePos = $iStepNumber;",- +TShopOrderStepList,Render,@var TdbShopOrderStep $oNextStep,"$oView = new TViewParser(); + $oView->AddVar('oSteps', $this); + + $oShop = TdbShop::GetInstance(); + $oView->AddVar('oShop', $oShop); + $oView->AddVar('sSpotName', $sSpotName); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopStepBasketCore,JumpToWrapping,"* show the current basket. +/*",// Not yet implemented,- +TShopStepBasketCore,AllowedMethods,"* redirects the user to the wrapping step. + * + * @return void","$externalFunctions = parent::AllowedMethods(); + $externalFunctions[] = 'UpdateBasket'; + + return $externalFunctions;",- +TShopStepBasketCore,GetNextStep,"* returns the link to the previous step (or false if there is none). + * + * @return string","static $oNextStep; + if (!$oNextStep) { + $oUsers = TdbDataExtranetUser::GetInstance(); + if ($oUsers->IsLoggedIn() && $oUsers->HasData()) { + $oBasket = TShopBasket::GetInstance(); + $oBasket->aCompletedOrderStepList['user'] = true; + // now search for the next step not marked as completed + $oStepList = TdbShopOrderStepList::GetList(); + $oStepList->bAllowItemCache = true; + $oNextStep = null; + $bDone = false; + // do not allow access to the last stpe + $iNumItems = $oStepList->Length(); + while (($iNumItems > 0) && !$bDone && ($oTmpStep = $oStepList->Next())) { + --$iNumItems; + if (!$oTmpStep->AllowAccessToStepPublic()) { + // step not completed... + $bDone = true;",- +TShopStepBasketCore,UpdateBasket,"* use this method to add any variables to the render method that you may + * require for some view. + * + * @param string $sViewName - the view being requested + * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) + * + * @return array","// we use the existing basket module to do all the work... + $oShop = TdbShop::GetInstance(); + $oController = TGlobal::GetController(); + $oBasketModule = $oController->moduleLoader->GetPointerToModule($oShop->fieldBasketSpotName); + $bSuccess = $oBasketModule->UpdateBasketItems(null, false, true); + + // redirect to current page + if (!$bInternalCall) { + $this->ReloadCurrentStep();",- +TShopStepConfirmCore,Init,"* method is called from the init method of the calling module. here you can check + * if the step may be viewed, and redirect to another step if the user does not have permission.","// check basket amount.. remove items that may not be ordered + $basket = $this->getShopService()->getActiveBasket(); + $global = TGlobal::instance(); + $basket->ValidateBasketContents($global->GetExecutingModulePointer()->sModuleSpotName); + parent::Init();",- +TShopStepConfirmCore,AllowedMethods,"* returns true if the user may view the step. + * + * @param bool $bRedirectToPreviousPermittedStep + * + * @return bool","$externalFunctions = parent::AllowedMethods(); + if (!is_array($externalFunctions)) { + $externalFunctions = array();",- +TShopStepConfirmCore,ConfirmRemotePayment,"* define any methods of the class that may be called via get or post. + * + * @return array","$oGlobal = TGlobal::instance(); + $oActivePage = $this->getActivePageService()->getActivePage(); + $sErrorCode = $oGlobal->GetUserData('ERRORCODE'); + $this->SaveInExportLog(); + if (empty($sErrorCode)) { + $sUrl = $oActivePage->GetRealURLPlain(array('module_fnc' => array('spota' => 'ExecuteStep'), 'aInput' => array('agb' => 'true')), true);",- +TShopStepOrderCompletedCore,Render,"* we deactivate the basket step... after all, at this point, it has been reset. + * + * @return void","$oUser = TdbDataExtranetUser::GetInstance(); + if (!is_null($oUser->fieldName) && !$oUser->IsLoggedIn()) { + $this->SetLastUserBoughtToSession($oUser);",- +TShopStepOrderCompletedCore,GetLastUserBoughtFromSession,"* returns true if the user may view the step. + * + * @param bool $bRedirectToPreviousPermittedStep + * + * @return bool","$oLastUserBought = null; + if (array_key_exists('sLastUserBought', $_SESSION)) { + $oLastUserBought = $_SESSION['sLastUserBought'];",- +TShopStepOrderCompletedCore,RemoveLastUserBoughtFromSession,"* method should return any variables that should be replaced in the description field. + * + * @return array","if (array_key_exists('sLastUserBought', $_SESSION)) { + unset($_SESSION['sLastUserBought']);",- +TShopStepShippingCore,Init,"* the selected shipping group. + * + * @var TdbShopShippingGroup","parent::Init(); + $inputFilterUtil = $this->getInputFilterUtil(); + + /** @var array|null $shippingData */ + $shippingData = $inputFilterUtil->getFilteredPostInput('aShipping'); + if (null !== $shippingData) { + $this->aRequestData = $shippingData; + if (!is_array($this->aRequestData)) { + $this->aRequestData = array();",- +TShopStepShippingCore,ChangeShippingGroup,"* selected payment group. + * + * @var TdbShopPaymentMethod","$oBasket = TShopBasket::GetInstance(); + $this->oActiveShippingGroup = $oBasket->GetActiveShippingGroup(); + // check if the group is still valid. if not, reload using default + if (!$this->oActiveShippingGroup || false == $this->oActiveShippingGroup->IsAvailable()) { + $oBasket->SetActiveShippingGroup(null); + $oBasket->SetBasketRecalculationFlag(true); + $this->oActiveShippingGroup = $oBasket->GetActiveShippingGroup();",- +TShopStepShippingCore,AllowedMethods,* @var array,"$aExternalFunctions = parent::AllowedMethods(); + if (!is_array($aExternalFunctions)) { + $aExternalFunctions = array();",- +TShopStepShippingCore,GetHtmlHeadIncludes,"* method is called from the init method of the calling module. here you can check + * if the step may be viewed, and redirect to another step if the user does not have permission.","$aIncludes = parent::GetHtmlHeadIncludes(); + + if (isset($this->oActiveShippingGroup)) { + $oPaymentMethodList = TShopBasket::GetInstance()->GetAvailablePaymentMethods(); + if ($oPaymentMethodList) { + while ($oPaymentMethod = $oPaymentMethodList->Next()) { + $oPaymentHandler = $oPaymentMethod->GetFieldShopPaymentHandler(); + + if (method_exists($oPaymentHandler, 'GetHtmlHeadIncludes')) { + $aAdditionalIncludes = $oPaymentHandler->GetHtmlHeadIncludes(); + if (count($aAdditionalIncludes) > 0) { + $aIncludes = array_merge($aIncludes, $aAdditionalIncludes);",- +TShopStepUserDataCore,Init,"* @deprecated - you should use TShopStepUserDataV2 instead +/*","parent::Init(); + $oUser = TdbDataExtranetUser::GetInstance(); + if ($oUser->IsLoggedIn()) { + $oBasket = TShopBasket::GetInstance(); + $oBasket->aCompletedOrderStepList[$this->fieldSystemname] = true;",- +TShopStepUserDataCore,AllowedMethods,@var bool,"$externalFunctions = parent::AllowedMethods(); + $externalFunctions[] = 'ShowShippingAddressInput'; + $externalFunctions[] = 'HideShippingAddressInput'; + + $externalFunctions[] = 'UpdateUser'; + $externalFunctions[] = 'Register'; + $externalFunctions[] = 'UpdateUserAddress'; + $externalFunctions[] = 'Login'; + + $externalFunctions[] = 'SelectBillingAddress'; + $externalFunctions[] = 'SelectShippingAddress'; + $externalFunctions[] = 'DeleteShippingAddress'; + + return $externalFunctions;",- +TShopStepUserDataCore,UpdateUser,@var TdbPkgNewsletterUser|null,$this->CallExtranetModuleMethod('UpdateUser');,- +TShopStepUserDataCore,Register,"* returns true if the user may view the step. + * + * @param bool $bRedirectToPreviousPermittedStep + * + * @return bool",$this->CallExtranetModuleMethod('Register');,- +TShopStepUserDataCore,UpdateUserAddress,"* method is called from the init method of the calling module. here you can check + * if the step may be viewed, and redirect to another step if the user does not have permission.",$this->CallExtranetModuleMethod('UpdateUserAddress');,- +TShopStepUserDataCore,Login,"* @param bool $bState + * + * @return void",$this->CallExtranetModuleMethod('Login');,- +TShopStepUserDataCore,SelectBillingAddress,"* use this method to add any variables to the render method that you may + * require for some view. + * + * @param string $sViewName - the view being requested + * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) + * + * @return array",$this->CallExtranetModuleMethod('SelectBillingAddress');,- +TShopStepUserDataCore,SelectShippingAddress,"* define any methods of the class that may be called via get or post. + * + * @return array",$this->CallExtranetModuleMethod('SelectShippingAddress');,- +TShopStepUserDataCore,DeleteShippingAddress,* @return void,$this->CallExtranetModuleMethod('DeleteShippingAddress');,- +TShopStepUserDataCore,ShowShippingAddressInput,* @return void,"$this->SetShowShippingAddressInputState(true); + $this->ProcessStep(true);",- +TShopStepUserDataCore,HideShippingAddressInput,* @return void,"$this->SetShowShippingAddressInputState(false); + $this->ProcessStep(true);",- +via,AllowedMethods,"* ChangeShipToBillingState - pass a non empty value if you are only changing the state of ship to billing or not + * (this will prevent the method from validating and executing the form. + * + * + * the step can operate in three modes: a) register a new user, b) edit an existing user, c) shop as guest + * which state is active can be checked via TShopStepUserDataV2::GetUserMode(). + * you can change the state by calling TShopStepUserDataV2::SetUserMode($sMode) + * the data is stored in session and the methods static so you can call them from other steps + * + * you may also use this step in combination with TShopStepLogin - which will set the mode based on the user selection + * + * + * IMPORTANT: you should always access the class via ""TShopStepUserDataV2"" (the virtual class entry point) + * IMPORTANT2: this is a replacement of TShopStepUserDataCore - it is recommended using this newer version +/*","$aExternalFunctions = parent::AllowedMethods(); + $aExternalFunctions[] = 'ChangeSelectedAddress'; + + return $aExternalFunctions;",- +via,Init,"* holds the user data passed to the form. default. use the Get* and Set* methods to change/read contents from the array + * do not access it directly! + * + * @var array","parent::Init(); + + $this->bUserDataSubmission = false; + + $this->InitUserData(); + + // primary address should be initialized first + if (TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING == $this->AddressUsedAsPrimaryAddress()) { + $this->InitShippingAddress(); + $this->InitBillingAddress();",- +via,ChangeSelectedAddress,"* set to true if the parameter ChangeShipToBillingState is past with any none-empty value via get/post + * use IsChangeShipToBillingStateRequest() to check if this is the case. + * + * @var bool","$this->SetPreventProcessStepMethodFromExecuting(true); + // the method only works if the user is logged in + $oUser = self::getExtranetUserProvider()->getActiveUser(); + if ($oUser->IsLoggedIn()) { + /** @var string $sNewShippingAddressId */ + $sNewShippingAddressId = $this->GetShippingAddressData('selectedAddressId'); + /** @var string $sNewBillingAddressId */ + $sNewBillingAddressId = $this->GetBillingAddressData('selectedAddressId'); + + if ('1' == $this->GetShipToBillingAddress()) { + if (0 != strcmp($sNewBillingAddressId, $sNewShippingAddressId)) { + if (TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING == $this->AddressUsedAsPrimaryAddress()) { + $sNewShippingAddressId = $sNewBillingAddressId;",- +TShopStepWrappingCore,IsActive,"* returns true if the user may view the step. + * + * @param bool $bRedirectToPreviousPermittedStep + * + * @return bool","$bIsActive = $this->GetFromInternalCache('bIsActive'); + if (null === $bIsActive) { + $bIsActive = parent::IsActive(); + if ($bIsActive) { + // wrapping only if wrapping is set + $bIsActive = false; + $oWrapping = TdbShopWrappingList::GetList(); + if ($oWrapping->Length() > 0) { + $bIsActive = true;",- +TShopPaymentHandler,GetUserInputTargetURL,"* the paymenthandlers are used to handle the different payment methods. They ensure that the right + * information is collected from the user, and that the payment is executed (as may be the case for online payment) + * Note that the default handler has no functionality. it must be extended in order to do anything useful. +/*",return '';,- +TShopPaymentHandler,SetOwningPaymentMethodId,* @var IPkgShopOrderPaymentConfig,$this->sOwningPaymentMethodId = $sPaymentMethodId;,- +TShopPaymentHandler,SetPaymentUserData,"* user data for payment. + * + * @var array",$this->aPaymentUserData = $aPaymentUserData;,- +TShopPaymentHandler,GetHtmlHeadIncludes,"* set by the payment method using this handler. access the property using the getter and setter for it. + * + * @var string",return array();,- +TShopPaymentHandler,ShowNextStepbutton,"* return the URL to which the user input is send. using this method you can redirect the input + * to go directly to, for example, the payment provider. if you return an empty string, the default target (ie the payment + * data entry step) will be used + * Important: for this method to have any affect, you will need to make sure that each payment method has its + * own form in the view. + * + * @return string",return true;,- +TShopPaymentHandler,setConfigData,"* set the owning payment method. + * + * @param string $sPaymentMethodId + * + * @return void",$this->configData = $configData;,- +TShopPaymentHandler,GetConfigParameter,"* getter for the owning payment method. + * + * @return string|null","if (null === $this->configData) { + throw new ConfigurationException('Payment handler is not configured. Please do only initialize a payment handler through the ShopPaymentHandlerFactory');",- +TShopPaymentHandler,getEnvironment,"* return an instance of the correct class type for the filter identified by $id + * Do not call this method directly. Instead use the service chameleon_system_shop.payment.handler_factory to + * create payment handlers. + * + * @param int $id + * + * @return TdbShopPaymentHandler|null",return $this->configData->getEnvironment();,- +TShopPaymentHandler,GetFieldShopPaymentHandlerParameterList,"* @param array $row + * @param string|null $languageId + * + * @return TdbShopPaymentHandler","$oList = TdbShopPaymentHandlerParameterList::GetListForShopPaymentHandlerId($this->id, $this->iLanguageId); + $oList->ChangeOrderBy(array('cms_portal_id' => 'ASC')); //make sure parameters without portal come first + return $oList;",- +TShopPaymentHandler,ExecutePayment,* @var $instance TdbShopPaymentHandler,return true;,- +TShopPaymentHandler,PostExecutePaymentHook,"* allows you to overwrite the payment data - use it when, for example, you load + * the payment handler for an order. + * + * @param array $aPaymentUserData - assoc array of the parameter + * + * @return void","$bPaymentOk = true; + $aData = $oOrder->sqlData; + $aData['system_order_payment_method_executed'] = '1'; + $aData['system_order_payment_method_executed_date'] = date('Y-m-d H:i:s'); + $oOrder->LoadFromRow($aData); + $oOrder->AllowEditByAll(true); + $oOrder->Save(); + + return $bPaymentOk;",- +TShopPaymentHandler,postExecutePaymentInterruptedHook,"* html head includes to use in the shipping step if the payment method is available. + * + * @return string[]",return true;,- +TShopPaymentHandler,ValidateUserInput,* @return bool,"$this->GetUserPaymentData(); // load user data... + // then validate... + + return true;",- +TShopPaymentHandler,SaveUserPaymentDataToOrder,* @return IPkgShopOrderPaymentConfig,"$aUserPaymentData = $this->GetUserPaymentData(); + $aUserPaymentData = $this->PreSaveUserPaymentDataToOrderHook($aUserPaymentData); + if (is_array($aUserPaymentData)) { + $query = ""DELETE FROM `shop_order_payment_method_parameter` WHERE `shop_order_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($iOrderId).""'""; + MySqlLegacySupport::getInstance()->query($query); + foreach ($aUserPaymentData as $keyId => $keyVal) { + $oPaymentParameter = TdbShopOrderPaymentMethodParameter::GetNewInstance(); + /** @var $oPaymentParameter TdbShopOrderPaymentMethodParameter */ + $aTmpData = array('shop_order_id' => $iOrderId, 'name' => $keyId, 'value' => $keyVal); + $oPaymentParameter->AllowEditByAll(true); + $oPaymentParameter->LoadFromRow($aTmpData); + $oPaymentParameter->Save();",- +TShopPaymentHandler,GetUserPaymentDataItem,"* @param IPkgShopOrderPaymentConfig $configData + * + * @return void","$aPaymentData = $this->GetUserPaymentData(); + $sReturn = false; + if (is_array($aPaymentData) && isset($aPaymentData[$sItemName])) { + $sReturn = $aPaymentData[$sItemName];",- +TShopPaymentHandler,GetUserPaymentDataWithoutLoading,"* return a config parameter for the payment handler. + * + * @param string $sParameterName - the system name of the handler + * + * @return string|false + * + * @throws ConfigurationException",return $this->aPaymentUserData;,- +TShopPaymentHandler,Render,* @return string,"$oView = new TViewParser(); + + $oShop = TdbShop::GetInstance(); + $oView->AddVar('oShop', $oShop); + $oView->AddVar('oPaymentHandler', $this); + + $aUserPaymentData = $this->GetUserPaymentData(); + $oView->AddVar('aUserPaymentData', $aUserPaymentData); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, $this->GetViewPath(), $sViewType);",- +TShopPaymentHandler,PostSelectPaymentHook,* @return TdbShopPaymentHandlerParameterList,return true;,- +TShopPaymentHandler,PostProcessExternalPaymentHandlerHook,"* Executes payment for an order. This method is called when the user confirmed the order. + * If you need to transfer control to an external process (as may be required for 3d secure), use + * self::SetExecutePaymentInterrupt(true) before passing control. This tells the shop to continue order execution + * as soon as control is passed back to it. (Chameleon will call $this->PostExecutePaymentHook() as soon as control + * is returned - this is where you should check if the returned data is valid/invalid. + * + * @param TdbShopOrder $oOrder + * @param string $sMessageConsumer - send error messages here + * + * @return bool true if the payment was executed successfully, else false",return true;,- +TShopPaymentHandler,AllowUse,"* Set the ExecutePaymentInterrupt. If it is set to active, then the next request to the + * basket page will auto. + * + * @param bool $bActive + * + * @return void",return true;,- +TShopPaymentHandler,GetExternalPaymentReferenceIdentifier,"* return true if the ExecutePayment was interrupted and needs to be continued... + * + * @return bool",return '';,- +TShopPaymentHandler,GetExternalPaymentTypeIdentifier,"* The method is called from TShopBasket AFTER ExecutePayment was successfully executed. + * The method is ALSO called, if the payment handler passed execution to an external service from within the ExecutePayment + * Method. Note: if you return false, then the system will return to the called order step and the + * order will be cancled (shop_order.canceled = 1) - the article stock will be returned. + * + * if you return true, then the order is marked as paid. + * + * Note: system_order_payment_method_executed will be set to true either way + * + * @param TdbShopOrder $oOrder + * @param string $sMessageConsumer - send error messages here + * + * @return bool",return '';,- +TShopPaymentHandler,BeforeJumpToThankYouStepAfterInterruptedPaymentHook,"* method is called only if the user returns from an execute payment call that was interrupted. this is called before + * PostExecutePaymentHook. If the method returns false, or if an exception is thrown, then the order is canceled. + * + * @param TdbShopOrder $oOrder + * @param string $sMessageConsumer + * + * @throws TPkgCmsException_LogAndMessage + * + * @return bool",,- +TShopPaymentHandler,OnPaymentErrorAfterInterruptedPaymentHook,"* return true if the user data is valid + * data is loaded from GetUserPaymentData(). + * + * @return bool",,- +TShopPaymentHandler,isBlockForUserSelection,"* store user payment data in order. + * + * @param int $iOrderId + * + * @return void",return $this->fieldBlockUserSelection;,- +TShopPaymentHandlerCreditCard,ValidateUserInput,"* the paymenthandlers are used to handle the different payment methods. They ensure that the right + * information is collected from the user, and that the payment is executed (as may be the case for online payment) + * Note that the default handler has no functionality. it must be extended in order to do anything usefull. +/*","$bIsValid = parent::ValidateUserInput(); + + if ($bIsValid) { + $oMsgManager = TCMSMessageManager::GetInstance(); + + $aDefaultVals = $this->GetDefaultUserPaymentData(); + + foreach (array_keys($aDefaultVals) as $sField) { + if (!array_key_exists($sField, $this->aPaymentUserData) || empty($this->aPaymentUserData[$sField])) { + $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-'.$sField, 'ERROR-USER-REQUIRED-FIELD-MISSING'); + $bIsValid = false;",- +TShopPaymentHandlerCreditCard,ExecutePayment,"* return the default payment data for the handler. + * + * @return array","$bPaymentOk = true; + // run order.... + + return $bPaymentOk;",- +TShopPaymentHandlerCreditCard,SaveUserPaymentDataToOrder,"* return true if the user data is valid + * data will be passed as an array. + * + * @param array $aUserData - the user data + * + * @return bool","$aPayment = $this->aPaymentUserData; + $this->aPaymentUserData = array(); + + $this->aPaymentUserData['creditCardType'] = $aPayment['creditCardType']; + $this->aPaymentUserData['creditCardNumber'] = str_pad(substr($aPayment['creditCardNumber'], 0, 4), 10, '*'); + $this->aPaymentUserData['creditCardOwnerName'] = $aPayment['creditCardOwnerName']; + $this->aPaymentUserData['creditCardValidToMonth'] = $aPayment['creditCardValidToMonth']; + $this->aPaymentUserData['creditCardValidToYear'] = $aPayment['creditCardValidToYear']; + $this->aPaymentUserData['creditCardChecksum'] = '***'; + + parent::SaveUserPaymentDataToOrder($iOrderId); + + $this->aPaymentUserData = $aPayment;",- +for,PostSelectPaymentHook,"* This is the base class for DataTrans Paymenthandler. If you want to add a new payment method. +/*","$bContinue = parent::PostSelectPaymentHook($sMessageConsumer); + $this->sTransactionId = false; + if (true == $bContinue) { + $bContinue = $this->CheckAuthorisationResponse();",- +for,GetMsgManagerName,"* Transaction id for DataTrans authorisation. Needed for settlement authorised transactions. + * + * @var bool|string",return '';,- +for,GetPaymentType,"* Reference number for each authorisation. Was set after redirecting from DataTrans. + * Reference number has to be a unique for each authorisation. + * Reference number was build with crc32 from basket identifier__payment type identifier__count + * Count was needed because the first to parts are not unique. + * + * @var false|int",return '';,- +for,GetUserInputTargetURL,"* Count for reference number. + * To Get the reference number unique we add this count at the end. + * + * @var int",return $this->GetTestLiveModeParameter('payment_url');,- +for,ExecutePayment,"* Was set after authorisation with the authorised amount. + * Was used on create order to check if amount has changed. + * + * @var bool","$bPaymentOk = parent::ExecutePayment($oOrder); + if ($bPaymentOk) { + if ($oOrder->fieldValueTotal * 100 == $this->sAuthorisedAmount) { + $bPaymentOk = $this->ExecuteDataTransPaymentCall($oOrder);",- +TShopPaymentHandlerDataTrans_CreditCard,GetMsgManagerName,* constant for class specific error messages.,return self::MSG_MANAGER_NAME;,- +TShopPaymentHandlerDataTrans_CreditCard,GetPaymentType,* constant for class specific payment type.,return self::PAYMENT_TYPE;,- +TShopPaymentHandlerDataTrans_SwissPostFinance,GetMsgManagerName,* constant for class specific error messages.,return self::MSG_MANAGER_NAME;,- +TShopPaymentHandlerDataTrans_SwissPostFinance,GetPaymentType,* constant for class specific payment type.,return self::PAYMENT_TYPE;,- +TShopPaymentHandlerDataTrans_SwissPostFinance,AllowUse,* constant for class specific payment reference id.,"$bAllowUse = parent::AllowUse($oPaymentMethod); + if ($bAllowUse) { + if (preg_match('/Chrome/i', $_SERVER['HTTP_USER_AGENT']) || preg_match('/Opera/i', $_SERVER['HTTP_USER_AGENT'])) { + $bAllowUse = false;",- +TShopPaymentHandlerDebit,ValidateUserInput,"* the paymenthandlers are used to handle the different payment methods. They ensure that the right + * information is collected from the user, and that the payment is executed (as may be the case for online payment) + * Note that the default handler has no functionality. it must be extended in order to do anything usefull. +/*","$bIsValid = parent::ValidateUserInput(); + + if ($bIsValid) { + $oMsgManager = TCMSMessageManager::GetInstance(); + $required = array('iban'); + if (!self::isGermanIBAN($this->aPaymentUserData['iban'])) { + $required[] = 'bic';",- +TShopPaymentHandlerDebit,ExecutePayment,"* return the default payment data for the handler. + * + * @return array","$bPaymentOk = true; + // run order.... + + return $bPaymentOk;",- +TShopPaymentHandlerDebitNoSEPA,ValidateUserInput,"* the paymenthandlers are used to handle the different payment methods. They ensure that the right + * information is collected from the user, and that the payment is executed (as may be the case for online payment) + * Note that the default handler has no functionality. it must be extended in order to do anything usefull. +/*","$bIsValid = parent::ValidateUserInput(); + + if ($bIsValid) { + $oMsgManager = TCMSMessageManager::GetInstance(); + + if (!array_key_exists('accountOwner', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountOwner'])) { + $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountOwner', 'ERROR-USER-REQUIRED-FIELD-MISSING'); + $bIsValid = false;",- +TShopPaymentHandlerDebitNoSEPA,ExecutePayment,"* return the default payment data for the handler. + * + * @return array","$bPaymentOk = true; + // run order.... + + return $bPaymentOk;",- +TShopPaymentHandlerInvoice,SaveUserPaymentDataToOrder,"* the paymenthandlers are used to handle the different payment methods. They ensure that the right + * information is collected from the user, and that the payment is executed (as may be the case for online payment) + * Note that the default handler has no functionality. it must be extended in order to do anything usefull. +/*","$this->aPaymentUserData = array(); + parent::SaveUserPaymentDataToOrder($iOrderId);",- +TShopPaymentHandlerIPaymentEndPoint,PostSelectPaymentHook,"* don't use this Class to set up an payment handler because this call has only + * standard content. Use TShopPaymentHandlerIPaymentCreditCard or TShopPaymentHandlerIPaymentDebit instead.","$bContinue = parent::PostSelectPaymentHook($sMessageConsumer); + if (true == $bContinue) { + // we need a non empty sStorageId to continue + if (empty($this->sStorageId)) { + $bContinue = false;",- +TShopPaymentHandlerIPaymentEndPoint,GetUserInputTargetURL,* constant for class specific error messages.,return $this->GetRequestURL();,- +TShopPaymentHandlerIPaymentEndPoint,getRequestParameters,* System sets constant to url that the system knows its a ipayment call.,"$aViewVariables = array(); + + $aTmp = $this->GetAllInputFieldParameter(); + foreach (array_keys($aTmp) as $sTmpKey) { + $aViewVariables[$sTmpKey] = $aTmp[$sTmpKey];",- +TShopPaymentHandlerIPaymentEndPoint,PostProcessExternalPaymentHandlerHook,"* id for saved payment data on ipayment server. + * + * @var string|false|null","$bPaymentTransmitOk = parent::PostProcessExternalPaymentHandlerHook(); + if ($bPaymentTransmitOk) { + $oGlobal = TGlobal::instance(); + $sStatus = $oGlobal->GetUserData('ret_status'); + if ('ERROR' == $sStatus) { + $this->SetErrorCodesFromResponseToMessageManager(); + $bPaymentTransmitOk = false;",- +TShopPaymentHandlerIPaymentEndPoint,ExecutePayment,"* method is called after the user selected his payment and submitted the payment page + * return false if you want to send the user back to the payment selection page. + * + * DeuCS performs no processing at this step. we keep the overwritten function here only to clarity + * + * @param string $sMessageConsumer - the name of the message handler that can display messages if an error occurs (assuming you return false) + * + * @return bool","$bPaymentOk = parent::ExecutePayment($oOrder); + if ($bPaymentOk) { + TdbShopPaymentHandler::SetExecutePaymentInterrupt(true); + /** + * @psalm-suppress NoValue + * @FIXME `ExecuteIPaymentCall` never returns since it redirects, there is no return value to track. + */ + $bPaymentOk = $this->ExecuteIPaymentCall($oOrder);",- +TShopPaymentHandlerIPaymentEndPoint,PostExecutePaymentHook,"* return the URL to which the user input is send. using this method you can redirect the input + * to go directly to, for example, the payment provider. if you return an empty string, the default target (ie the payment + * data entry step) will be used. + * + * @return string","$bPaymentOk = false; + $oGlobal = TGlobal::instance(); + + $aResult = $this->GetNeedeResponsePostParameterForSecurityCheck(); + $aResult['ret_status'] = $oGlobal->GetUserData('ret_status'); + $this->aPaymentUserData = $aResult; + $this->aPaymentUserData['sStorageId'] = $this->sStorageId; + $this->aPaymentUserData['aReturnPayload'] = print_r($this->aPaymentUserData, true); + $this->aPaymentUserData['bChameleonPaymentOk'] = '0'; + if (count($aResult) > 0 && array_key_exists('ret_status', $aResult) && 'SUCCESS' == $aResult['ret_status']) { + $bPaymentOk = true;",- +TShopPaymentHandlerIPaymentEndPoint,GetExternalPaymentReferenceIdentifier,"* Get path to view location. + * + * @return string","$sIdent = ''; + if (is_array($this->aPaymentUserData) && array_key_exists('ret_trx_number', $this->aPaymentUserData)) { + $sIdent = $this->aPaymentUserData['ret_trx_number'];",- +TShopPaymentHandlerMontrada,PostSelectPaymentHook,@var string|null,"$bContinue = parent::PostSelectPaymentHook($sMessageConsumer); + if ($bContinue) { + $bContinue = $this->CallMontradaFormService($sMessageConsumer);",- +TShopPaymentHandlerMontrada,GetAnswerFromServer,"@var array|null","$bSuccess = false; + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $this->GetConfigParameter('url')); + curl_setopt($ch, CURLOPT_VERBOSE, 1); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_HEADER, 1); + curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)'); + curl_setopt($ch, CURLOPT_REFERER, $_SERVER['REQUEST_URI']); + + $aParameter = array(); + foreach ($aData as $sKey => $sVal) { + if (!array_key_exists($sKey, $aParameter)) { + $aParameter[$sKey] = $sVal;",- +TShopPaymentHandlerMontrada,GetConfigParameter,"* method is called after the user selected his payment and submitted the payment page + * return false if you want to send the user back to the payment selection page. + * + * @param string $sMessageConsumer - the name of the message handler that can display messages if an error occurs (assuming you return false) + * + * @return bool","static $bUseSandbox = null; + if (is_null($bUseSandbox)) { + $bUseSandbox = (IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX === $this->getEnvironment());",- +TShopPaymentHandlerMontrada,PostProcessExternalPaymentHandlerHook,"* return timestamp in a montrada usable format. + * + * @return string","$bPaymentTransmitOk = parent::PostProcessExternalPaymentHandlerHook(); + if ($bPaymentTransmitOk) { + $oGlobal = TGlobal::instance(); + $aUserData = $oGlobal->GetUserData(); + + // check if return data is ok... + $aReqFields = array('merchid', 'orderid', 'amount', 'currency', 'result', 'timestamp', 'psphash'); + foreach ($aReqFields as $sFieldName) { + $bPaymentTransmitOk = ($bPaymentTransmitOk && array_key_exists($sFieldName, $aUserData));",- +TShopPaymentHandlerMontrada,ExecutePayment,"* calculate request hash. + * + * @param array $aInput + * + * @return string","$bPaymentOk = parent::ExecutePayment($oOrder); + + $aCommand = array('trefnum' => $this->sMontradaTransactionId, 'amount' => round($oOrder->fieldValueTotal * 100)); + $aAnswer = $this->ExecuteRequestCall('capture', $aCommand); + if (array_key_exists('rc', $aAnswer) && '000' == $aAnswer['rc']) { + $bPaymentOk = true; + // add the response data to the order + foreach ($aAnswer as $sKey => $sVal) { + if (!array_key_exists($sKey, $this->aPaymentUserData)) { + $this->aPaymentUserData[$sKey] = $sVal;",- +TShopPaymentHandlerMontrada,ExecuteRequestCall,"* calculate response hash. + * + * @param array $aInput + * + * @return string","//setting the curl parameters. + $ch = curl_init(); + + $password = $this->GetConfigParameter('pwd'); + $username = $this->GetConfigParameter('userName'); + $url = $this->GetConfigParameter('sPoshCommandUrl'); + $aRequestString['command'] = $methodName; + $sRequestString = TTools::GetArrayAsURL($aRequestString); + $sRequestString = str_replace('&', '&', $sRequestString); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_FAILONERROR, 1); + + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); + + curl_setopt($ch, CURLOPT_USERPWD, ""$username:$password""); + curl_setopt($ch, CURLOPT_POSTFIELDS, $sRequestString); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + + curl_setopt($ch, CURLOPT_POST, 1); + + //if USE_PROXY constant set to TRUE in Constants.php, then only proxy will be enabled. + //Set proxy name to PROXY_HOST and port number to PROXY_PORT in constants.php + // curl_setopt ($ch, CURLOPT_PROXY, PROXY_HOST."":"".PROXY_PORT); + + //getting response from server + $response = curl_exec($ch); + $aResponse = $this->ExtractResponse($response); + + $sError = curl_error($ch); + $sErrorNr = curl_errno($ch); + + if ($sErrorNr) { + // moving to display page to display curl errors + // $_SESSION['curl_error_no']=curl_errno($ch) ; + // $_SESSION['curl_error_msg']=curl_error($ch); + // $location = ""APIError.php""; + // header(""Location: $location"");",- +TShopPaymentHandlerMontrada,ExtractResponse,"* return the URL to the montrada form service. + * + * @param string $sMessageConsumer - the name of the message handler that can display messages if an error occurs (assuming you return false) + * + * @return bool","$intial = 0; + $nvpArray = array(); + + while (strlen($nvpstr)) { + //postion of Key + $keypos = strpos($nvpstr, '='); + //position of value + $valuepos = strpos($nvpstr, '&') ? strpos($nvpstr, '&') : strlen($nvpstr); + + /*getting the Key and Value values and storing in a Associative Array*/ + $keyval = substr($nvpstr, $intial, $keypos); + $valval = substr($nvpstr, $keypos + 1, $valuepos - $keypos - 1); + //decoding the respose + $nvpArray[urldecode($keyval)] = urldecode($valval); + $nvpstr = substr($nvpstr, $valuepos + 1, strlen($nvpstr));",- +TShopPaymentHandlerMontrada,GetExternalPaymentReferenceIdentifier,"* Send Call per POST to montrada. Response is a moved permanently header which we pass through. + * + * @param array $aData - the post data to be send to montrada + * @param string $sMessageConsumer + * + * @return bool","$sIdent = ''; + if (is_array($this->aPaymentUserData) && array_key_exists('trefnum', $this->aPaymentUserData)) { + $sIdent = $this->aPaymentUserData['trefnum'];",- +TShopPaymentHandlerOgone,ExecutePayment,"* executes payment for order. this method is called, wenn the user confirmed the + * order. if you need to transfer controll to an external process (as may be required for 3d secure) + * then you can use self::SetExecutePaymentInterrupt(true) before passing controll. this tells + * the shop to continue order execution as soon as controll is passed back to it. (chameleon will + * call $this->PostExecutePaymentHook() as soon as controll is returned - this is where you should + * check if the data returnd is valid/invalid. + * + * Redirect to ogone payment service + * + * @param TdbShopOrder $oOrder + * @param string $sMessageConsumer - send error messages here + * + * @return bool","TTools::WriteLogEntry('In ExecutePayment Ogone for order id '.$oOrder->id."" (nr: {$oOrder->fieldOrdernumber",- +TShopPaymentHandlerOgone,PostExecutePaymentHook,"* return url to ogone payment service with all needed parameter. + * + * @param TdbShopOrder $oOrder + * + * @return string","$bPaymentOk = parent::PostExecutePaymentHook($oOrder, $sMessageConsumer); + if ($bPaymentOk) { + $oGlobal = TGlobal::instance(); + $sPaymentStatus = false; + if ($oGlobal->UserDataExists('STATUS')) { + $sPaymentStatus = $oGlobal->GetUserData('STATUS');",- +TShopPaymentHandlerOgoneAliasGateway,ValidateUserInput,* @return string,"$bValid = parent::ValidateUserInput(); + + $bValid = ($bValid && $this->CheckIncomingHash(TGlobal::instance()->GetUserData())); + + return $bValid;",- +TShopPaymentHandlerOgoneBase,HandleNotifyMessage,"* !!!ATTENTION: This never worked as expected, so if you want to use PayPal with OGONE, you have to work on this. + * +/*","TTools::WriteLogEntry('OGONE: handle notify message: '.print_r($aParameter, true), 1, __FILE__, __LINE__); + if ($this->CheckIncomingHash($aParameter)) { + $aParameter = array_change_key_case($aParameter, CASE_UPPER); + $oOrder = TdbShopOrder::GetNewInstance(); + if ($oOrder->LoadFromField('ordernumber', $aParameter['ORDERID'])) { + $sPaymentState = $aParameter['STATUS']; + $this->HandleNotifyMessageForPaymentState($sPaymentState, $aParameter, $oOrder);",- +TShopPaymentHandlerOgoneDirectLinkWithAliasGateway,PostSelectPaymentHook,* define message manager consumer name.,"$bContinue = parent::PostSelectPaymentHook($sMessageConsumer); + if ($bContinue) { + if (isset($this->aPaymentUserData['STATUS'])) { + if ('0' == $this->aPaymentUserData['STATUS']) { + //we just created an alias, so create a transaction + $bContinue = $this->ExecuteExternalPaymentCall();",- +TShopPaymentHandlerOgoneDirectLinkWithAliasGateway,PostProcessExternalPaymentHandlerHook,"* parsed xml response data. + * + * @var array","$bPaymentTransmitOk = parent::PostProcessExternalPaymentHandlerHook(); + if ($bPaymentTransmitOk) { + $oGlobal = TGlobal::instance(); + $aUserData = $oGlobal->GetUserData(); + $bPaymentTransmitOk = $this->GetTransactionStatus($aUserData['PAYID']);",- +TShopPaymentHandlerOgoneDirectLinkWithAliasGateway,ExecutePayment,"* return the path to the views for the payment handler relative to library/classes. + * + * @return string","$bPaymentOk = parent::ExecutePayment($oOrder); + + if ($bPaymentOk && $this->TransactionMatchesCurrentBasketState()) { + $bPaymentOk = $this->UpdateTransaction('SAS'); //capture",- +TShopPaymentHandlerOgoneDirectLinkWithAliasGateway,PostExecutePaymentHook,"* use this method to add any variables to the render method that you may + * require for some view. + * + * @param string $sViewName - the view being requested + * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) + * + * @return array","$aDirectLinkPaymentUserDataFields = self::GetDirectLinkResponsePaymentUserDataFields(); + + foreach ($this->aXMLResponseData as $sKey => $sValue) { + if (in_array(self::GetDirectLinkResponsePaymentUserDataFieldPrefix().$sKey, $aDirectLinkPaymentUserDataFields)) { + $this->aPaymentUserData[self::GetDirectLinkResponsePaymentUserDataFieldPrefix().$sKey] = $sValue;",- +TShopPaymentHandlerPayOne,ValidateUserInput,* @psalm-suppress UndefinedClass - financegate* classes do not exist,"$bIsValid = parent::ValidateUserInput(); + + if ($bIsValid) { + $oMsgManager = TCMSMessageManager::GetInstance(); + + $sField = 'pseudocardpan'; + if (!array_key_exists($sField, $this->aPaymentUserData) || empty($this->aPaymentUserData[$sField])) { + $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-'.$sField, 'ERROR-USER-REQUIRED-FIELD-MISSING'); + $bIsValid = false;",- +TShopPaymentHandlerPayOne,SaveUserPaymentDataToOrder,* MessageManager listener name.,"$aUserPaymentData = $this->GetUserPaymentData(); + if (isset($_SESSION['PayOneResponse']) && is_array($_SESSION['PayOneResponse'])) { + $aUserPaymentData = array_merge($aUserPaymentData, $_SESSION['PayOneResponse']);",- +TShopPaymentHandlerPayOne,GetHtmlHeadIncludes,* System constant to identify 3DSREDIRECT.,"$aIncludes[] = ''; + $sTmpJs = $this->GetJsMethods(); + foreach ($sTmpJs as $sK => $sV) { + $aIncludes[] = $sV;",- +TShopPaymentHandlerPayOne,ExecutePayment,"* if true the credit card expiration date will be submitted to the shop + * note: maybe this isn`t allowed by the credit card company (PCI). + * + * @var bool","$bPaymentOk = parent::ExecutePayment($oOrder, $sMessageConsumer); + + $aParams = array(); + // payment preauthorization values + if (isset($_SESSION['3ds_payment'])) { + $aParams = $_SESSION['3ds_payment']; + unset($_SESSION['3ds_payment']);",- +TShopPaymentHandlerPayOne,PostSelectPaymentHook,"* if true, the credit card validation is extended by a manual secure code check + * (redirect to credit card company gateway). + * + * @var bool - default = true","$bSuccess = parent::PostSelectPaymentHook($sMessageConsumer); + if ($bSuccess) { + $sDebugMsg = ''; + $bSuccess = false; + if ($this->bUse3DSecure) { + $aPayOneResponse = $this->PayOne3dSecure_3dScheck(); + if ($aPayOneResponse['success']) { + // Payment is finished - we don't need to redirect to Secure-PIN-URL! + // Redirecting to next step... + $bSuccess = true;",- +TShopPaymentHandlerPayOne,PostProcessExternalPaymentHandlerHook,"* Get path to view location. + * + * @return string","$bPaymentTransmitOk = parent::PostProcessExternalPaymentHandlerHook(); + if ($bPaymentTransmitOk) { + $oURLData = TCMSSmartURLData::GetActive(); + // If 3D-Secure Authentification fails, the ECI value is empty + if (!empty($oURLData->aParameters['eci']) && !empty($oURLData->aParameters['xid'])) { + $_SESSION['3ds_payment']['eci'] = $oURLData->aParameters['eci']; + $_SESSION['3ds_payment']['xid'] = $oURLData->aParameters['xid']; + $_SESSION['3ds_payment']['cavv'] = $oURLData->aParameters['cavv']; + $bPaymentTransmitOk = true;",- +TShopPaymentHandlerPayOne,GetExternalPaymentReferenceIdentifier,"* return the default payment data for the handler. + * + * @return array","$sIdent = ''; + if (is_array($this->aPaymentUserData) && array_key_exists('paymentDataId', $this->aPaymentUserData)) { + $sIdent = $this->aPaymentUserData['paymentDataId'];",- +TShopPaymentHandlerPayPal,PostSelectPaymentHook,"* Version: this is the API version in the request. + * It is a mandatory parameter for each API request.","$bContinue = parent::PostSelectPaymentHook($sMessageConsumer); + if ($bContinue) { + $bContinue = $this->CallPayPalExpressCheckout($sMessageConsumer);",- +TShopPaymentHandlerPayPal,PostProcessExternalPaymentHandlerHook,* @var string|null,"$bPaymentTransmitOk = parent::PostProcessExternalPaymentHandlerHook(); + if ($bPaymentTransmitOk) { + $oGlobal = TGlobal::instance(); + $aUserData = $oGlobal->GetUserData(); + $sToken = $oGlobal->GetUserData('token'); + if (empty($sToken) && !is_null($this->sPayPalToken)) { + $sToken = $this->sPayPalToken;",- +TShopPaymentHandlerPayPal,ExecutePayment,"* @var array|null","$bPaymentOk = parent::ExecutePayment($oOrder); + + $oCurrency = null; + if (method_exists($oOrder, 'GetFieldPkgShopCurrency')) { + $oCurrency = $oOrder->GetFieldPkgShopCurrency();",- +TShopPaymentHandlerPayPal,ExecutePayPalCall,* {@inheritdoc},"$this->getPaypalLogger()->info(sprintf('PayPal-Request: %s with %s', $methodName, print_r($nvp, true))); + + $apiEndpoint = $this->GetConfigParameter('urlApiEndpoint'); + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $apiEndpoint); + curl_setopt($ch, CURLOPT_VERBOSE, 1); + + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); + + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POST, 1); + + //NVPRequest for submitting to server + $parameters = array( + 'METHOD' => $methodName, + 'VERSION' => self::PAYPAL_API_VERSION, + 'PWD' => $this->GetConfigParameter('apiPassword'), + 'USER' => $this->GetConfigParameter('apiUserName'), + 'SIGNATURE' => $this->GetConfigParameter('apiSignatur'), + ); + foreach ($nvp as $sKey => $sVal) { + if (!array_key_exists($sKey, $parameters)) { + $parameters[$sKey] = $sVal;",- +TShopPaymentHandlerPayPal,GetExternalPaymentReferenceIdentifier,* {@inheritdoc},"$sIdent = ''; + if (is_array($this->aPaymentUserData)) { + if (array_key_exists('TRANSACTIONID', $this->aPaymentUserData)) { + $sIdent = $this->aPaymentUserData['TRANSACTIONID'];",- +TShopPaymentHandlerPayPalExpress,PostProcessExternalPaymentHandlerHook,"* the method is called when an external payment handler returns successfully. + * + * for paypal express we need to set the user based on the paypal data (or, if a user is set, update + * it using the data passed) + * + * public function PostProcessExternalPaymentHandlerHook() { + * hier: + * Daten von PP übernehmen. + * $oUser = ExtUser::GetInstance(); + * Wenn CH-User angemeldet ($oUser->is_logged_in): + * Userdaten von PP Save() wenn Lieferadresse != isSameAs(); + * Wenn nicht: + * User anlegen mit PP Lieferadresse LoadFromRow() + Save()","* hier: + * Daten von PP übernehmen. + * $oUser = ExtUser::GetInstance(); + * Wenn CH-User angemeldet ($oUser->is_logged_in): + * Userdaten von PP Save() wenn Lieferadresse != isSameAs(); + * Wenn nicht: + * User anlegen mit PP Lieferadresse LoadFromRow() + Save() + */ + public function PostProcessExternalPaymentHandlerHook() + { + $bResponse = parent::PostProcessExternalPaymentHandlerHook(); + + if ($bResponse) { + $oUser = TdbDataExtranetUser::GetInstance(); + if (is_null($oUser->id)) { + $aBilling = array(); + $aShipping = array(); + $this->GetUserDataFromPayPalData($aBilling, $aShipping); + if (empty($aShipping['firstname']) && empty($aShipping['lastname'])) { + $aShipping['firstname'] = $aBilling['firstname']; + $aShipping['lastname'] = $aBilling['lastname'];",- +TShopPaymentHandlerPayPal_PayViaLink,GetPayPalPaymentLink,"* a simple paypal integration that does not execute the payment on order, but instead provides a payment + * link/form that can be used by the user to pay for the order + * if you want to accept partial payments, you need to set bAcceptPartialPayments to 1. +/*","if (is_null($dAmount)) { + $dAmount = $oOrder->fieldValueTotal;",- +TShopPaymentHandlerPayPal_PayViaLink,ProcessIPNRequest,* @deprecated since 6.3.0 - not used anymore,"$logger = $this->getPaypalLogger(); + + $sPayPalURL = $this->GetConfigParameter('url'); + $sPayPalURL = str_replace(array('https://', 'http://'), '', $sPayPalURL); + $sDomain = substr($sPayPalURL, 0, strpos($sPayPalURL, '/')); + $sPath = substr($sPayPalURL, strpos($sPayPalURL, '/')); + // send validate message back to paypal + $aVerifyData = TGlobal::instance()->GetUserData(null, array(), TCMSUserInput::FILTER_NONE); + + $sData = 'cmd=_notify-validate&'.str_replace('&', '&', TTools::GetArrayAsURL($aVerifyData)); + $sResponse = $this->sendRequest($sDomain, $sPath, $sData); + if (0 != strcmp($sResponse, 'VERIFIED')) { + $logger->error( + 'PayPal IPN: unable to send notify-validate response.', + [ + 'order_id' => $oOrder->id, + 'order_number' => $oOrder->fieldOrdernumber, + 'domain' => $sDomain, + 'path' => $sPath, + 'url_parameters' => $aURLParameter, + 'data' => $sData, + 'response' => $sResponse, + ] + ); + + return false;",- +TShopPaymentHandlerPayPal_PayViaLink,ExtractPayPalNVPResponse,"* @param TdbShopOrder $oOrder + * @param null $dAmount + * @param string $sCurrency - you can pass the currency used as an optional parameter to the method. if the currency + * package is installed and you do not pass the parameter, the method will use the currency + * of the order. if the package ist not installed, we default to EUR + * + * @return string","$intial = 0; + $nvpArray = array(); + + while (strlen($nvpstr)) { + //postion of Key + $keypos = strpos($nvpstr, '='); + //position of value + $valuepos = strpos($nvpstr, '&') ? strpos($nvpstr, '&') : strlen($nvpstr); + + /*getting the Key and Value values and storing in a Associative Array*/ + $keyval = substr($nvpstr, $intial, $keypos); + $valval = substr($nvpstr, $keypos + 1, $valuepos - $keypos - 1); + //decoding the respose + $nvpArray[urldecode($keyval)] = urldecode($valval); + $nvpstr = substr($nvpstr, $valuepos + 1, strlen($nvpstr));",- +TShopPaymentHandlerPayPal_PayViaLink,GetConfigParameter,"* return the instant payment notification (IPN) URL for paypal. + * + * @param TdbShopOrder $oOrder + * + * @return string","static $bUseSandbox = null; + if (is_null($bUseSandbox)) { + $bUseSandbox = (IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX === $this->getEnvironment());",- +TShopPaymentHandlerSofortueberweisung,ExecutePayment,"* Handler build based on the 2.0 API (see documentation in ./TShopPaymentHandlerSofortueberweisung/Handbuch_Eigenintegration_sofortueberweisung.de_v.2.0.pdf + * Basic Flow + * 1. The user is shown the payment details in the payment step after selecting sofortüberweisung + * 2. when clicking on next, the user is moved to the ""review order screen"" + * 3. when clicking the ""confirm order"" button, the order creation process is started + * a) order is created + * b) user is redirected to the sofortüberweisungspage + * c) on success, the user is returned, the order is marked as paid, and the thankyou page is shown + * d) on failure, the order is marked as canceled, the user is returned to the overview page with the error message. + * + * note: sofortüberweisung sends the REAL order status via a notify url. the notify is the real status - so it will + * overwrite the status set for the order + * +/*","TTools::WriteLogEntry('In ExecutePayment Sofortueberweisung for order id '.$oOrder->id."" (nr: {$oOrder->fieldOrdernumber",- +TShopPaymentHandlerSofortueberweisung,PostExecutePaymentHook,"* pass control to sofortueberweisung.de - the method is called after the order is created, but before the order is + * marked as completed/paid + * we mark our session as payment interrupted. Control will be passed upon return to the OnPaymentSuccessHook + * AFTER we return from GUI. So OnPaymentSuccessHook will need to check the response. + * + * @param TdbShopOrder $oOrder + * @param string $sMessageConsumer - send error messages here + * + * @return bool","$bPaymentOk = parent::PostExecutePaymentHook($oOrder, $sMessageConsumer); + + if ($bPaymentOk) { + $bPaymentOk = false; + // we never mark the order as paid... we wait for the notification to do that.... + // but we check if we allow the user to continue, or if we need to abort due to an error + $oGlobal = TGlobal::instance(); + if ('success' == $oGlobal->GetUserData('cmsPaymentMessage')) { + // validate data... + $bPaymentOk = $this->ValidateResponseData($oGlobal->GetUserData(), $oOrder, $sMessageConsumer); + + if ($bPaymentOk) { + // payment ok. note: we should not set the status of the order based on this result... instead we need to wait + // for the server-to-server notify. so - we need to perform any additional action (marking the order as paid is the job of the notify response",- +TShopPaymentHandlerSofortueberweisung,HandleNotifyMessage,"* return url to sofortueberweisung.de. + * + * @param TdbShopOrder $oOrder + * + * @return string","TTools::WriteLogEntry('sofortüberweisung: handle notify message: '.print_r($aParameter, true), 4, __FILE__, __LINE__); + + // tradebyte extension... + $sOrderId = (array_key_exists('user_variable_3', $aParameter)) ? $aParameter['user_variable_3'] : ''; + $oOrder = TdbShopOrder::GetNewInstance(); + $oOrder->Load($sOrderId); + $this->SetOwningPaymentMethodId($oOrder->fieldShopPaymentMethodId); + + // if data is valid, mark order as paid + $bNotifyDataValid = $this->NotifyPayloadIsValid($aParameter); + if (true === $bNotifyDataValid) { + // load order + /** @var $oOrder TdbShopOrder */ + $sOrderId = (array_key_exists('user_variable_3', $aParameter)) ? $aParameter['user_variable_3'] : ''; + $oOrder = TdbShopOrder::GetNewInstance(); + $oOrder->Load($sOrderId); + if ($oOrder->fieldOrderIsPaid && false) { + TTools::WriteLogEntry(""sofortüberweisung-notify: order [{$oOrder->id",- +TShopPaymentHandlerEasyCash_Debit,ExecutePayment,"* @param TdbShopOrder $oOrder + * @param string $sMessageConsumer - send error messages here + * + * @return bool","$bPaymentOk = parent::ExecutePayment($oOrder, $sMessageConsumer); + if ($bPaymentOk) { + $aEasyCashPayload = $this->GetPaymentPayload($oOrder); + + $aResponse = $this->SendRequestToEasyCash(self::EASY_CASH_DEBIT_PATH, $aEasyCashPayload); + $bPaymentOk = $this->ProcessOrderResponse($oOrder, $aResponse, $aEasyCashPayload, $sMessageConsumer);",- +TShopPaymentHandlerEasyCash_Debit,ValidateUserInput,"* return true if the user data is valid + * data is loaded from GetUserPaymentData(). + * + * @return bool","$bIsValid = parent::ValidateUserInput(); + $oMsgManager = TCMSMessageManager::GetInstance(); + $aRequiredFields = array('accountNr', 'accountOwner', 'bankNr', 'bankName'); + foreach ($aRequiredFields as $sRequiredField) { + $sValue = (array_key_exists($sRequiredField, $this->aPaymentUserData)) ? ($this->aPaymentUserData[$sRequiredField]) : (''); + $sValue = trim($sValue); + if (empty($sValue)) { + $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-'.$sRequiredField, 'ERROR-USER-REQUIRED-FIELD-MISSING'); + $bIsValid = false;",- +TShopVariantDisplayHandler,Render,"* return an instance of the handler type for the given id. + * + * @param string $sId + * + * @example TdbShopVariantDisplayHandler + * + * @return null|object","$oView = new TViewParser(); + + $aSelectedTypeValues = TdbShopVariantDisplayHandler::GetActiveVariantTypeSelection(); + if (!is_array($aSelectedTypeValues)) { + $aSelectedTypeValues = array();",- +TCMSFieldShopVariantDetails,GetHTML,"* {@inheritdoc} + * + * manages the variant type and value details for an article + * + * @property TdbShopArticle $oTableRow","$aData = array(); + $aData['sFieldName'] = $this->name; + $aData['sAjaxURL'] = $this->GenerateAjaxURL(); + $oParent = null; + /** @var TdbShopVariantSet $oVariantSet */ + $oVariantSet = $this->oTableRow->GetFieldShopVariantSet(); + + // is this a variant, and is the variantset defined in the parent? + if (!empty($this->oTableRow->fieldVariantParentId)) { + /** @var $oParent TdbShopArticle */ + $oParent = $this->oTableRow->GetFieldVariantParent(); + $oVariantSet = $oParent->GetFieldShopVariantSet();",- +TCMSFieldShopVariantDetails,GetEditLink,* @var int,"static $aTableEditorConfs = array(); + if (!in_array($sTableName, $aTableEditorConfs)) { + $oTableConf = TdbCmsTblConf::GetNewInstance(); + $oTableConf->LoadFromField('name', $sTableName); + $aTableEditorConfs[$sTableName] = $oTableConf->id;",- +TCMSFieldShopVariantDetails,GetDatabaseCopySQL,* {@inheritdoc},return '';,- +TCMSFieldShopVariantDetails,GetSQL,@var TdbShopVariantSet $oVariantSet,"/** + * @var array $aNewValues + */ + $aNewValues = $this->getInputFilterUtil()->getFilteredInput($this->name.'_new'); + + if (!is_array($this->data)) { + $this->data = array();",- +TCMSFieldShopVariantDetails,generateVariants,@var $oParent TdbShopArticle,"/** + * @var array|null $aVariantParameters + */ + $aVariantParameters = $this->getInputFilterUtil()->getFilteredInput('variantParameters'); + if (null === $aVariantParameters) { + return '';",- +TCMSFieldShopVariantDetails,getPossibleVariantCombinations,"* @param TdbShopVariantSet|null $variantSet + * + * @return string","$aData = array(); + /** @var TdbShopVariantSet $variantSet */ + $aVariantTypeNames = array(); + $aExistingVariantCombinations = array(); + + $variantSet = $this->oTableRow->GetFieldShopVariantSet(); + $aVariantSurcharge = array(); + $aVariantParameter = array(); + + $possibleVariantsCount = 1; + if (null === $variantSet) { + return '';",- +TShopInterface_ImportOrderStatus,PerformImport,"* import the order status from a csv. the system will send a mail to users + * to inform them of their order changes. +/*","$this->fp = fopen($this->sFileName, 'rb'); + + // get first line as the header line + $this->aHeaderFields = $this->GetLine(); + while ($aRow = $this->GetLine()) { + // prepare data + $aTmpData = array(); + reset($this->aHeaderFields); + foreach ($this->aHeaderFields as $iFieldIndex => $sFieldName) { + if (array_key_exists($iFieldIndex, $aRow)) { + $aTmpData[$sFieldName] = trim($aRow[$iFieldIndex]);",- +TCMSListManagerShopArticles,GetCustomRestriction,"* {@inheritdoc} + * + * @return void","$query = parent::GetCustomRestriction(); + + $filterArticleType = ''; + if (isset($this->tableObj->_postData['filterArticleType'])) { + if ('parents' == $this->tableObj->_postData['filterArticleType']) { + $filterArticleType = "" `shop_article`.`variant_parent_id` = '' "";",- +ShopRouteArticleFactory,__construct,* @var string,"if (defined('PKG_SHOP_PRODUCT_URL_KEY_FIELD')) { + /** + * should inject the constant at some point - since this whould change the interface we can not do so in a patch version. + */ + $this->sqlTableFieldName = PKG_SHOP_PRODUCT_URL_KEY_FIELD;",- +ShopRouteArticleFactory,createArticleFromIdentificationToken,* should inject the constant at some point - since this whould change the interface we can not do so in a patch version.,"$article = TdbShopArticle::GetNewInstance(); + if (false === $article->LoadFromField($this->sqlTableFieldName, $identificationToken)) { + return null;",- +TCMSSmartURLHandler_BuyProductDirectLink,GetPageDef,"* looks for URLS of the form /kaufen/ean/number... these will result in the article being + * placed in the basket. + * + * @psalm-suppress UndefinedPropertyAssignment + * @FIXME Writing data into `$OURLData` when there is no magic `__set` method for them defined.","$iPageId = false; + $oURLData = TCMSSmartURLData::GetActive(); + + $aParts = explode('/', $oURLData->sRelativeFullURL); + + $aParts = $this->CleanPath($aParts); + + if (3 == count($aParts) && TdbShopArticle::URL_EXTERNAL_TO_BASKET_REQUEST == $aParts[0] && 'id' == $aParts[1]) { + $oArticle = TdbShopArticle::GetNewInstance(); + /** @var $oArticle TdbShopArticle */ + if ($oArticle->Load($aParts[2])) { + // we need to perform a real redirect... + $oShopConfig = TdbShop::GetInstance($oURLData->iPortalId); + $iNode = $oShopConfig->GetSystemPageNodeId('checkout'); + $oNode = new TCMSTreeNode(); + /** @var $oNode TCMSTreeNode */ + $oNode->Load($iNode); + $iPageId = $oNode->GetLinkedPage(); + $this->getRequest()->query->set('pagedef', $iPageId); + $oURLData->sOriginalURL = $oArticle->GetDetailLink(false); + $oURLData->sRelativeFullURL = $oURLData->sOriginalURL; + + $sURL = $oArticle->GetToBasketLink(false, true); + $sURL = str_replace('&', '&', $sURL); + $this->getRedirect()->redirect($sURL);",- +TCMSSmartURLHandler_ShopBasketSteps,GetPageDef,"* assumes the path in the TCMSSmartURLData is a simple tree path. +/*","$iPageId = false; + $oURLData = TCMSSmartURLData::GetActive(); + + $oShop = TdbShop::GetInstance($oURLData->iPortalId); + $oStep = $this->GetActiveStep($oURLData); + if (!is_null($oStep)) { + $this->aCustomURLParameters[MTShopOrderWizardCore::URL_PARAM_STEP_SYSTEM_NAME] = $oStep->fieldSystemname; + $iNode = $oShop->GetSystemPageNodeId('checkout'); + $oNode = new TCMSTreeNode(); + /** @var $oNode TCMSTreeNode */ + $oNode->Load($iNode); + $iPageId = $oNode->GetLinkedPage();",- +TCMSSmartURLHandler_ShopIPayment,GetPageDef,"* assumes the path in the TCMSSmartURLData is a simple tree path. + * + * @psalm-suppress UndefinedPropertyAssignment + * @FIXME Writing data into `$OURLData` when there is no magic `__set` method for them defined.","$iPageId = false; + $oURLData = TCMSSmartURLData::GetActive(); + + $iIPaymentPos = strpos($oURLData->sRelativeURL, TShopPaymentHandlerIPayment::URL_PARAMETER_NAME); + if (false !== $iIPaymentPos) { + $sIPaymentCode = substr($oURLData->sRelativeURL, $iIPaymentPos + strlen(TShopPaymentHandlerIPayment::URL_PARAMETER_NAME)); + $oURLData->sRelativeURL = substr($oURLData->sRelativeURL, 0, $iIPaymentPos); + $aUrlParts = array(); + if (!empty($oURLData->sRelativeURLPortalIdentifier)) { + $aUrlParts[] = $oURLData->sRelativeURLPortalIdentifier;",- +TCMSSmartURLHandler_ShopManufacturerProducts,GetPageDef,* get the path to the product catalog.,"$iPageId = false; + $oURLData = TCMSSmartURLData::GetActive(); + + $oShop = TdbShop::GetInstance($oURLData->iPortalId); + + $sProductPath = $oShop->GetLinkToSystemPage('manufacturer'); + if ('.html' == substr($sProductPath, -5)) { + $sProductPath = substr($sProductPath, 0, -5);",- +TCMSSmartURLHandler_ShopPaymentOgone,GetPageDef,"* If response from Ogone contains ""ogonenotifycmscall"", function triggers the HandleNotifyMessage from PaymentHandler + * On success exit an return http header 200 OK. On Failure exit and return http header 404 Not found. So Ogone send + * notify again. + * + * If response from Ogone contains ""ogone_cms_call"" the trigger der parent function to get pagedefid. + * + * @return bool|string + * + * @psalm-suppress UndefinedPropertyAssignment + * @FIXME Writing data into `$OURLData` when there is no magic `__set` method for them defined.","$oGlobal = TGlobal::instance(); + $iPageId = false; + $oURLData = TCMSSmartURLData::GetActive(); + $iMessagePos = strpos($oURLData->sRelativeURL, TShopPaymentHandlerOgone::URL_IDENTIFIER_NOTIFY); + $bNotifyIsValid = false; + if (false !== $iMessagePos) { + TTools::WriteLogEntry('OGONE: incoming notify message: '.print_r($oGlobal->GetUserData(), true), 1, __FILE__, __LINE__); + if ($oGlobal->UserDataExists('PAYHAID') && $oGlobal->UserDataExists('PAYCALL')) { + $sPaymentHandlerCMSIdent = $oGlobal->GetUserData('PAYHAID'); + $sInoParameter = $oGlobal->GetUserData('PAYCALL'); + if (TShopPaymentHandlerOgone::URL_IDENTIFIER == $sInoParameter && !empty($sPaymentHandlerCMSIdent)) { + $bNotifyIsValid = true;",- +TCMSSmartURLHandler_ShopPaymentSofortueberweisungAPI,GetPageDef,"* takes sofortueberweisung return urls and maps them to chameleon urls. + * + * @psalm-suppress UndefinedPropertyAssignment + * @FIXME Writing data into `$OURLData` when there is no magic `__set` method for them defined.","$iPageId = false; + $oURLData = TCMSSmartURLData::GetActive(); + + $iMessagePos = strpos($oURLData->sRelativeURL, TShopPaymentHandlerSofortueberweisung::URL_IDENTIFIER); + $sPaymentPayload = ''; + if (false !== $iMessagePos) { + TTools::WriteLogEntry('sofortueberweisung Payment Response: '.print_r($oURLData, true), 4, __FILE__, __LINE__); + $sPaymentMethod = substr($oURLData->sRelativeURL, $iMessagePos + strlen(TShopPaymentHandlerSofortueberweisung::URL_IDENTIFIER)); + $oURLData->sRelativeURL = substr($oURLData->sRelativeURL, 0, $iMessagePos); + $sNewRelativeURL = ''; + if ('' != $oURLData->sRelativeURLPortalIdentifier) { + $sNewRelativeURL .= '/'.$oURLData->sRelativeURLPortalIdentifier;",- +TCMSSmartURLHandler_ShopPayPalAPI,GetPageDef,"* takes paypal return urls and mapps them to chameleon urls. + * + * @psalm-suppress UndefinedPropertyAssignment + * @FIXME Writing data into `$OURLData` when there is no magic `__set` method for them defined.","$iPageId = false; + $oURLData = TCMSSmartURLData::GetActive(); + + $iPayPalApiPos = strpos($oURLData->sRelativeURL, TShopPaymentHandlerPayPal::URL_IDENTIFIER); + if (false !== $iPayPalApiPos) { + $sPayPalMethod = substr($oURLData->sRelativeURL, $iPayPalApiPos + strlen(TShopPaymentHandlerPayPal::URL_IDENTIFIER)); + $oURLData->sRelativeURL = substr($oURLData->sRelativeURL, 0, $iPayPalApiPos); + $oURLData->sRelativeFullURL = $oURLData->sRelativeURL; + if (!empty($oURLData->sLanguageIdentifier)) { + $oURLData->sRelativeFullURL = '/'.$oURLData->sLanguageIdentifier.$oURLData->sRelativeFullURL;",- +TCMSSmartURLHandler_ShopPayPalIPN,GetPageDef,@var TShopPaymentHandlerPayPal_PayViaLink $oPaymentHandler,"$logger = $this->getLogger(); + + $iPageId = false; + $oURLData = TCMSSmartURLData::GetActive(); + if (false !== strpos($oURLData->sRelativeURL, TShopPaymentHandlerPayPal_PayViaLink::URL_IDENTIFIER_IPN)) { + $oGlobal = TGlobal::instance(); + $sOrderId = null; + $sPaymentHandlerId = null; + if (!$oGlobal->UserDataExists('custom')) { + $logger->error( + 'PayPal IPN: parameter ""custom"" missing from paypal IPN response: '.print_r( + $oGlobal->GetUserData(null, array(), TCMSUserInput::FILTER_NONE), + true + ) + );",- +TCMSSmartURLHandler_ShopProductExport,GetPageDef,"* get the path to the product catalog. +/*","$iPageId = false; + $oURLData = TCMSSmartURLData::GetActive(); + $oShop = TdbShop::GetInstance($oURLData->iPortalId); + + $sProductPath = $oShop->GetLinkToSystemPage('productexport'); + if ('.html' == substr($sProductPath, -5)) { + $sProductPath = substr($sProductPath, 0, -5);",- +TCMSSmartURLHandler_ShopRemoteSearch,GetPageDef,"* get the path to the product catalog. +/*","$iPageId = false; + $oURLData = TCMSSmartURLData::GetActive(); + + $oShop = TdbShop::GetInstance($oURLData->iPortalId); + + $sProductPath = $oShop->GetLinkToSystemPage('remotesearch'); + if ('.html' == substr($sProductPath, -5)) { + $sProductPath = substr($sProductPath, 0, -5);",- +TPkgShopBasketStepsRouteCollectionGenerator,__construct,* @var SystemPageServiceInterface,"$this->systemPageService = $systemPageService; + $this->databaseConnection = $databaseConnection; + $this->routingUtil = $routingUtil;",- +TPkgShopBasketStepsRouteCollectionGenerator,getCollection,* @var Connection,"$collection = new \Symfony\Component\Routing\RouteCollection(); + + $checkoutSystemPage = $this->systemPageService->getSystemPage('checkout', $portal, $language); + + if (null === $checkoutSystemPage) { + throw new TPkgCmsException_Log('Failed to create routing definition for basket steps because there is no system page ""checkout"" for the requested portal.', array('portal' => $portal->id));",- +TPkgShopBasketStepsRouteController,setMainController,* @var ChameleonControllerInterface,$this->mainController = $mainController;,- +TPkgShopBasketStepsRouteController,basketStep,* @return void,"if ('/' === substr($basketStepSystemName, -1)) { + $basketStepSystemName = substr($basketStepSystemName, 0, -1);",- +TPkgShopCategoryRouteCollectionGenerator,__construct,"* Class TPkgShopCategoryRouteCollectionGenerator + * create the routing info for categories. we can not use a yml here, since the page identifier is language specific.",$this->systemPageService = $systemPageService;,- +TPkgShopCategoryRouteCollectionGenerator,getCollection,* @var SystemPageServiceInterface,"$systemPage = $this->systemPageService->getSystemPage('products', $portal, $language); + if (null === $systemPage) { + throw new TPkgCmsException_Log('No category system page defined (portal system page with name ""products"")', array('portal' => $portal->id));",- +TPkgShopRouteControllerArticle,shopArticleQuickShop,* @var ChameleonControllerInterface,"$cmsident = $identifier; + $queryParameter = $request->query->all(); + if (0 === count($queryParameter)) { + $queryParameter = null;",- +TPkgShopRouteControllerArticle,shopArticle,* @var ShopRouteArticleFactoryInterface,"$queryParameter = $request->query->all(); + if (isset($queryParameter[TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY])) { + unset($queryParameter[TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY]);",- +TPkgShopRouteControllerArticle,shopCategory,* @var CacheInterface,"$catPath = rtrim($category, '/'); + if ('.html' === substr($catPath, -5) && strlen($catPath) > 5) { + $catPath = substr($catPath, 0, -5);",- +TPkgShopRouteControllerArticle,setShopRouteArticleFactory,* @var ProductVariantServiceInterface,$this->shopRouteArticleFactory = $shopRouteArticleFactory;,- +TPkgShopRouteControllerArticle,setMainController,* @var InputFilterUtilInterface,$this->mainController = $mainController;,- +TPkgShopRouteControllerArticle,setCache,"* @param Request $request + * @param string $identifier + * @param string $pagedef + * + * @return Response",$this->cache = $cache;,- +TPkgShopRouteControllerArticle,setProductVariantService: void,"* @param string $articleIdentificationToken + * + * @return TdbShopArticle|null",$this->productVariantService = $productVariantService;,- +TPkgShopRouteControllerArticle,setInputFilterUtil: void,"* @param Request $request + * @param string $identifier + * @param string $pagedef + * @param string|null $catid + * + * @return Response",$this->inputFilterUtil = $inputFilterUtil;,- +TCMSShopTableEditor_ShopArticle,ProcessFieldsBeforeDisplay,"* overwritten to handle variant management. + * + * @property TdbShopArticle $oTable","/** @var TdbShopArticle $product */ + $product = $this->oTable; + if ($product->IsVariant()) { + $oParent = $product->GetFieldVariantParent(); + if (null != $oParent) { + $oVariantSet = $oParent->GetFieldShopVariantSet(); + if (!is_null($oVariantSet)) { + $aPermittedFields = $oVariantSet->GetMLTIdList('cms_field_conf', 'cms_field_conf_mlt'); + $oPermittedFields = new TIterator(); + $oFields->GoToStart(); + while ($oField = $oFields->Next()) { + /** @var $oField TCMSField */ + if (in_array($oField->oDefinition->id, $aPermittedFields)) { + $oPermittedFields->AddItem($oField);",- +TCMSShopTableEditor_ShopArticle,Insert,"* if the current article is a variant AND a variant set has been defined, + * then mark all fields as hidden that are NOT activated through the set. + * + * @param TIterator $oFields + * + * @return void","if ($this->isNewVariant()) { + $this->sId = $this->sRestriction; + $variant = $this->DatabaseCopy(); + /** @var TdbShopArticle $product */ + $product = $this->oTable; + if (!$product->fieldActive) { + $variantTableEditor = TTools::GetTableEditorManager('shop_article', $variant->id); + $variantTableEditor->SaveField('variant_parent_is_active', '0');",- +TCMSShopTableEditor_ShopArticle,CopyPropertyRecords,@var TdbShopArticle $product,"if (!$this->isNewVariant() || 'shop_article_variants' != $oField->name) { + parent::CopyPropertyRecords($oField, $sourceRecordID);",- +TCMSShopTableEditor_ShopArticle,UpdatePriceToLowestVariant,@var $oField TCMSField,"/** @var TdbShopArticle $product */ + $product = $this->oTable; + $oLowestPriceVariant = $product->GetLowestPricedVariant(); + if ($oLowestPriceVariant) { + $aData = array('price' => $oLowestPriceVariant->fieldPriceFormated, 'price_reference' => $oLowestPriceVariant->fieldPriceReferenceFormated); + $this->SaveFields($aData, false);",- +TCMSShopTableEditor_ShopDiscount,Delete,"* overwritten to handle variant management. + * + * @property TdbShopDiscount $oTable","$this->oTable->ClearCacheOnAllAffectedArticles(); + parent::Delete($sId);",- +TCMSShopTableEditor_ShopOrderItem,Delete,"* if we are deleting a bundle article we need to delete the related items + * note: adding or changing an article will trigger no such change. +/*","/** + * @var TShopOrderItem $item + */ + $item = $this->oTable; + if ($item->fieldIsBundle) { + $oOrderItemTableConf = $item->GetTableConf(); + $oBundleArticles = $item->GetFieldShopOrderBundleArticleList(); + + while ($oBundleArticle = $oBundleArticles->Next()) { + // now delete connected order item + $oOrderItemEditor = new TCMSTableEditorManager(); + /** @var $oOrderItemEditor TCMSTableEditorManager */ + $oOrderItemEditor->Init($oOrderItemTableConf->id, $oBundleArticle->fieldBundleArticleId); + $oOrderItemEditor->Delete($oBundleArticle->fieldBundleArticleId);",- +TCMSShopTableEditor_ShopVoucherSeries,DefineInterface,"* set public methods here that may be called from outside. + * + * @return void","parent::DefineInterface(); + $this->methodCallAllowed[] = 'CreateVoucherCodes'; + $this->methodCallAllowed[] = 'ExportVoucherCodes';",- +TCMSShopTableEditor_ShopVoucherSeries,CreateVoucherCodes,* add table-specific buttons to the editor (add them directly to $this->oMenuItems).,"$oReturn = new stdClass(); + $oReturn->bError = false; + $oReturn->sMessage = 'Gutscheine erstellt'; + + if ($this->AllowCreatingVoucherCodes()) { + $oGlobal = TGlobal::instance(); + if (is_null($iNumberOfVouchers)) { + $iNumberOfVouchers = intval($oGlobal->GetUserData('iNumberOfVouchers'));",- +TCMSShopTableEditor_ShopVoucherSeries,GetHtmlHeadIncludes,"* create a number of vouchers in the shop_voucher table. + * + * @param string $sCode - the code to use. if empty, a random unique code will be generated + * @param int $iNumberOfVouchers - number of vouchers to create (will fetch this from user input if null given) + * + * @return stdClass","$aIncludes = parent::GetHtmlHeadIncludes(); + $aIncludes[] = ''; + + return $aIncludes;",- +TCMSShopTableEditor_ShopVoucherSeries,ExportVoucherCodes,@var $oVoucher TdbShopVoucher,"$sReturn = ''; + + if ($this->AllowExportingVoucherCodes()) { + $oVouchers = TdbShopVoucherList::GetList(""SELECT * FROM `shop_voucher` WHERE `shop_voucher_series_id`='"".MySqlLegacySupport::getInstance()->real_escape_string($this->sId).""'""); + $oVouchers->GoToStart(); + $count = 0; + while ($oVoucher = $oVouchers->Next()) { + $aCsvVouchers[$count][0] = str_replace('""', '""""', $oVoucher->fieldCode); + if ('0000-00-00 00:00:00' != $oVoucher->fieldDatecreated) { + $aCsvVouchers[$count][1] = date('d.m.Y H:i', strtotime($oVoucher->fieldDatecreated));",- +TCMSTableEditorShopArticleReview,Delete,"* gets called after save if all posted data was valid. + * + * @param TIterator $oFields holds an iterator of all field classes from DB table with the posted values or default if no post data is present + * @param TCMSRecord $oPostTable holds the record object of all posted data","if (null === $sId) { + parent::Delete($sId); + + return;",- +TCMSTableEditorShopCategory,UpdatePageNaviBreadCrumb,"* gets called after save if all posted data was valid. + * + * @param TIterator $oFields holds an iterator of all field classes from DB table with the posted values or default if no post data is present + * @param TCMSRecord $oPostTable holds the record object of all posted data","$sEditLanguage = $this->oTableConf->GetLanguage(); + $breadcrumbs = self::GetNavigationBreadCrumbs($this->sId, $sEditLanguage); + $this->SaveField('url_path', $breadcrumbs); + // now we also need to update all children of this category... + $oCategory = TdbShopCategory::GetNewInstance(); + $oCategory->SetLanguage($sEditLanguage); + /** @var $oCategory TdbShopCategory */ + if (!$oCategory->Load($this->sId)) { + $oCategory = null;",- +TCMSTableEditorShopOrderEndPoint,GetHtmlHeadIncludes,"* @property TdbShopOrder $oTable + * @property TdbShopOrder $oTablePreChangeData","$aIncludes = parent::GetHtmlHeadIncludes(); + $aIncludes[] = ''; + + return $aIncludes;",- +TCMSTableEditorShopOrderEndPoint,ShopOrderSendConfirmOrderMail,* {@inheritdoc},"$oGlobal = TGlobal::instance(); + if (is_null($sMail)) { + $sMail = $oGlobal->GetUserData('sTargetMail');",- +TCMSTableEditorShopOrderEndPoint,GetFrontendActionUrlToSendOrderEmail,"* send the current order to the email. + * + * @param string $sMail - can also be passed via get/post + * + * @return TCMSstdClass","$sURL = ''; + if (is_null($sMail)) { + $oGlobal = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.global'); + $sMail = $oGlobal->GetUserData('sTargetMail');",- +TCMSTableEditorShopOrderEndPoint,exportOrder: array,@var $oOrder TdbShopOrder,"$translator = $this->getTranslator(); + + if (false !== $this->oTable->ExportOrderForWaWiHook($this->oTable->GetPaymentHandler())) { + $this->oTable->MarkOrderAsExportedToWaWi(true); + + return [ + 'messageType' => 'SUCCESS', + 'message' => $translator->trans('chameleon_system_shop.orders.export_success') + ];",- +TCMSTableEditorShopOrderEndPoint,DefineInterface,"* send order notification for current order from backend - uses frontend action, + * so portal and snippets are set correctly. + * + * @param string $sMail - can also be passed via get/post + * + * @return string","parent::DefineInterface(); + $this->methodCallAllowed[] = 'ShopOrderSendConfirmOrderMail'; + $this->methodCallAllowed[] = 'GetFrontendActionUrlToSendOrderEmail'; + $this->methodCallAllowed[] = 'exportOrder';",- +TCMSTableEditorShopUser,Delete,"* special handling for the shop users - we want to sync the newsletter info with the user info. +/*","if (null !== $sId) { + $this->DeleteNewsletterInfo($sId);",- +BasketItemEvent,__construct,* @var \TShopBasket,"$this->basket = $basket; + $this->basketArticle = $basketArticle; + $this->user = $user;",- +BasketItemEvent,getBasket,* @var \TShopBasketArticle,return $this->basket;,- +BasketItemEvent,getBasketArticle,* @var \TdbDataExtranetUser,return $this->basketArticle;,- +BasketItemEvent,getUser,* @return \TShopBasket,return $this->user;,- +TShopBasketArticleCore,GetLastUpdatedTimestamp,"* represents an article in the basket. +/*",return $this->iLastChangedTimestamp;,- +TShopBasketArticleCore,GetActingDiscountList,"* @var float + * the amount of this item in the basket. it will also be saved to session",return $this->oActingShopDiscountList;,- +TShopBasketArticleCore,ResetDiscounts,"* @var float + * holds the original total price (amount*price)","$this->oActingShopDiscountList = null; + $this->dPriceAfterDiscount = $this->dPrice; + $this->dPriceTotalAfterDiscount = $this->dPriceTotal; + $this->dPriceAfterDiscountWithoutVouchers = $this->dPriceAfterDiscount; + $this->dPriceTotalAfterDiscountWithoutVouchers = $this->dPriceTotalAfterDiscount;",- +TShopBasketArticleCore,ApplyDiscount,"* @var float + * holds the price after deducting any discount assigned to the item","$dRemainingValue = 0; + if (is_null($this->oActingShopDiscountList)) { + $this->oActingShopDiscountList = new TShopBasketArticleDiscountList();",- +TShopBasketArticleCore,getCustomData,"* @var float + * holds the total price after deducting any discount assigned to the item",return $this->customData;,- +TShopBasketArticleCore,setCustomData,"* holds the value of the article after all discounts have been applied WITHOUT discount vouchers. + * + * @var float","$this->customData = $customData; + $this->UpdateBasketItemKey();",- +TShopBasketArticleCore,GetToNoticeListLink,* @var float,"if (!$bRemoveFromBasket) { + return parent::GetToNoticeListLink($bIncludePortalLink);",- +TShopBasketArticleCore,GetRemoveFromBasketLink,"* total weight of the articles. + * + * @var float","$activeShop = $this->getShopService()->getActiveShop(); + $aParameters = array('module_fnc['.$activeShop->GetBasketModuleSpotName().']' => 'RemoveFromBasketViaBasketItemKey', MTShopBasketCore::URL_ITEM_BASKET_KEY => $this->sBasketItemKey, MTShopBasketCore::URL_MESSAGE_CONSUMER => MTShopBasketCore::MSG_CONSUMER_NAME); + + return $this->getActivePageService()->getLinkToActivePageRelative($aParameters);",- +TShopBasketArticleCore,IsSameAs,"* total volume of the articles. + * + * @var float","$bIsSame = false; + if ($this->sBasketItemKey == $oItem->sBasketItemKey) { + $bIsSame = true;",- +TShopBasketArticleCore,ChangeAmount,"* @var string + * identifies the basket item based on the parameters checked via IsSameAs method + * So two basket items with the same sBasketItemKey ARE the same basket product. + * the properties is automatically set via the UpdateBasketItemKey method which needs to be + * called anytime any of the relevant properties change","$dOldAmount = $this->dAmount; + $this->dAmount = $dNewAmount; + if ($this->TotalStockAvailable() < $this->dAmount) { + $this->dAmount = $this->TotalStockAvailable();",- +TShopBasketArticleCore,SetActingDiscount,* @var TShopBasketArticleDiscountList,$this->oActingShopDiscount = $oActingShopDiscount;,- +TShopBasketArticleCore,SetActingShippingType,* @var TdbShopShippingType,$this->oActingShopBasketShippingType = $oShippingType;,- +TShopBasketArticleCore,GetActingShippingType,"* timestamp set to the last time the amount of the item changed + * access via getter GetLastUpdatedTimestamp. + * + * @var int|null",return $this->oActingShopBasketShippingType;,- +TShopBasketArticleCore,ResetShippingMarker,* @var array,$this->oActingShopBasketShippingType = null;,- +TShopBasketArticleCore,RefreshDataFromDatabase,"* return timestamp when the item was last updated. + * + * @return int|null","$this->ClearInternalCache(); + $sActiveLanguageId = self::getLanguageService()->getActiveLanguageId(); + if (null !== $sActiveLanguageId) { + $this->SetLanguage($sActiveLanguageId);",- +TShopBasketArticleCore,__sleep,"* return acting discount list. + * + * @return TShopBasketArticleDiscountList","$aSleep = array('table', 'id', 'iLanguageId', 'dAmount', 'dPriceTotal', + 'dPriceAfterDiscount', 'dPriceTotalAfterDiscount', 'dPriceAfterDiscountWithoutVouchers', 'dPriceTotalAfterDiscountWithoutVouchers', + 'dTotalWeight', 'dTotalVolume', 'sBasketItemKey', + ""\0TShopBasketArticleCore\0iLastChangedTimestamp"", + ""\0TShopBasketArticleCore\0customData"", ); // the \0CLASSNAME\0PROPERTY is needed for private vars if the class is extended by some other class + return $aSleep;",- +TShopBasketArticleCore,SetPriceBasedOnActiveDiscounts,"* remove acting discounts. + * + * @return void",,- +TShopBasketArticleCoreList,ObserverRegister,"* The TIterator based article list overwrites the standard add item method in such a way that if + * the same article is added again, it simply increases the amout of that item. same goes for the + * remove function. + * + * @extends TIterator","if (!array_key_exists($sObserverName, $this->aObservers)) { + $this->aObservers[$sObserverName] = $oObserver;",- +TShopBasketArticleCoreList,ObserverUnregister,"* the sume of all amount fields in the basket (ie total number of articles). + * + * @var float","if (array_key_exists($sObserverName, $this->aObservers)) { + unset($this->aObservers[$sObserverName]);",- +TShopBasketArticleCoreList,Refresh,"* the original product price of all articles in the list (before discounts, vouchers, etc). + * + * @var float","$iPt = $this->getItemPointer(); + $this->GoToStart(); + while ($oTmp = $this->Next()) { + if (false === $oTmp->sqlData || ($oTmp->dAmount <= 0)) { + $this->RemoveArticle($oTmp);",- +TShopBasketArticleCoreList,GetArticlesAffectedByShippingType,"* total weight of all articles in the list. + * + * @var float","$oArticles = new TShopBasketArticleList(); + /** @var $oArticles TShopBasketArticleList */ + $iPointer = $this->getItemPointer(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + if ($oShippingType->ArticleAffected($oItem)) { + $oArticles->AddItem($oItem);",- +TShopBasketArticleCoreList,GetListMatchingVat,"* total volume of all articles in the list. + * + * @var float","$oArticles = new TShopBasketArticleList(); + /** @var $oArticles TShopBasketArticleList */ + $iPointer = $this->getItemPointer(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + $oItemVat = $oItem->GetVat(); + if (!is_null($oItemVat) && $oItemVat->id == $oVat->id) { + $oArticles->AddItem($oItem);",- +TShopBasketArticleCoreList,AddItem,"* list of observing objects. + * + * @var array","$bWasAdded = true; + $iCurrentPos = $this->getItemPointer(); + $this->GoToStart(); + $bFound = false; + while (!$bFound && ($oExistingItem = $this->Next())) { + /** @var $oExistingItem TShopBasketArticle */ + if ($oExistingItem->IsSameAs($oItem)) { + $bFound = true;",- +TShopBasketArticleCoreList,IsInList,"* register an observer with the user. + * + * @param string $sObserverName + * @param IDataExtranetUserObserver $oObserver + * + * @return void","$bIsInList = false; + $iCurPos = $this->getItemPointer(); + $this->GoToStart(); + while (!$bIsInList && ($oTmpItem = $this->Next())) { + if ($oTmpItem->id == $oItem->id) { + $bIsInList = true;",- +TShopBasketArticleCoreList,UpdateItemAmount,"* remove an observer from the list. + * + * @param string $sObserverName + * + * @return void","$bWasUpdated = false; + if ($oItem->dAmount <= 0) { + $this->RemoveArticle($oItem);",- +TShopBasketArticleCoreList,next: TShopBasketArticle|bool,"* check list for dead articles. + * + * @return void",return parent::Next();,- +TShopBasketArticleCoreList,RemoveArticle,"* returns array with pointers to all basket articles that match the shipping type. + * + * @param TdbShopShippingType $oShippingType + * + * @return TShopBasketArticleList","// find the item, then drop it + $oItemToRemove = $this->FindItemWithProperty('sBasketItemKey', $oItem->sBasketItemKey); + + if (false === $oItemToRemove) { + return null;",- +TShopBasketArticleCoreList,GetBasketSumForVoucher,@var $oArticles TShopBasketArticleList,"// get the sum of all products (if the voucher is not sponsored, we exclude products with ""ExcludeFromVouchers"") + $iCurrentPosition = $this->getItemPointer(); + $this->GoToStart(); + $oVoucherDef = $oVoucher->GetFieldShopVoucherSeries(); + $dProductValue = 0; + while ($oItem = $this->Next()) { + $bIncludeProduct = $oVoucher->AllowVoucherForArticle($oItem); + if ($bIncludeProduct) { + $dProductValue = $dProductValue + $oItem->dPriceTotalAfterDiscountWithoutVouchers;",- +TShopBasketArticleCoreList,ReducePriceForItemsAffectedByNoneSponsoredVoucher,@var $oArticles TShopBasketArticleList,"$currentPosition = $this->getItemPointer(); + $this->GoToStart(); + $articlesAffected = array(); + $totalValueOfAffectedItems = 0; + while ($basketItem = $this->Next()) { + if (true === $oVoucher->AllowVoucherForArticle($basketItem)) { + $articlesAffected[] = $basketItem; + $totalValueOfAffectedItems = $totalValueOfAffectedItems + $basketItem->dPriceTotalAfterDiscountWithoutVouchers;",- +TShopBasketArticleCoreList,reducePriceForItemsAffectedByDiscount: void,@var $oArticles TShopBasketArticleList,"$currentPosition = $this->getItemPointer(); + $this->GoToStart(); + $articlesAffected = array(); + $totalValueOfAffectedItems = 0; + while ($basketItem = $this->Next()) { + if (true === $discount->AllowDiscountForArticle($basketItem)) { + $articlesAffected[] = $basketItem; + $totalValueOfAffectedItems = $totalValueOfAffectedItems + $basketItem->dPriceTotalAfterDiscountWithoutVouchers;",- +TShopBasketArticleCoreList,GetBasketQuantityForVoucher,"* return list matchin the vat group. + * + * @param TdbShopVat $oVat + * + * @return TShopBasketArticleList","$iCurrentPosition = $this->getItemPointer(); + $this->GoToStart(); + $iAmount = 0; + while ($oItem = $this->Next()) { + $bIncludeProduct = $oVoucher->AllowVoucherForArticle($oItem); + if ($bIncludeProduct) { + $iAmount = $iAmount + $oItem->dAmount;",- +TShopBasketArticleCoreList,GetBasketSumForDiscount,@var $oArticles TShopBasketArticleList,"// get the sum of all products (we exclude products with ""fieldExcludeFromDiscounts"") + $iCurrentPosition = $this->getItemPointer(); + $this->GoToStart(); + $dProductValue = 0; + while ($oItem = $this->Next()) { + $bIncludeProduct = $oDiscount->AllowDiscountForArticle($oItem); + if ($bIncludeProduct) { + $dProductValue = $dProductValue + $oItem->dPriceTotal;",- +TShopBasketArticleCoreList,GetBasketQuantityForDiscount,"* marks the item in the list with the shipping type. + * + * @param TShopBasketArticle $oItem + * @param TdbShopShippingType $oShippingType + * + * @return void","// get the sum of all products (we exclude products with ""fieldExcludeFromDiscounts"") + $iCurrentPosition = $this->getItemPointer(); + $this->GoToStart(); + $iAmount = 0; + while ($oItem = $this->Next()) { + $bIncludeProduct = $oDiscount->AllowDiscountForArticle($oItem); + if ($bIncludeProduct) { + $iAmount = $iAmount + $oItem->dAmount;",- +TShopBasketArticleCoreList,Render,@var $oExistingItem TShopBasketArticle,"$oView = new TViewParser(); + + $oShop = TdbShop::GetInstance(); + $oView->AddVar('oShop', $oShop); + $oView->AddVar('oArticleList', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopBasketArticleCoreList,ApplyDiscount,"* add a TShopBasketArticle to the article list. if such an item is already in the basket, we just add the amount + * instead of inserting a new entry. + * returns true if the item was added, false if it was removed (happens if the amount falls below zero). + * + * @param TShopBasketArticle $oItem + * + * @return bool","$iCurrentPosition = $this->getItemPointer(); + $this->GoToStart(); + + $dTotalDiscountValue = 0; + $bIsAbsoluteDiscount = ('absolut' == $oDiscount->fieldValueType); + if ($bIsAbsoluteDiscount) { + $dTotalDiscountValue = $oDiscount->fieldValue;",- +TShopBasketArticleCoreList,GetTotalDiscountValue,@var $oExistingItem TShopBasketArticle,"$iCurrentPosition = $this->getItemPointer(); + $this->GoToStart(); + + $dTotalDiscountValue = 0; + + while ($oItem = $this->Next()) { + $dTotalDiscountValue += ($oItem->dPriceTotal - $oItem->dPriceTotalAfterDiscount);",- +TShopBasketArticleCoreList,ResetAllDiscounts,"* return true if the item is in the list (uses the IsSameAs method). + * + * @param TShopBasketArticle $oItem + * + * @return bool","$iCurrentPosition = $this->getItemPointer(); + $this->GoToStart(); + + while ($oItem = $this->Next()) { + $oItem->ResetDiscounts();",- +TShopBasketArticleCoreList,ResetAllShippingMarkers,"* changes the amount of the requested item. if the amount drops to zero, the item is removed + * if the item does not exists, it is added + * returns true if the item was added, false if it was removed (amount fell below zero). + * + * @param TShopBasketArticle $oItem + * + * @return bool","$iCurrentPosition = $this->getItemPointer(); + $this->GoToStart(); + + while ($oItem = $this->Next()) { + $oItem->ResetShippingMarker();",- +TShopBasketArticleCoreList,ValidateBasketContents,@var $oExistingItem TShopBasketArticle,"$bIsValid = true; + $oMessage = TCMSMessageManager::GetInstance(); + $iPt = $this->getItemPointer(); + $this->GoToStart(); + while ($oTmp = $this->Next()) { + if ($oTmp->TotalStockAvailable() < $oTmp->dAmount) { + $aErrorCodes = $oTmp->GetSQLWithTablePrefix(); + $aErrorCodes['dStockWanted'] = $oTmp->dAmount; + if ($oTmp->TotalStockAvailable() > 0) { + $aErrorCodes['dStockAvailable'] = $oTmp->TotalStockAvailable(); + $oMessage->AddMessage($sMessageManager, 'ERROR-ADD-TO-BASKET-NOT-ENOUGH-STOCK', $aErrorCodes); + $this->validateBasketContentBuyable($oTmp, $sMessageManager);",- +TShopBasketArticleCoreList,updateCustomData: bool,"* overwrote the method so that the id could type hint properly. + * + * @return TShopBasketArticle|bool","$item = $this->FindItemWithProperty('sBasketItemKey', $basketIdentifier); + if (false === $item) { + return false;",- +TShopBasketArticleCustomDataValidationError,__construct,* @var string,"$this->itemName = $itemName; + $this->errorMessageCode = $errorMessageCode; + $this->additionalData = $additionalData;",- +TShopBasketArticleCustomDataValidationError,setAdditionalData,* @var string,$this->additionalData = $additionalData;,- +TShopBasketArticleCustomDataValidationError,getAdditionalData,* @var array,return $this->additionalData;,- +TShopBasketArticleCustomDataValidationError,setErrorMessageCode,"* @param string $itemName + * @param string $errorMessageCode + * @param array $additionalData",$this->errorMessageCode = $errorMessageCode;,- +TShopBasketArticleCustomDataValidationError,getErrorMessageCode,"* @param array $additionalData + * + * @return void",return $this->errorMessageCode;,- +TShopBasketArticleCustomDataValidationError,setItemName,* @return array,$this->itemName = $itemName;,- +TShopBasketArticleCustomDataValidationError,getItemName,"* @param string $errorMessageCode + * + * @return void",return $this->itemName;,- +holds,next: TdbShopDiscount|bool,"* class holds a list of discounts acting on a basket article. +/*",return parent::Next();,- +holds,Previous,"* return next itme. + * + * @return TdbShopDiscount|bool",return parent::Previous();,- +holds,current:TdbShopDiscount|bool,"* return previous itme. + * + * @return TdbShopDiscount|false",return parent::Current();,- +TShopBasketCore,isTotalCostKnown,"* Der Warenkorb enthält die vom Kunden zur Bestellung vorgemerkten Artikel. + * Diese Komponente ist für die Berechnung der Versandkosten, Rabatte, Steuern, + * sowie möglicher, durch Bezahlarten verursachter, Zusatzkosten zuständig. + * Außerdem wird über den Warenkorb die tatsächliche Bestellung, inklusive etwaiger + * Exporte durchgeführt. + * Der Warenkorb kann optional anzeigen, ab welcher Summe die nächstgünstigere + * Versandkostenschwelle erreicht würde. Diese Information kann im Miniwarenkorb + * sowie im Hauptwarenkorb angezeigt werden. +/*",return $this->totalCostKnown;,- +TShopBasketCore,__construct,"* The calculated gross sum of all articles in the basket. + * This is the price calculated before discounts or vouchers have been applied + * @var float",,- +TShopBasketCore,SetBasketRecalculationFlag,"* the total delivery costs (gross) + * @var float",$this->bMarkAsRecalculationNeeded = $bRecalculationNeeded;,- +TShopBasketCore,BasketRequiresRecalculation,"* the total wrapping costs for the basket (gross) + * @var float",return $this->bMarkAsRecalculationNeeded;,- +TShopBasketCore,__get,"* the total gross wrapping card costs + * @var float","if ('bMarkAsRecalculationNeeded' == $sVar) { + trigger_error('DO NOT access bMarkAsRecalculationNeeded as property. use SetBasketRecalculationFlag() and BasketRequiresRecalculation() instead!', E_USER_WARNING); + + return $this->BasketRequiresRecalculation();",- +TShopBasketCore,__set,"* total gross voucher value for the basket + * NOTE: includes ONLY sponsored vouchers + * @var float","if ('bMarkAsRecalculationNeeded' == $sVar) { + trigger_error('DO NOT access bMarkAsRecalculationNeeded as property. use SetBasketRecalculationFlag() and BasketRequiresRecalculation() instead!', E_USER_WARNING); + + return $this->SetBasketRecalculationFlag($sVal);",- +TShopBasketCore,__clone,"* the total for all NONE sponsored vouchers (vouchers that act as discounts - so DO affect VAT). + * @var float","foreach ($this as $sPropName => $sPropVal) { + if (is_object($this->$sPropName)) { + $this->$sPropName = clone $this->$sPropName;",- +TShopBasketCore,SetActiveShippingGroup,"* the total gross discount sum + * @var float","$bGroupAssigned = false; + if (!is_null($oShippingGroup)) { + $oAvailableShippingGroups = $this->GetAvailableShippingGroups(); + if (!is_null($oAvailableShippingGroups) && $oAvailableShippingGroups->IsInList($oShippingGroup->id)) { + $bGroupAssigned = true; + $this->oActiveShippingGroup = $oShippingGroup; + + // if a payment method is selected, then we need to make sure it is available for the selected shipping group. + // since the SetActivePaymentmethod performs the check we call it. + if (!is_null($this->GetActivePaymentMethod())) { + $this->SetActivePaymentMethod($this->GetActivePaymentMethod());",- +TShopBasketCore,GetActiveShippingGroup,"* the total article costs after discounts have been applied + * NOTE: vouchers not sponsored are included in this price - so this represents the REAL article price. + * + * @var float","if (is_null($this->oActiveShippingGroup)) { + // fetch the one from the shop + $oShopConfig = TdbShop::GetInstance(); + $oActiveShippingGroup = $oShopConfig->GetFieldShopShippingGroup(); + if (false == $this->SetActiveShippingGroup($oActiveShippingGroup)) { + // unable to set - group not in allowed list + $oList = $this->GetAvailableShippingGroups(); + $oList->GoToStart(); + if ($oList->Length() > 0) { + $oActiveShippingGroup = $oList->Current(); + $this->SetActiveShippingGroup($oActiveShippingGroup);",- +TShopBasketCore,GetActiveShippingGroupWithoutLoading,* @var float,return $this->oActiveShippingGroup;,- +TShopBasketCore,GetAvailableShippingGroups,"* the sum of all VAT costs + * @var float",return TdbShopShippingGroupList::GetAvailableShippingGroups();,- +TShopBasketCore,GetAvailablePaymentMethods,"* the sum of all VAT costs excluding shipping costs + * @var float","$oList = null; + if ($this->GetActiveShippingGroup()) { + $oList = $this->GetActiveShippingGroup()->GetValidPaymentMethods();",- +TShopBasketCore,GetValidPaymentMethodsSelectableByTheUser,"* the grand total for the basket + * @var float","$oList = null; + if ($this->GetActiveShippingGroup()) { + $oList = $this->GetActiveShippingGroup()->GetValidPaymentMethodsSelectableByTheUser();",- +TShopBasketCore,ResetAllShippingMarkers,"* the grand total for the basket excluding shipping costs + * @var float",$this->GetBasketArticles()->ResetAllShippingMarkers();,- +TShopBasketCore,SetActivePaymentMethod,* @var float,"// make sure the shop payment selected is valid for the shipping group selected + $bMethodOk = false; + if (!is_null($oShopPayment)) { + $oList = $this->GetAvailablePaymentMethods(); + if (!is_null($oList) && $oList->IsInList($oShopPayment->id)) { + $bMethodOk = true; + $this->oActivePaymentMethod = $oShopPayment;",- +TShopBasketCore,GetActivePaymentMethod,"* the total number of articles in the basket. + * + * @var float",return $this->oActivePaymentMethod;,- +TShopBasketCore,ClearBasket,"* the total number of unique articles in the basket. + * + * @var float","$this->UnlockBasket(); + /** @var Request $request */ + $request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest(); + if (null !== $request && true === $request->hasSession()) { + $request->getSession()->remove(self::SESSION_KEY_NAME);",- +TShopBasketCore,OnUserLogoutHook,* @var float,"$this->SetActivePaymentMethod(null); + $this->SetActiveShippingGroup(null); + //$this->RecalculateBasket(); + $this->SetBasketRecalculationFlag();",- +TShopBasketCore,OnUserLoginHook,* @var float,"$this->SetBasketRecalculationFlag(); + // $this->RecalculateBasket();",- +TShopBasketCore,OnUserUpdatedHook,"* all order steps completed are stored in this array (systemname=>true) + * this way, each step can check if all previous steps have been properly completed. + * + * @var array","$this->SetBasketRecalculationFlag(); + // $this->RecalculateBasket();",- +TShopBasketCore,CommitToSession,"* the basket identifier is set when the basket is commited to db (in the order process) the first time + * this usually happens after the user enters from the basket overview page into the order process. + * + * @var string","// save copy to session + if (TShopBasket::BasketInSession()) { + $oTmp = TShopBasket::GetInstance(); + if (true === $bForce || $oTmp == $this) { + $oUser = TdbDataExtranetUser::GetInstance(); + $oUser->ObserverUnregister('oUserBasket'); + + /** @var Request $request */ + $request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest(); + /** @var TPKgCmsSession $session */ + if (null !== $request && true === $request->hasSession()) { + $session = $request->getSession(); + $session->set(self::SESSION_KEY_NAME, $this);",- +TShopBasketCore,GetBasketSumForVoucher,* @var TdbShopWrappingCard|null,"$value = $this->GetBasketArticles()->GetBasketSumForVoucher($oVoucher); + if (true === $oVoucher->IsSponsored()) { + $value += $this->dCostShipping;",- +TShopBasketCore,ApplyNoneSponsoredVoucherValueToItems,* @var TdbShopWrapping|null,"$this->GetBasketArticles()->ReducePriceForItemsAffectedByNoneSponsoredVoucher($oVoucher, $dVoucherValue);",- +TShopBasketCore,GetBasketQuantityForVoucher,"* use GetActiveVatList to access the property. + * + * @var TdbShopVatList|null",return $this->GetBasketArticles()->GetBasketQuantityForVoucher($oVoucher);,- +TShopBasketCore,GetBasketSumForDiscount,"* holds the articles of the basket - NOT: you should NOT access this directly. instead use GetBasketArticles(). + * + * @var TShopBasketArticleList|null",return $this->GetBasketArticles()->GetBasketSumForDiscount($oDiscount);,- +TShopBasketCore,GetBasketQuantityForDiscount,"* use GetActiveDiscounts to access the property. + * + * @var TShopBasketDiscountList|null",return $this->GetBasketArticles()->GetBasketQuantityForDiscount($oDiscount);,- +TShopBasketCore,AddItem,"* use GetActiveShippingGroup to access this property. + * + * @var TdbShopShippingGroup|null","$bWasAdded = false; + if ($oItem->IsBuyable()) { + $bWasAdded = $this->GetBasketArticles()->AddItem($oItem); + $this->SetBasketRecalculationFlag();",- +TShopBasketCore,updateCustomData: bool,"* use GetActivePaymentMethod to access the property. + * + * @var TdbShopPaymentMethod|null","return $this->oBasketArticles->updateCustomData($basketIdentifier, $customData);",- +TShopBasketCore,FindItem,"* use GetActiveVouchers to access the property. + * + * @var TShopBasketVoucherList",return $this->FindItemByBasketItemKey($oItem->sBasketItemKey);,- +TShopBasketCore,FindItemByBasketItemKey,"* @FIXME private property that is never accessed. + * @var null","return $this->GetBasketArticles()->FindItemWithProperty('sBasketItemKey', $sBasketItemKey);",- +TShopBasketCore,UpdateItemAmount,"* as soon as an order request is issued, we try to create an order id, and + * store it in $_SESSION[self::SESSION_KEY_PROCESSING_BASKET]. This way, we can prevent a reload from + * generating a second order.","$bWasUpdated = false; + if ($oItem->IsBuyable() || 0 == $oItem->dAmount) { + $bWasUpdated = $this->GetBasketArticles()->UpdateItemAmount($oItem); + $this->SetBasketRecalculationFlag();",- +TShopBasketCore,RemoveItem,"* when creating an order we place the order id into this session var and keep it there + * this is usefull if you, for example, want to show the order as a print version to the user.","$oRemoveItem = $this->FindItemByBasketItemKey($sBasketItemKey); + if ($oRemoveItem) { + $iOldAmount = $oRemoveItem->dAmount; + $oRemoveItem->ChangeAmount(0); + $this->UpdateItemAmount($oRemoveItem); + $oRemoveItem->ChangeAmount($iOldAmount);",- +TShopBasketCore,RecalculateBasket,"* @var int + * @psalm-var self::VOUCHER_*","$this->totalCostKnown = true; + ++$this->recalculationDepth; + + $this->SetBasketRecalculationFlag(false); + $this->dCostArticlesTotal = 0; + $this->dCostArticlesTotalAfterDiscounts = 0; + $this->dCostArticlesTotalAfterDiscountsWithoutNoneSponsoredVouchers = 0; + $this->dCostShipping = 0; + $this->dCostWrapping = 0; + $this->dCostWrappingCards = 0; + $this->dCostVouchers = 0; + $this->dCostDiscounts = 0; + $this->dCostVAT = 0; + $this->dCostTotal = 0; + $this->dCostPaymentMethodSurcharge = 0; + + $this->GetBasketArticles()->Refresh(); + $this->ResetAllShippingMarkers(); + + $this->iTotalNumberOfUniqueArticles = $this->GetBasketArticles()->Length(); + $this->dTotalNumberOfArticles = $this->GetBasketArticles()->dNumberOfItems; + $this->dCostArticlesTotal = $this->GetBasketArticles()->dProductPrice; + $this->dTotalWeight = $this->GetBasketArticles()->dTotalWeight; + $this->dTotalVolume = $this->GetBasketArticles()->dTotalVolume; + + $this->RecalculateDiscounts(); + $this->dCostArticlesTotalAfterDiscounts = $this->dCostArticlesTotal - $this->dCostDiscounts; + $this->dCostArticlesTotalAfterDiscountsWithoutNoneSponsoredVouchers = $this->dCostArticlesTotalAfterDiscounts; + + /* + * Reload vouchers so that their PostLoadHook is executed. If the user changed the currency, it needs to be + * adjusted in the vouchers, which is done automatically in the hook. This is a quick fix - the problem itself + * needs to be addressed in a wider scope. + */ + $this->reloadVouchers(); + + // now calculate the voucher values that act as discounts (vouchers NOT sponsored) + // We need to set the type here because the current method to remove invalid vouchers does not take a type which + // we can use to filter the vouchers being recalculated at the moment. + // This fixes https://github.com/chameleon-system/chameleon-system/issues/540 + $this->setVoucherTypeCurrentlyRecalculating(self::VOUCHER_NOT_SPONSORED); + $this->RecalculateNoneSponsoredVouchers(); + $this->setVoucherTypeCurrentlyRecalculating(self::VOUCHER_TYPE_NOT_SET); + + $this->dCostArticlesTotalAfterDiscounts = $this->dCostArticlesTotalAfterDiscounts - $this->dCostNoneSponsoredVouchers; + + $this->RecalculateShipping(); + $this->CalculatePaymentMethodCosts(); + + $this->RecalculateVAT(); + $this->dCostTotal = $this->dCostArticlesTotalAfterDiscounts + $this->dCostShipping + $this->dCostPaymentMethodSurcharge; + $this->setVoucherTypeCurrentlyRecalculating(self::VOUCHER_SPONSORED); + $this->RecalculateVouchers(); + $this->setVoucherTypeCurrentlyRecalculating(self::VOUCHER_TYPE_NOT_SET); + $this->dCostTotal = $this->dCostTotal - $this->dCostVouchers; // - $this->dCostDiscounts; + $this->dCostTotalWithoutShipping = $this->dCostTotal - $this->dCostShipping; + + /** + * since the payment method may have a basket value restriction, we need to check its validity again after + * we have the final basket value. If the final basket value invalidates the payment, then we need to call the recalculate again + * if this again results in an invalid payment method, then we throw an exception. + */ + $this->totalCostKnown = false; + + if (null !== $this->GetActivePaymentMethod() && false === $this->HasValidPaymentMethod()) { + if ($this->recalculationDepth > 1) { + throw new ErrorException(""there is no shipping group that has any payment methods available for the current basket due to basket value ({$this->dCostTotal",- +TShopBasketCore,GetActiveVATList,"* if set to true, the basket will recalculate its contents on destruction or reinitialization + * use SetBasketRecalculationFlag and BasketRequiresRecalculation to access. + * + * @var bool","if (is_null($this->oActiveVatList)) { + $this->oActiveVatList = TdbShopVatList::GetList(); + $this->oActiveVatList->bAllowItemCache = true; + $this->oActiveVatList->GoToStart();",- +TShopBasketCore,GetLargestVATObject,* @var bool,"$oActiveVatList = $this->GetActiveVATList(); + + $oMaxItem = null; + if (is_object($oActiveVatList)) { + $oMaxItem = $oActiveVatList->GetMaxItem();",- +TShopBasketCore,GetArticlesAffectedByShippingType,"* @var int + * @psam-var positive-int|0",return $this->GetBasketArticles()->GetArticlesAffectedByShippingType($oShippingType);,- +TShopBasketCore,CreateOrder,* @return bool,"$bOrderCreated = false; + $oOrder = false; + $bBasketVouchersValidated = $this->CheckBasketVoucherAvailable($sMessageConsumer); + $this->RecalculateBasket(); + $bSkipPaymentValidation = $bForcePayment; // skip the payment validation if the payment is to be forced + $this->getLogger()->info('create order'); + if ($this->CreateOrderAllowCreation($sMessageConsumer, $bSkipPaymentValidation) && $bBasketVouchersValidated) { + $this->getLogger()->info('create order: order creation permitted', array('basket' => $this, 'user' => TdbDataExtranetUser::GetInstance())); + // lock basket to prevent a second request from creating the order again. + $this->LockBasket(); + // now create order + /** @var $oOrder TdbShopOrder */ + $oOrder = TdbShopOrder::GetNewInstance(); + // copy base data + $oBasketCopy = clone $this; + $oOrder->LoadFromBasket($oBasketCopy); + + // we are not logged in yet, but trying to create the order... so we need to set allow edit all + $oOrder->AllowEditByAll(true); + $oOrder->Save(); + //'order_ident'=>$oBasket->sBasketIdentifier + if (!empty($oBasketCopy->sBasketIdentifier)) { // if the basket has no identifier, then we do not update the shop_order_basket record + $query = ""UPDATE `shop_order_basket` SET `shop_order_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($oOrder->id).""' WHERE `order_ident` = '"".MySqlLegacySupport::getInstance()->real_escape_string($oBasketCopy->sBasketIdentifier).""'""; + MySqlLegacySupport::getInstance()->query($query);",- +TShopBasketCore,OnPaymentSuccessHook,* added to allow subclasses to extend the method.,"$bPostPaymentOk = $oPaymentHandler->PostExecutePaymentHook($oOrder, $sMessageConsumer); + $oOrder->AllowEditByAll(true); + $oPaymentHandler->SaveUserPaymentDataToOrder($oOrder->id); + if (true === $bPostPaymentOk) { + // and export order for wawi - if not already exported (as may happen, if the payment handler manages export + if ($oOrder->fieldSystemOrderExportedDate <= '0000-00-00 00:00:00') { + if ($oOrder->ExportOrderForWaWiHook($oPaymentHandler)) { + $oOrder->MarkOrderAsExportedToWaWi(true);",- +TShopBasketCore,Render,"* mark the basket as dirty - will be recalculated as soon as the basket is loaded from sessin. + * + * @param bool $bRecalculationNeeded + * + * @return void","$oView = new TViewParser(); + + $oShop = TdbShop::GetInstance(); + $oView->AddVar('oShop', $oShop); + $oView->AddVar('oBasket', $this); + $oView->AddVar('oBasketArticles', $this->GetBasketArticles()); + $oView->AddVar('oActiveVatList', $this->GetActiveVATList()); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);",- +TShopBasketCore,GetBasketContents,"* return true if the basket needs to be recalculated. + * + * @return bool","$oClonedBasketArticles = clone $this->GetBasketArticles(); + + return $oClonedBasketArticles;",- +TShopBasketCore,getVoucherTypeCurrentlyRecalculating: int,"* remove these in a later version - kept for compatibility reasons. + * + * @param string $sVar + * + * @return bool|null",return $this->voucherTypeCurrentlyRecalculating;,- +TShopBasketCore,AddVoucher,"* remove these in a later version - kept for compatibility reasons. + * + * @param string $sVar + * @param string $sVal","$bVoucherAdded = false; + $oMessageManager = TCMSMessageManager::GetInstance(); + + $oVoucherSeries = $oVoucher->GetFieldShopVoucherSeries(); + $aMessageData = $oVoucherSeries->GetObjectPropertiesAsArray(); + $aVoucherData = $oVoucher->GetObjectPropertiesAsArray(); + $aMessageData = array_merge($aMessageData, $aVoucherData); + + $cAllowUseOfVoucherResult = $oVoucher->AllowUseOfVoucher(); + if (TdbShopVoucher::ALLOW_USE != $cAllowUseOfVoucherResult) { + if (TdbShopVoucher::USE_ERROR_NOT_VALID_FOR_CUSTOMER_GROUP_MISSING_LOGIN == $cAllowUseOfVoucherResult || + TdbShopVoucher::USE_ERROR_NOT_VALID_FOR_CUSTOMER_MISSING_LOGIN == $cAllowUseOfVoucherResult) { + $oExtranet = TdbDataExtranet::GetInstance(); + if (!is_null($oExtranet)) { + $aMessageData['sLinkLoginStart'] = 'GetLinkLoginPage().'"">'; + $aMessageData['sLinkLoginEnd'] = '';",- +TShopBasketCore,RemoveVoucher,"* set the active shipping group - return false, if an invalid group is selected. + * + * @param TdbShopShippingGroup|null $oShippingGroup + * + * @return bool","$bRemoved = $this->GetActiveVouchers()->RemoveItem('sBasketVoucherKey', $sBasketVoucherKey); + $oMessageManager = TCMSMessageManager::GetInstance(); + if ($bRemoved) { + $oMessageManager->AddMessage($sMessageHandler, 'VOUCHER-REMOVED'); + $this->SetBasketRecalculationFlag();",- +TShopBasketCore,GetVoucherList,"* return the active shipping group - will set the shipping group to the default group, if none is set. + * + * @return TdbShopShippingGroup|null","if (!is_null($this->GetActiveVouchers())) { + return clone $this->GetActiveVouchers();",- +TShopBasketCore,GetDiscountList,"* return the active shipping group - will NOT set the shipping group to the default group, if none is set. + * + * @return TdbShopShippingGroup|null",return clone $this->GetActiveDiscounts();,- +TShopBasketCore,CommitCopyToDatabase,* @return TdbShopShippingGroupList,"$time = time(); + $user = $this->getExtranetUserProvider()->getActiveUser(); + $request = $this->getRequest(); + if (null === $request || false === $request->hasSession()) { + $sessionCopy = array(); + $sessionId = '';",- +TShopBasketCore,ValidateBasketContents,"* return all payment methods for the active shipping group. + * + * @return TdbShopPaymentMethodList|null","/* + * do not validate basket if returning from an interrupted payment call since the order + * creation has already begun (items saved, stock reduced). revalidating may remove items from the basket due to zero stock + * which is of course not intended since the stock has been reserved via the creation process of the order + * + */ + if (TdbShopPaymentHandler::ExecutePaymentInterrupted()) { + return true;",- +TShopBasketCore,GetNextAvailableDiscount,"* return all payment methods for the active shipping group that are selectable by the user. + * + * @return TdbShopPaymentMethodList|null","$oNextDiscount = null; + $oUser = TdbDataExtranetUser::GetInstance(); + // $oDiscountList = TdbShopDiscountList::GetActiveDiscountList(""`shop_discount`.`restrict_to_value_from` > "".MySqlLegacySupport::getInstance()->real_escape_string($this->dCostArticlesTotal),""`shop_discount`.`restrict_to_value_from` ASC""); + $oDiscountList = $this->GetActiveDiscounts(); + $oDiscountList->GoToStart(); + $aDiscountId = array(); + while ($oDiscount = $oDiscountList->Next()) { + $aDiscountId[] = ""(`shop_discount`.`id` != '"".MySqlLegacySupport::getInstance()->real_escape_string($oDiscount->id).""' AND `shop_discount`.`restrict_to_value_from` >= '"".MySqlLegacySupport::getInstance()->real_escape_string($oDiscount->sqlData['restrict_to_value_from']).""' AND `shop_discount`.`restrict_to_articles_from` >= '"".MySqlLegacySupport::getInstance()->real_escape_string($oDiscount->sqlData['restrict_to_articles_from']).""')"";",- +TShopBasketCore,LockBasket,* @return void,$_SESSION[self::SESSION_KEY_PROCESSING_BASKET] = '1';,- +TShopBasketCore,UnlockBasket,"* set the active payment method. return true on succes - false if the method is not allowed + * Note: you hast set a shipping group first! + * + * @param TdbShopPaymentMethod|null $oShopPayment + * + * @return bool","if (array_key_exists(self::SESSION_KEY_PROCESSING_BASKET, $_SESSION)) { + unset($_SESSION[self::SESSION_KEY_PROCESSING_BASKET]);",- +TShopBasketCore,OnBasketItemUpdateEvent,"* return the active payment method. + * + * @return TdbShopPaymentMethod|null","$event = new BasketItemEvent( + TdbDataExtranetUser::GetInstance(), + $this, + $oBasketItemChanged + ); + $this->getEventDispatcher()->dispatch($event, ShopEvents::BASKET_UPDATE_ITEM);",- +TShopBasketCore,OnBasketItemDeleteEvent,"* deletes contents of basket. + * + * @return void","$event = new BasketItemEvent( + TdbDataExtranetUser::GetInstance(), + $this, + $oBasketItemRemoved + ); + $this->getEventDispatcher()->dispatch($event, ShopEvents::BASKET_DELETE_ITEM);",- +TShopBasketCore,custom_wakeup,@var Request $request,"$requestInfoService = $this->getRequestInfoService(); + if ($requestInfoService->isBackendMode()) { + return;",- +TShopBasketCore,sessionWakeupHook,"* @param bool $bReset + * @param bool $bReloadFromSession + * + * @return TShopBasket + * return the current basket object + * + * @deprecated use chameleon_system_shop.shop_service getActiveBasket and resetBasket instead",$this->custom_wakeup();,- +TShopBasketCore,myOrderDetailHandlerFactory,@var $shopService ShopServiceInterface,"/** @var Request $request */ + $request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest(); + + return new TPkgShopViewMyOrderDetails( + new TPkgShopViewMyOrderDetailsDbAdapter(\ChameleonSystem\CoreBundle\ServiceLocator::get( + 'database_connection' + )), + new TPkgShopViewMyOrderDetailsSessionAdapter($request->getSession()) + );",- +is,AllowDiscountForContentValue,"* The object is used to collect all articles in the basket to which the Discount applies. the object is managed by + * TShopBasket. + * + * @psalm-suppress InvalidReturnType + * @FIXME This class is not implemented",// Not yet implemented,- +is,GetDiscountValue,* @var array,// Not yet implemented,- +TShopBasketDiscountCoreList,next: TdbShopDiscount|bool,* @return TdbShopDiscount|bool,return parent::Next();,- +TShopBasketDiscountCoreList,GetDiscountValue,"* return the total discount value for all active discounts. note that the method will fetch the current basket + * using the baskets singleton factory. + * + * @return float","$dValue = 0; + $iTmpPointer = $this->getItemPointer(); + $this->GoToStart(); + while ($oDiscount = $this->Next()) { + $dValue += $oDiscount->GetValue();",- +TShopBasketDiscountCoreList,RemoveInvalidDiscounts,"* Removes all discounts from the basket, that are not valid based on the contents of the basket and the current user + * Returns the number of discounts removed. + * + * @param string $sMessangerName - optional message manager to which we output why a discount was removed + * + * @return void","// since the min value of the basket for which a discount may work is affected by other discounts, + // we need to remove the discounts first, and then add them one by one back to the basket + // we suppress the add messages, but keep the negative messages + + $oMessageManager = TCMSMessageManager::GetInstance(); + + // get copy of discounts + $aDiscountList = $this->_items; + $this->Destroy(); + foreach ($aDiscountList as $iDiscountKey => $oDiscount) { + /** @var $oDiscount TdbShopDiscount */ + $cDiscountAllowUseCode = $oDiscount->AllowUseOfDiscount(); + if (TdbShopDiscount::ALLOW_USE == $cDiscountAllowUseCode) { + $this->AddItem($oDiscount);",- +TShopBasketVoucherCoreList,AddItem,"* Adds a voucher to the list. note that it wil not check if the voucher is valid (this must be done by the calling method) + * Returns the voucher key generated when adding the voucher. + * + * @param TdbShopVoucher $oVoucher + * + * @return void","$oVoucher->sBasketVoucherKey = $this->GetUniqueItemKey(); + parent::AddItem($oVoucher);",- +TShopBasketVoucherCoreList,next: TdbShopVoucher|bool,"* return a unique sBasketVoucherKey for the current list. + * + * @return string",return parent::Next();,- +TShopBasketVoucherCoreList,GetVoucherValue,"* return voucher. + * + * @return TdbShopVoucher|bool","$dValue = 0; + $oBasket = TShopBasket::GetInstance(); + + $iTmpPointer = $this->getItemPointer(); + $this->GoToStart(); + $maxValueShippingCostAdjustment = true === $bSponsoredVouchers ? $oBasket->dCostShipping : 0; + while ($oVoucher = $this->Next()) { + if (($bSponsoredVouchers && $oVoucher->IsSponsored()) || (false == $bSponsoredVouchers && false == $oVoucher->IsSponsored())) { + $dMaxValue = ($oBasket->dCostArticlesTotalAfterDiscounts + $maxValueShippingCostAdjustment) - $dValue; + $dValue += $oVoucher->GetValue(true, $dMaxValue, $bSponsoredVouchers);",- +TShopBasketVoucherCoreList,RemoveInvalidVouchers,"* return the total voucher value for all active vouchers. note that the method will fetch the current basket + * using the baskets singleton factory. + * + * @param bool $bSponsoredVouchers - set to true: only sponsored vouchers, false only none sponsored vouchers + * + * @return float","// since the min value of the basket for which a voucher may work is affected by other vouchers, + // we need to remove the vouchers first, and then add them one by one back to the basket + // we suppress the add messages, but keep the negative messages + + if (is_null($oBasket)) { + $oBasket = TShopBasket::GetInstance();",- +TShopBasketVoucherCoreList,HasFreeShippingVoucher,"* Removes all vouchers from the basket, that are not valid based on the contents of the basket and the current user + * Returns the number of vouchers removed. + * + * @param string $sMessangerName + * @param TShopBasket $oBasket + * + * @return void","$bHasFreeShipping = false; + $tmpCurrentPointer = $this->getItemPointer(); + $this->GoToStart(); + + while (!$bHasFreeShipping && ($oItem = $this->Next())) { + $oVoucherSeries = $oItem->GetFieldShopVoucherSeries(); + if ($oVoucherSeries->fieldFreeShipping) { + $bHasFreeShipping = true;",- +TShopBreadcrumbItem,GetName,"* item is used to simulate a breadcrumb node. + * + * @template TItem of TCMSRecord",return $this->oItem->GetName();,- +TShopBreadcrumbItem,GetLink,* @var TItem,,- +TShopBreadcrumbItem,GetTarget,* @var string,return '_self';,- +TShopBreadcrumbItemArticle,GetLink,"* item is used to simulate a breadcrumb node. + * + * @extends TShopBreadcrumbItem","$oShop = TdbShop::GetInstance(); + $oActiveCategory = $oShop->GetActiveCategory(); + $iCategoryId = null; + if (!is_null($oActiveCategory)) { + $iCategoryId = $oActiveCategory->id;",- +TShopBreadcrumbItemArticle,GetName,* @return string,return $this->oItem->GetBreadcrumbName();,- +TShopBreadcrumbItemCategory,GetLink,"* item is used to simulate a breadcrumb node. + * + * @extends TShopBreadcrumbItem",return $this->oItem->GetLink($bForcePortal);,- +TShopBreadcrumbItemCategory,GetName,"* @param bool $bForcePortal + * @return string",return $this->oItem->GetBreadcrumbName();,- +TShopBreadcrumbItemManufacturer,__construct,* @extends TShopBreadcrumbItem,$this->oItem = $manufacturer;,- +TShopBreadcrumbItemManufacturer,GetLink,"* @param bool $bForcePortal + * {@inheritDoc}",return $this->oItem->GetLinkProducts();,- +TShopCategoryTree,ResetCounter,"* Contains all child categories as TShopCategoryTree. + * + * @var TIterator","$this->iAllItemCount = 0; + $this->iItemCount = 0; + if (!is_null($this->oChildCategoryTreeList)) { + $this->oChildCategoryTreeList->GoToStart(); + while ($oChildCategoryTree = $this->oChildCategoryTreeList->Next()) { + $oChildCategoryTree->ResetCounter();",- +TShopCategoryTree,Render,"* Contains the real category for the tree. + * + * @var TdbShopCategory","$sHtml = ''; + $sCategoryNameHtml = ''; + if (!is_null($this->oRealCategory)) { + $sCategoryNameHtml = $this->RenderCategoryName($sListFilterItemId, $bShowArticleCount, $iLevelCount);",- +TShopCategoryTree,RenderChildCategories,* @var bool,"$sHtml = ''; + if (!is_null($this->oChildCategoryTreeList)) { + $this->oChildCategoryTreeList->GoToStart(); + while ($oChildCategoryTree = $this->oChildCategoryTreeList->Next()) { + $sHtml .= $oChildCategoryTree->Render($sListFilterItemId, $bHideEmptyCategories, $bShowArticleCount, $iLevelCount);",- +TShopCategoryTree,GetAddFilterURL,"* Contains the item count for this category tree. + * + * @var int","$oActiveListFilter = TdbPkgShopListfilter::GetActiveInstance(); + $aURLData = $oActiveListFilter->GetCurrentFilterAsArray(); + $aURLData = $this->ClearOtherCategoryTreeFilter($aURLData, $sListFilterItemId); + $aURLData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA][$sListFilterItemId][] = $this->oRealCategory->id; + $aURLData[TdbPkgShopListfilter::URL_PARAMETER_IS_NEW_REQUEST] = '1'; + + return $this->getActivePageService()->getLinkToActivePageRelative($aURLData);",- +TShopCategoryTree,AddItemCount,"* Contains item count for this category tree and for all child category trees. + * + * @var int","$bSet = false; + if (array_key_exists($sCategoryId, $this->aContainingChildCategories)) { + $this->iAllItemCount = $this->iAllItemCount + $iArticleCount; + if (!is_null($this->oChildCategoryTreeList)) { + $this->oChildCategoryTreeList->GoToStart(); + while ($oChildCategoryTree = $this->oChildCategoryTreeList->Next()) { + if (!$bSet) { + $bSet = $oChildCategoryTree->AddItemCount($sCategoryId, $iArticleCount);",- +TShopCategoryTree,MarkActiveCategories,"* Contains the id of the real category if exists. + * If no real category exits for the category tree then it contains random id. + * + * @var string","$this->bIsActive = false; + if (in_array($this->id, $aActiveCategories)) { + $this->bIsActive = true;",- +MTShopArticleDetails,Init,* @var string|null,"parent::Init(); + if ($this->global->UserDataExists('imageid')) { + $this->sActiveImageId = $this->global->GetUserData('imageid');",- +MTShopArticleDetails,GetRequirements,* @var array,"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle', $this->oActiveArticle);",- +MTShopArticleDetails,Accept,* @var TdbShopArticle,"/** + * @var $activeArticle TdbShopArticle + */ + $activeArticle = $oVisitor->GetSourceObject('oObject'); + + $oVisitor->SetMappedValue('oObject', $activeArticle); + $oVisitor->SetMappedValue('activeArticleUrl', $activeArticle->getLink(true)); + $oVisitor->SetMappedValue('sActiveImageId', $this->sActiveImageId); + if ($this->oActiveArticle && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger('shop_article', $this->oActiveArticle->id); + if ($this->oActiveArticle->IsVariant()) { + $oCacheTriggerManager->addTrigger('shop_article', $this->oActiveArticle->fieldVariantParentId);",- +MTShopArticleDetails,_GetCacheParameters,* @var TdbShopCategory,"$cacheParam = parent::_GetCacheParameters(); + + $activePortal = $this->getPortalDomainService()->getActivePortal(); + $cacheParam['cms_portal_id'] = $activePortal->id; + if ($this->oActiveArticle) { + $cacheParam['sArticleId'] = $this->oActiveArticle->id;",- +MTShopArticleDetails,_AllowCache,* {@inheritdoc},return true;,- +MTShopArticleQuestionEndPoint,Accept,"* @var array + * @psalm-var array","$oMsgManager = TCMSMessageManager::GetInstance(); + + $oVisitor->SetMappedValue('sFormMessages', $oMsgManager->RenderMessages($this->sModuleSpotName)); + reset($this->aInputDefinition); + $aErrors = array(); + foreach ($this->aInputDefinition as $sField => $aFieldDef) { + $sError = $oMsgManager->RenderMessages($this->sModuleSpotName.'-'.$sField); + if (!empty($sError)) { + $aErrors[$sField] = $sError;",- +MTShopCategoryDetails,Init,* @var TdbShopCategory,"parent::Init(); + $this->oActiveCategory = $this->getShopService()->getActiveCategory(); + if (null === $this->oActiveCategory) { + $homeUrl = $this->getPageService()->getLinkToPortalHomePageRelative(); + $this->getRedirectService()->redirect($homeUrl, Response::HTTP_MOVED_PERMANENTLY);",- +MTShopCategoryDetails,GetRequirements,* {@inheritdoc},"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('oObject', 'TdbShopCategory', $this->oActiveCategory);",- +MTShopCategoryDetails,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",* {@inheritdoc},"$oActiveCategory = $oVisitor->GetSourceObject('oObject'); + if ($oActiveCategory && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oActiveCategory->table, $oActiveCategory->id);",- +MTShopCategoryDetails,_AllowCache,* {@inheritdoc},return true;,- +MTShopCategoryDetails,_GetCacheParameters,* {@inheritdoc},"$parameter = parent::_GetCacheParameters(); + + if ($this->oActiveCategory) { + $parameter['sCategoryId'] = $this->oActiveCategory->id;",- +MTShopManufacturerDetails,Init,* @var TdbShopManufacturer,"parent::Init(); + $this->oActiveManufacturer = TdbShop::GetActiveManufacturer(); + if (null === $this->oActiveManufacturer) { + if (null === $this->getPortalDomainService()->getActivePortal()) { + $this->oActiveManufacturer = TdbShopManufacturer::GetNewInstance();",- +MTShopManufacturerDetails,GetRequirements,* {@inheritdoc},"parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('oObject', 'TdbShopManufacturer', $this->oActiveManufacturer);",- +MTShopManufacturerDetails,Accept,* {@inheritdoc},"$oManufacturer = $oVisitor->GetSourceObject('oObject'); + $oVisitor->SetMappedValue('oObject', $oManufacturer); + if ($oManufacturer && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oManufacturer->table, $oManufacturer->id);",- +MTShopManufacturerDetails,_AllowCache,* {@inheritdoc},return true;,- +MTShopManufacturerDetails,_GetCacheParameters,* {@inheritdoc},"$parameters = parent::_GetCacheParameters(); + + if ($this->oActiveManufacturer) { + $parameters['sManufacturerId'] = $this->oActiveManufacturer->id;",- +MTShopOrderHistory,Accept,* {@inheritdoc},"$oUser = TdbDataExtranetUser::GetInstance(); + $oVisitor->SetMappedValue('sDetailLinkCaption', 'Details'); + if (null === $oUser->id) { + return;",- +MTShopOrderHistory,_AllowCache,"* get the value list for the whole order list. + * + * @param TdbShopOrderList $oOrderList + * @param bool $bCachingEnabled + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager + * + * @return array",return false;,- +MTFooterCategory,Accept,"* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapperVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager","$oCacheTriggerManager->addTrigger('pkg_shop_footer_category'); + $oFooterList = TdbPkgShopFooterCategoryList::GetListForShopId($this->getShopService()->getId()); + $aTree = array(); + while ($oFooter = $oFooterList->Next()) { + $aTree[] = $this->getSubNavi($oFooter);",- +MTFooterCategory,_GetCacheParameters,"* @param TdbPkgShopFooterCategory $oFooter + * + * @return array","$parameters = parent::_GetCacheParameters(); + if (!is_array($parameters)) { + $parameters = array();",- +MTFooterCategory,_AllowCache,* {@inheritdoc},return true;,- +MTShopArticleCatalogCoreEndPoint,__sleep,"* the Produkt catalog -> shows all articles of a given category, and the detail item view... + * IMPORTANT: do not extend this class. instead extend from MTShopArticleCatalogCore. + * + * @deprecated since 6.2.0 - no longer used. + *","$aSleep = parent::__sleep(); + $aSleep[] = 'iPage'; + $aSleep[] = 'iPageSize'; + $aSleep[] = 'iItemId'; + $aSleep[] = 'iCategoryId'; + $aSleep[] = 'aFilter'; + $aSleep[] = 'iActiveShopModuleArticlelistOrderbyId'; + + return $aSleep;",- +MTShopArticleCatalogCoreEndPoint,ChangePage,"* current page. + * + * @var int",,- +MTShopArticleCatalogCoreEndPoint,ChangePageAjax,"* number of records per page. + * + * @var int","$oResponse = new MTShopArticleListResponse(); + /** @var $oResponse MTShopArticleListResponse */ + if (null === $iListIdent) { + $oGlobal = TGlobal::instance(); + $iListIdent = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_KEY_NAME);",- +MTShopArticleCatalogCoreEndPoint,Init,"* current item. + * + * @var string","parent::Init(); + $this->oModuleConf = TdbShopArticleCatalogConf::GetNewInstance(); + $this->oModuleConf->LoadFromField('cms_tpl_module_instance_id', $this->instanceID); + $this->iPageSize = $this->GetActivePageSize(); + + $oCategory = TdbShop::GetActiveCategory(); + if (is_object($oCategory)) { + $this->iActiveShopModuleArticlelistOrderbyId = $this->oModuleConf->GetDefaultOrderBy($oCategory);",- +MTShopArticleCatalogCoreEndPoint,Execute,"* current category - if not set and an item is set, then the items primary category will be used. + * if neither item nor category is set, then the first root category will be used. + * + * @var string","parent::Execute(); + // Initialize objects + $this->data['oActiveCategory'] = self::GetActiveCategory(); + $this->data['oActiveArticle'] = self::GetActiveItem(); + $this->data['oModuleConf'] = $this->oModuleConf; + // load list... + + if (!is_null($this->data['oActiveArticle'])) { + // show detail page if we have an active article + $this->ViewArticleHook();",- +MTShopArticleCatalogCoreEndPoint,WriteReview,"* holds the current order by id. + * + * @var string","// validate user input... + $bDataValide = false; + $oMsgManager = TCMSMessageManager::GetInstance(); + $oGlobal = TGlobal::instance(); + $aUserData = $oGlobal->GetUserData(TdbShopArticleReview::INPUT_BASE_NAME); + if (is_array($aUserData)) { + $bDataValide = true; + + $sCaptcha = ''; + if (array_key_exists('captcha', $aUserData)) { + $sCaptcha = trim($aUserData['captcha']);",- +MTShopArticleCatalogCoreEndPoint,GetActiveShopModuleArticlelistOrderbyId,"* any filter restrictions for the list. + * + * @var array","$iActiveShopModuleArticlelistOrderbyId = null; + $oGlobal = TGlobal::instance(); + if ($oGlobal->UserDataExists(self::URL_ORDER_BY)) { + /** @var string $iActiveShopModuleArticlelistOrderbyId */ + $iActiveShopModuleArticlelistOrderbyId = $oGlobal->GetUserData(self::URL_ORDER_BY);",- +MTShopArticleCatalogCoreEndPoint,GetActiveOrderByString,"* the current article list. + * + * @var TdbShopArticleList","static $oOrderBy = null; + if (is_null($oOrderBy)) { + // remove default order by - for performance reason we should be allowed to sort by nothing + $sOrder = ''; //`shop_article`.`list_rank` DESC, `shop_article`.`name` ASC'; + $iActiveShopModuleArticlelistOrderbyId = $this->GetActiveShopModuleArticlelistOrderbyId($sInstanceId); + if (is_null($iActiveShopModuleArticlelistOrderbyId)) { + $iActiveShopModuleArticlelistOrderbyId = $sDefaultActiveShopModuleArticlelistOrderbyId;",- +MTShopArticleCatalogCoreEndPoint,_AllowCache,"* set this to false if you need to prevent caching of the list/item. + * + * @var bool","return false; // we currently cannot cache the list, since each list has a unique state key per user which would be include in the cached result (#26067)",- +MTShopArticleCatalogCoreEndPoint,_GetCacheParameters,"* module conf data. + * + * @var TdbShopArticleCatalogConf","$parameters = parent::_GetCacheParameters(); + + $parameters['sActivePageId'] = $this->getActivePageService()->getActivePage()->id; + $parameters['iPage'] = $this->iPage; + $parameters['iActiveShopModuleArticlelistOrderbyId'] = $this->iActiveShopModuleArticlelistOrderbyId; + $parameters['iPageSize'] = $this->iPageSize; + $parameters['iItemId'] = $this->iItemId; + $parameters['iCategoryId'] = $this->iCategoryId; + $parameters['aFilter'] = md5(serialize($this->aFilter)); + $aAdditionalParameters = TdbShopArticleList::GetGlobalArticleListCacheKeyParameters(); + if (count($aAdditionalParameters)) { + foreach ($aAdditionalParameters as $sKey => $sVal) { + $parameters[$sKey] = $sVal;",- +MTShopArticleCatalogCoreEndPoint,_GetCacheTableInfos,"* add your custom methods as array to $this->methodCallAllowed here + * to allow them to be called from web.","$aClearCacheInfo = parent::_GetCacheTableInfos(); + + if (!is_array($aClearCacheInfo)) { + $aClearCacheInfo = array();",- +MTShopBasketCoreEndpoint,Init,"* The module manages access to the basket object. + * IMPORTANT: do not extend directly form this class. use the ""cms Klassen-vererbungsmanager"" (pkg_cms_class_manager) instead + * or, if you have to, extend from ""MTShopBasketCore"". +/*","parent::Init(); + + // load affiliate code if passed as param + $oShop = TdbShop::GetInstance(); + $oGlobal = TGlobal::instance(); + if ($oGlobal->UserDataExists($oShop->fieldAffiliateParameterName)) { + $sCode = $oGlobal->GetUserData($oShop->fieldAffiliateParameterName); + if (!empty($sCode)) { + $oShop->SetAffiliateCode($sCode);",- +MTShopBasketCoreEndpoint,Execute,* the request field names that the basket objects understands.,"parent::Execute(); + $this->data['oBasket'] = $this->getShopService()->getActiveBasket(); + + return $this->data;",- +MTShopBasketCoreEndpoint,JumpToBasketPage,* the request field names cut into the diefferent parts.,"$bJumpAsFarAsPossible = false; + if ('1' === $this->getInputFilterUtil()->getFilteredInput('bJumpAsFarAsPossible')) { + $bJumpAsFarAsPossible = true;",- +MTShopBasketCoreEndpoint,TransferFromNoticeList,* @var null|bool,"$oGlobal = TGlobal::instance(); + $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); + if (is_null($aArticleIdsToMove) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) { + $aIdList = $aRequestData[self::URL_ITEM_ID_NAME]; + if (!is_array($aIdList)) { + $aIdList = array($aIdList);",- +MTShopBasketCoreEndpoint,RemoveFromNoticeListAjax,"* clear all products from the basket and redirect to active page. + * + * @return void","return $this->RemoveFromNoticeList($aArticleIdsToMove, $sMessageHandler, $bIsInteralCall, true);",- +MTShopBasketCoreEndpoint,RemoveFromNoticeList,"* method looks for affiliate parter codes passed to the website (if none are set yet). + * if a code is found, it is stored in the session. note: we check only ONCE for a session + * if suche a code is passed! + * + * @return void","$oGlobal = TGlobal::instance(); + $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); + if (is_null($aArticleIdsToMove) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) { + $aArticleIdsToMove = $aRequestData[self::URL_ITEM_ID_NAME]; + if (!is_array($aArticleIdsToMove)) { + $aArticleIdsToMove = array($aArticleIdsToMove);",- +MTShopBasketCoreEndpoint,TransferToNoticeList,* {@inheritdoc},"$this->RemoveFromBasket($iArticleId, $sMessageHandler, true); + $this->AddToNoticeList($iArticleId, $iAmount, $sMessageHandler, $bIsInternalCall);",- +MTShopBasketCoreEndpoint,AddToNoticeList,"* call the method to jump to the basket detail page. it will store the calling URL in the session, so + * that it becomes possible to jump back to this page from the basket. + * + * @throws RouteNotFoundException + * + * @return void","$oGlobal = TGlobal::instance(); + $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); + if (is_null($iArticleId) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) { + $iArticleId = $aRequestData[self::URL_ITEM_ID_NAME]; + if (empty($iArticleId)) { + $iArticleId = null;",- +MTShopBasketCoreEndpoint,RemoveVoucher,@var $oNode TCMSTreeNode,"$oMessageManager = TCMSMessageManager::GetInstance(); + $aBasketData = $this->global->GetUserData(self::URL_REQUEST_PARAMETER); + + $bWasRemoved = true; + + if (is_null($sBasketVoucherKey) && array_key_exists(self::URL_VOUCHER_BASKET_KEY, $aBasketData)) { + $sBasketVoucherKey = $aBasketData[self::URL_VOUCHER_BASKET_KEY];",- +MTShopBasketCoreEndpoint,AddToBasket,"* returns the url to the current page. + * + * @return string","$this->UpdateBasketItem($aRequestData, true);",- +MTShopBasketCoreEndpoint,AddToBasketAjax,"* moves an item from the notice list to the basket + * $aArticleIdsToMove should have the form 'id'=>amount + * any data not passed as a parameter is fetched from get/post + * the data passed via get/post such as self::URL_ITEM_ID can be an array or a value. + * example: []"" value="""" /> + * []"" value=""2"" /> + * []"" value="""" /> + * []"" value=""1"" /> + * or, if you only want to transfer one item: + * "" value="""" /> + * "" value=""1"" />. + * + * by default the articles will be removed from the notice list. if you want to keep some of them, make sure to add the following + * "" value=""copy"" /> + * OR + * []"" value=""copy"" /> + * []"" value=""move"" /> + * if you are moving more than one, and want to keep the first and move the second + * + * @param array $aArticleIdsToMove + * @param array $aKeepOnNoticeList + * @param string $sMessageHandler + * + * @return void","$this->UpdateBasketItem(null, true, true, true); + + // we do not redirect - so we need to recalculate basket by hand + $oBasket = TShopBasket::GetInstance(); + $oBasket->RecalculateBasket(); + + $oResponse = new stdClass(); + $oResponse->sNotificationWindow = TTools::CallModule('MTShopBasket', 'system'); + $oResponse->sMiniBasket = TTools::CallModule('MTShopBasket', 'mini'); + + return $oResponse;",- +MTShopBasketCoreEndpoint,UpdateBasketItems,"* @param array $aArticleIdsToMove + * @param string $sMessageHandler + * @param bool $bIsInteralCall + * + * @return null|array","$oMessage = TCMSMessageManager::GetInstance(); + $oGlobal = TGlobal::instance(); + if (is_null($aRequestData)) { + $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER);",- +MTShopBasketCoreEndpoint,RemoveFromBasket,"* remove item from notice list. + * + * @param array $aArticleIdsToMove + * @param string $sMessageHandler + * @param bool $bIsInteralCall + * @param bool $bIsAjaxCall + * + * @return null|array","$oGlobal = TGlobal::instance(); + $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); + if (!is_array($aRequestData)) { + $aRequestData = array();",- +MTShopBasketCoreEndpoint,UpdateBasketItem,@var $oArticle TdbShopArticle,"$request = $this->getCurrentRequest(); + if (null === $request || false === $request->hasSession()) { + return false;",- +MTShopBasketCoreEndpoint,_AllowCache,"* moves or copies one or more articles from the basket to the notice list. products to be moved must be passed. + * + * @param int $iArticleId - if you pass null, it will attempt to fetch the item id from post + * @param int $iAmount - amount to add + * @param string $sMessageHandler - info passed to this handler - uses the default message consumer for the shop if non passed (can also be passed via get/post) + * @param bool $bIsInternalCall + * + * @return void","if (0 != TShopBasket::GetInstance()->iTotalNumberOfUniqueArticles) { + return false;",- +MTShopBasketCoreEndpoint,GetHtmlHeadIncludes,"* insert an item into the notice list. + * + * @param int $iArticleId - if you pass null, it will attempt to fetch the item id from post + * @param int $iAmount - amount to add + * @param string $sMessageHandler - info passed to this handler - uses the default message consumer for the shop if non passed (can also be passed via get/post) + * @param bool $bIsInternalCall + * + * @return void","$aIncludes = parent::GetHtmlHeadIncludes(); + $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgShop/shopBasket')); + $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('common/userInput')); + + return $aIncludes;",- +MTShopBasketCoreEndpoint,GetPostRenderVariables: array,@var $oItem TdbShopArticle,"$variables = parent::GetPostRenderVariables(); + $variables['basketUrl'] = $this->getShopService()->getBasketLink(false); + + return $variables;",- +MTShopBreadcrumbCore,Execute,@var $breadcrumb TCMSPageBreadcrumb,"parent::Execute(); + + $oShop = TdbShop::GetInstance(); + $oActiveCategory = $oShop->GetActiveCategory(); + $oActiveItem = $oShop->GetActiveItem(); + + // if we have an active category... generate path there + if (!is_null($oActiveCategory) || !is_null($oActiveItem)) { + // we want to use the normal breadcrum view... so we need to generate a breadcrumb class that can simulate the required methos (getlink, gettarget and getname) + $breadcrumb = new TCMSPageBreadcrumb(); + /** @var $breadcrumb TCMSPageBreadcrumb */ + $aList = array(); + + if (!is_null($oActiveCategory)) { + $aCatPath = TdbShop::GetActiveCategoryPath(); + foreach (array_keys($aCatPath) as $iCatId) { + $oItem = new TShopBreadcrumbItemCategory(); + /** @var $oItem TShopBreadcrumbItemCategory */ + $oItem->oItem = $aCatPath[$iCatId]; + $aList[] = $oItem;",- +MTShopBreadcrumbCore,_GetCacheParameters,@var $oItem TShopBreadcrumbItemCategory,"$aParameters = parent::_GetCacheParameters(); + + $oShop = TdbShop::GetInstance(); + $oActiveCategory = $oShop->GetActiveCategory(); + $oActiveItem = $oShop->GetActiveItem(); + if (!is_null($oActiveCategory)) { + $aParameters['iactivecategoryid'] = $oActiveCategory->id;",- +MTShopBreadcrumbCore,_GetCacheTableInfos,@var $oItem TShopBreadcrumbItemArticle,"$aTables = parent::_GetCacheTableInfos(); + + $oShop = TdbShop::GetInstance(); + $oActiveCategory = $oShop->GetActiveCategory(); + $oActiveItem = $oShop->GetActiveItem(); + if (!is_null($oActiveCategory)) { + $aTables[] = array('table' => 'shop_category', 'id' => '');",- +MTShopCentralHandlerCoreEndPoint,Init,"* exposes methods that should be callable from all shop modules (via ajax or via get/post) + * IMPORTANT: do not extend this class. instead extend from MTShopCentralHandlerCore. +/*","parent::Init(); + $this->aUserData = $this->global->GetUserData(self::URL_DATA); + if (!is_array($this->aUserData)) { + $this->aUserData = array();",- +MTShopCentralHandlerCoreEndPoint,_AllowCache,* @var string|null,return true;,- +MTShopCentralHandlerCoreEndPoint,GetHtmlHeadIncludes,* @var array,"$aIncludes = parent::GetHtmlHeadIncludes(); + $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgShop/shopBasket')); + + return $aIncludes;",- +MTShopInfoCore,Execute,"* module displays the contents of shop_system_info for one or more shop info items. +/*","parent::Execute(); + + $this->data['oConf'] = $this->GetModuleConfig(); + $this->data['oInfos'] = $this->data['oConf']->GetFieldShopSystemInfoList('name'); + + return $this->data;",- +MTShopInfoCore,_AllowCache,"* the config data for the module instance. + * + * @var TdbShopSystemInfoModuleConfig",return true;,- +MTShopInfoCore,_GetCacheParameters,"* return config record for modul instance. + * + * @return TdbShopSystemInfoModuleConfig|null","$parameters = parent::_GetCacheParameters(); + $parameters['instanceID'] = $this->instanceID; + + return $parameters;",- +MTShopInfoCore,_GetCacheTableInfos,"* prevent caching if there are messages. + * + * @return bool","$aClearCacheInfo = parent::_GetCacheTableInfos(); + $oConf = $this->GetModuleConfig(); + if (!is_null($oConf)) { + $aClearCacheInfo[] = array('table' => $oConf->table, 'id' => $oConf->id); + $aIDList = $oConf->GetMLTIdList('shop_system_info'); + foreach ($aIDList as $infoPageId) { + $aClearCacheInfo[] = array('table' => 'shop_system_info', 'id' => $infoPageId);",- +MTShopManufacturerArticleCatalogCore,Init,* module is used to show the products for one manufacturer.,"parent::Init(); + + if ($this->global->UserDataExists(self::URL_MANUFACTURER_ID)) { + $this->iActiveManufacturerId = $this->global->GetUserData(self::URL_MANUFACTURER_ID);",- +MTShopManufacturerArticleCatalogCore,Execute,* @var string|null,"parent::Execute(); + $this->LoadManufacturer(); + $this->data['oManufacturer'] = $this->oActiveManufacturer; + + if (is_null($this->oActiveManufacturer)) { + $this->ManufacturerNotFoundHook();",- +MTShopManufacturerArticleCatalogCore,_GetCacheParameters,"* current active manufacturer. + * + * @var TdbShopManufacturer|null","$parameters = parent::_GetCacheParameters(); + $parameters['iActiveManufacturerId'] = $this->iActiveManufacturerId; + + return $parameters;",- +MTShopManufacturerArticleCatalogCore,GetHtmlHeadIncludes,"* load manufacturer and related data. + * + * @return void","$aIncludes = parent::GetHtmlHeadIncludes(); + if (!is_array($aIncludes)) { + $aIncludes = array();",- +MTShopManufacturerCore,Init,"* id of manufacturer. + * + * @var string|null","parent::Init(); + $oGlobal = TGlobal::instance(); + $this->iActiveItemId = $oGlobal->GetUserData(self::URL_ITEM_ID_NAME); + if (empty($this->iActiveItemId)) { + $this->iActiveItemId = null;",- +MTShopManufacturerCore,Execute,@var $oConfig TdbShopManufacturerModuleConf,"parent::Execute(); + + $this->data['oManufacturerList'] = TdbShopManufacturerList::GetList(); + + $oConfig = TdbShopManufacturerModuleConf::GetNewInstance(); + /** @var $oConfig TdbShopManufacturerModuleConf */ + if (!$oConfig->LoadFromField('cms_tpl_module_instance_id', $this->instanceID)) { + $oConfig = null;",- +MTShopManufacturerCore,GenerateModuleNavigation,* @return void,"$aItems = array(); + $oManufacturerList = TdbShopManufacturerList::GetList(); + $oManufacturerList->GoToStart(); + $iActiveItem = 0; + $iNumItems = $oManufacturerList->Length(); + //firstNode, lastNode, active + while ($oManufacturer = $oManufacturerList->Next()) { + ++$iActiveItem; + $aClass = array(); + if (1 == $iActiveItem) { + $aClass[] = 'firstNode';",- +MTShopManufacturerCore,_AllowCache,@var $oItem TdbShopManufacturer,return true;,- +MTShopManufacturerCore,_GetCacheParameters,"* if this function returns true, then the result of the execute function will be cached. + * + * @return bool","$parameters = parent::_GetCacheParameters(); + $parameters['iActiveItemId'] = $this->iActiveItemId; + + return $parameters;",- +MTShopManufacturerCore,_GetCacheTableInfos,"* return an assoc array of parameters that describe the state of the module. + * + * @return array","$aCacheParams = parent::_GetCacheTableInfos(); + if (!is_array($aCacheParams)) { + $aCacheParams = array();",- +could,Init,"* the order wizard coordinates the different steps a user needs to complete to execute an order. + * Note: The class could have extended from MTWizardCore, however the shop ordering process + * was deemed so imported, that a new class was conceived to prevent changes in MTWizardCore from + * leaking into the process.","parent::Init(); + + // load current step + $sStepName = $this->global->GetUserData(self::URL_PARAM_STEP_SYSTEM_NAME); + + if (TdbShopOrderStep::OrderProcessHasBeenMarkedAsCompleted() && 'thankyou' != $sStepName) { + // the order has been successfully executed... we redirect to the thank you page + // this only happens, if the user multi-klicks the send order button. + TTools::WriteLogEntry(""User multi-clicked on order confirm button. auto redirecting from step [{$sStepName",- +could,Execute,* @var TdbShopOrderStep,"parent::Execute(); + $this->data['oActiveOrderStep'] = $this->oActiveOrderStep; + + $this->data['oSteps'] = TdbShopOrderStepList::GetNavigationStepList($this->oActiveOrderStep); + $this->data['sBasketRequestURL'] = self::GetCallingURL(); + + return $this->data;",- +could,ExecuteStep,"* return the url to the page that requested the order step. + * + * @return string","if (is_null($this->oActiveOrderStep)) { + return false;",- +could,GetHtmlHeadIncludes,"* save the url in the session so we can use it later to return to the calling page. + * + * @param string $sURL + * + * @return void","$aIncludes = parent::GetHtmlHeadIncludes(); + if (!is_array($aIncludes)) { + $aIncludes = array();",- +could,GetHtmlFooterIncludes,"* run a method on the step. default is ExecuteStep, but can be overwritten + * by passing the parameter $sStepMethod (if null is passed, the method will try to fetch + * the value from get/post from self::URL_PARAM_STEP_METHOD = xx. + * + * @param string|null $sStepMethod - method to execute. defaults to ExecuteStep + * + * @return false|null","$aIncludes = parent::GetHtmlFooterIncludes(); + if (!is_array($aIncludes)) { + $aIncludes = array();",- +could,_AllowCache,"* define any head includes the step needs. + * + * @return string[]",return false;,- +MTShopPageMetaCore,_GetTitle,@var $oItem TShopBreadcrumbItemArticle,"// alter the path if we have an active category or an active item + $sTitle = ''; + + //default SEO pattern of the page + $sTitle = $this->GetSeoPatternString(); + + if (strlen($sTitle) < 1) { + $oShop = TdbShop::GetInstance(); + $oActiveCategory = $oShop->GetActiveCategory(); + $oActiveItem = $oShop->GetActiveItem(); + + if (is_null($oActiveCategory) && is_null($oActiveItem)) { + $sTitle = parent::_GetTitle();",- +MTShopPageMetaCore,_GetCacheParameters,@var $oItem TShopBreadcrumbItemCategory,"$aParameters = parent::_GetCacheParameters(); + + $oShop = TdbShop::GetInstance(); + $oActiveCategory = $oShop->GetActiveCategory(); + $oActiveItem = $oShop->GetActiveItem(); + + if (!is_null($oActiveCategory)) { + $aParameters['activecategoryid'] = $oActiveCategory->id;",- +MTShopPageMetaCore,_GetCacheTableInfos,@var $oItem TShopBreadcrumbItemCategory,"$tableInfo = parent::_GetCacheTableInfos(); + + $iarticle = ''; + $oShop = TdbShop::GetInstance(); + $oActiveItem = $oShop->GetActiveItem(); + if (!is_null($oActiveItem)) { + $iarticle = $oActiveItem->id;",- +MTShopSearchFormCore,Execute,"* module used to render search forms. +/*","parent::Execute(); + + try { + $this->data['sSearchURL'] = $this->getSystemPageService()->getLinkToSystemPageRelative('search'); + $this->data['q'] = $this->global->GetUserData('q'); + $this->data['quicksearchUrl'] = $this->getRouter()->generateWithPrefixes('chameleon_system_shop.search_suggest');",- +MTShopSearchFormCore,_AllowCache,* {@inheritdoc},return false === $this->global->UserDataExists('q');,- +MTShopSearchFormCore,GetHtmlHeadIncludes,"* prevent caching if there are messages. + * + * @return bool","$aIncludes = parent::GetHtmlHeadIncludes(); + $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgShop/MTShopSearchForm')); + + return $aIncludes;",- +MTShopSearchTagsCore,Execute,"* module shows a tag cloud. +/*","parent::Execute(); + + $this->data['oCloud'] = $this->GetSearchKeywordCloud(); + + return $this->data;",- +MTShopViewMyOrderDetails,Init,* @var string,"parent::Init(); + + $this->orderIdRequested = $this->getInputFilterUtil()->getFilteredInput('id', null);",- +MTShopViewMyOrderDetails,myOrderDetailHandlerFactory,* @return IPkgShopViewMyOrderDetails,"return new TPkgShopViewMyOrderDetails($this->getDbAdapter(), $this->getSessionAdapter());",- +MTShopViewMyOrderDetails,GetRequirements,* {@inheritdoc},"parent::GetRequirements($oRequirements); + + $oRequirements->NeedsSourceObject( + 'viewOrderDetailHandler', + 'IPkgShopViewMyOrderDetails', + $this->myOrderDetailHandlerFactory() + ); + $oRequirements->NeedsSourceObject('orderIdRequested', 'string', $this->getInputFilterUtil()->getFilteredInput('id', null), true); + + $oRequirements->NeedsSourceObject('extranetUserId', 'string', TdbDataExtranetUser::GetInstance()->id, true);",- +MTShopViewMyOrderDetails,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",@var $viewOrderDetailHandler IPkgShopViewMyOrderDetails,"/** @var $viewOrderDetailHandler IPkgShopViewMyOrderDetails */ + $viewOrderDetailHandler = $oVisitor->GetSourceObject('viewOrderDetailHandler'); + $orderIdRequested = $oVisitor->GetSourceObject('orderIdRequested'); + $extranetUserId = $oVisitor->GetSourceObject('extranetUserId'); + + $order = $this->getDbAdapter()->getOrder($orderIdRequested); + + $viewData = array( + 'error' => false, + 'errorCode' => null, + 'notMyOrderError' => false, + 'orderNotFoundError' => false, + 'order' => $order, + ); + + if (null === $order) { + $viewData['error'] = true; + $viewData['errorCode'] = 'orderNotFoundError';",- +MTShopViewMyOrderDetailsOrderObjectAsStringMapper,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('order', 'TdbShopOrder', null, true); + $oRequirements->NeedsSourceObject('view', 'string', 'print');",- +MTShopViewMyOrderDetailsOrderObjectAsStringMapper,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",* {@inheritdoc},"/** @var $order TdbShopOrder */ + $order = $oVisitor->GetSourceObject('order'); + if (null === $order) { + return;",- +TPkgShopViewMyOrderDetails,"__construct( + IPkgShopViewMyOrderDetailsDbAdapter $dbAdapter, + IPkgShopViewMyOrderDetailsSessionAdapter $sessionAdapter + )",* @var IPkgShopViewMyOrderDetailsDbAdapter,"$this->dbAdapter = $dbAdapter; + $this->sessionAdapter = $sessionAdapter;",- +TPkgShopViewMyOrderDetails,addOrderIdToMyList,* @var IPkgShopViewMyOrderDetailsSessionAdapter,"if (null === $userId) { + $this->sessionAdapter->addOrderId($orderId);",- +TPkgShopViewMyOrderDetailsDbAdapter,__construct,* @var Doctrine\DBAL\Connection,$this->dbConnection = $dbConnection;,- +TPkgShopViewMyOrderDetailsDbAdapter,hasOrder,* {@inheritdoc},"$query = 'select COUNT(id) AS matches FROM shop_order WHERE id = :orderId AND data_extranet_user_id = :userId'; + + $row = $this->dbConnection->fetchNumeric($query, array('orderId' => $orderId, 'userId' => $userId)); + + return intval($row[0]) >= 1;",- +TPkgShopViewMyOrderDetailsDbAdapter,getOrder,* {@inheritdoc},"$order = TdbShopOrder::GetNewInstance(); + if (false === $order->Load($orderId)) { + return null;",- +TPkgShopViewMyOrderDetailsSessionAdapter,__construct,* @var Symfony\Component\HttpFoundation\Session\SessionInterface,$this->session = $session;,- +TPkgShopViewMyOrderDetailsSessionAdapter,addOrderId,"* @param string $orderId + * + * @return bool","$orderIdList = $this->session->get(self::SESSIONNAME, array()); + $orderIdList[] = $orderId; + $this->session->set(self::SESSIONNAME, $orderIdList);",- +OrderPaymentInfo,__construct,* @var string,"$this->orderId = $orderId; + $this->paymentHandlerId = $paymentHandlerId; + $this->portalId = $portalId;",- +OrderPaymentInfo,getOrderId,* @var string,return $this->orderId;,- +OrderPaymentInfo,getPaymentHandlerId,* @var string,return $this->paymentHandlerId;,- +OrderPaymentInfo,getPortalId,"* @param string $orderId + * @param string $paymentHandlerId + * @param string $portalId",return $this->portalId;,- +ShopPaymentConfigLoader,"__construct( + ShopPaymentConfigLoaderDataAccessInterface $shopPaymentConfigLoaderDataAccess, + $defaultEnvironment + )","* ShopPaymentConfigLoader loads the configuration for payment handlers. + * See the payment section in this bundle's documentation on how the configuration loading process works.","$this->shopPaymentConfigLoaderDataAccess = $shopPaymentConfigLoaderDataAccess; + $this->defaultEnvironment = $defaultEnvironment; + $this->configProviderList = array();",- +ShopPaymentConfigLoader,loadFromOrderId,* @var ShopPaymentConfigLoaderDataAccessInterface,"try { + $orderPaymentInfo = $this->shopPaymentConfigLoaderDataAccess->getDataFromOrderId( + $orderId + ); + + return $this->loadFromPaymentHandlerId( + $orderPaymentInfo->getPaymentHandlerId(), + $orderPaymentInfo->getPortalId() + );",- +ShopPaymentConfigLoader,loadFromPaymentHandlerId,* @var string,"try { + $paymentHandlerGroupId = $this->shopPaymentConfigLoaderDataAccess->getPaymentHandlerGroupIdFromPaymentHandlerId( + $paymentHandlerId + ); + + return $this->loadConfiguration($portalId, $paymentHandlerGroupId, $paymentHandlerId);",- +ShopPaymentConfigLoader,loadFromPaymentHandlerGroupId,* @var ShopPaymentConfigProviderInterface[],"return $this->loadConfiguration($portalId, $paymentHandlerGroupId, null);",- +ShopPaymentConfigLoader,loadFromPaymentHandlerGroupSystemName,"* @param ShopPaymentConfigLoaderDataAccessInterface $shopPaymentConfigLoaderDataAccess + * @param string $defaultEnvironment One of IPkgShopOrderPaymentConfig::ENVIRONMENT_*","try { + $paymentHandlerGroupId = $this->shopPaymentConfigLoaderDataAccess->getPaymentHandlerGroupIdFromSystemName( + $systemName + ); + + return $this->loadConfiguration($portalId, $paymentHandlerGroupId, null);",- +ShopPaymentConfigLoader,addConfigProvider,* {@inheritdoc},$this->configProviderList[$alias] = $shopPaymentConfigProvider;,- +ShopPaymentConfigLoaderDatabaseAccess,__construct,* @var Connection,$this->databaseConnection = $databaseConnection;,- +ShopPaymentConfigLoaderDatabaseAccess,getDataFromOrderId,* {@inheritdoc},"$order = TdbShopOrder::GetNewInstance(); + if (!$order->Load($orderId)) { + throw new DataAccessException('Error while loading order with ID '.$orderId);",- +ShopPaymentConfigLoaderDatabaseAccess,getPaymentHandlerGroupIdFromPaymentHandlerId,* {@inheritdoc},"$handler = TdbShopPaymentHandler::GetNewInstance(); + if (!$handler->Load($paymentHandlerId)) { + throw new DataAccessException('Error while loading payment handler with ID '.$paymentHandlerId);",- +ShopPaymentConfigLoaderDatabaseAccess,getPaymentHandlerGroupIdFromSystemName,* {@inheritdoc},"$handlerGroup = TdbShopPaymentHandlerGroup::GetNewInstance(); + if (!$handlerGroup->LoadFromField('system_name', $systemName)) { + throw new DataAccessException('Error while loading payment handler group ID for systemName '.$systemName);",- +ShopPaymentConfigLoaderDatabaseAccess,getPaymentHandlerGroupSystemNameFromId,* {@inheritdoc},"$handlerGroup = TdbShopPaymentHandlerGroup::GetNewInstance(); + if (!$handlerGroup->Load($paymentHandlerGroupId)) { + throw new DataAccessException( + 'Error while loading payment handler group systemName for ID '.$paymentHandlerGroupId + );",- +ShopPaymentConfigLoaderDatabaseAccess,getEnvironment,* {@inheritdoc},"$paymentHandlerGroup = TdbShopPaymentHandlerGroup::GetNewInstance(); + if (!$paymentHandlerGroup->Load($paymentHandlerGroupId)) { + throw new DataAccessException( + 'Error while loading environment for payment handler group with ID '.$paymentHandlerGroupId + );",- +ShopPaymentConfigLoaderDatabaseAccess,loadPaymentHandlerGroupConfig,* {@inheritdoc},"$query = 'SELECT `shop_payment_handler_group_config`.`name`, `shop_payment_handler_group_config`.`value`, `shop_payment_handler_group_config`.`type`, `shop_payment_handler_group_config`.`cms_portal_id` + FROM `shop_payment_handler_group_config` + WHERE `shop_payment_handler_group_config`.`shop_payment_handler_group_id` = :shopPaymentHandlerGroupId'; + try { + $configDataRaw = $this->databaseConnection->fetchAllAssociative( + $query, + array('shopPaymentHandlerGroupId' => $shopPaymentHandlerGroupId) + );",- +ShopPaymentConfigLoaderDatabaseAccess,loadPaymentHandlerConfig,* {@inheritdoc},"$query = 'SELECT `shop_payment_handler_parameter`.`systemname`, `shop_payment_handler_parameter`.`value`, `shop_payment_handler_parameter`.`type`, `shop_payment_handler_parameter`.`cms_portal_id` + FROM `shop_payment_handler_parameter` + WHERE `shop_payment_handler_parameter`.`shop_payment_handler_id` = :shopPaymentHandlerId'; + try { + $configDataRaw = $this->databaseConnection->fetchAllAssociative( + $query, + array('shopPaymentHandlerId' => $shopPaymentHandlerId) + );",- +ShopPaymentConfigLoaderRequestLevelCacheDecorator,__construct,* @var ShopPaymentConfigLoaderInterface,$this->subject = $subject;,- +ShopPaymentConfigLoaderRequestLevelCacheDecorator,loadFromOrderId,* @var array,"// Do not cache, because we can't generate an efficient cache key here. + return $this->subject->loadFromOrderId($orderId);",- +ShopPaymentConfigLoaderRequestLevelCacheDecorator,loadFromPaymentHandlerId,* @param ShopPaymentConfigLoaderInterface $subject,"$cacheKey = ""loadFromPaymentHandlerId-$paymentHandlerId-$portalId""; + if (false === isset($this->cache[$cacheKey])) { + $this->cache[$cacheKey] = $this->subject->loadFromPaymentHandlerId($paymentHandlerId, $portalId);",- +ShopPaymentConfigLoaderRequestLevelCacheDecorator,loadFromPaymentHandlerGroupId,* {@inheritdoc},"$cacheKey = ""loadFromPaymentHandlerGroupId-$paymentGroupId-$portalId""; + if (false === isset($this->cache[$cacheKey])) { + $this->cache[$cacheKey] = $this->subject->loadFromPaymentHandlerGroupId($paymentGroupId, $portalId);",- +ShopPaymentConfigLoaderRequestLevelCacheDecorator,loadFromPaymentHandlerGroupSystemName,* {@inheritdoc},"$cacheKey = ""loadFromPaymentHandlerGroupSystemName-$systemName-$portalId""; + if (false === isset($this->cache[$cacheKey])) { + $this->cache[$cacheKey] = $this->subject->loadFromPaymentHandlerGroupSystemName($systemName, $portalId);",- +ShopPaymentConfigRawValue,__construct,"* ShopPaymentConfigRawValue describes a configuration parameter that has been read from a data source, but is + * not computed yet.","$this->name = $name; + $this->value = $value; + $this->environment = $environment; + $this->portalId = $portalId; + $this->source = $source;",- +ShopPaymentConfigRawValue,getName,@var string,return $this->name;,- +ShopPaymentConfigRawValue,getValue,@var string,return $this->value;,- +ShopPaymentConfigRawValue,getEnvironment,@var string,return $this->environment;,- +ShopPaymentConfigRawValue,getPortalId,@var string,return $this->portalId;,- +ShopPaymentConfigRawValue,getSource,"* @var int + * @psalm-var self::SOURCE_*",return $this->source;,- +ShopPaymentHandlerDataAccessRequestLevelCacheDecorator,__construct,* @var ShopPaymentHandlerDataAccessInterface,$this->subject = $subject;,- +ShopPaymentHandlerDataAccessRequestLevelCacheDecorator,getBarePaymentHandler,* @var array,"$cacheKey = $paymentHandlerId; + if (false === isset($this->cache[$cacheKey])) { + $paymentHandler = $this->subject->getBarePaymentHandler($paymentHandlerId, $languageId); + if (null === $paymentHandler) { + return null;",- +ShopPaymentHandlerDatabaseAccess,getBarePaymentHandler,* {@inheritdoc},"$paymentHandler = TdbShopPaymentHandler::GetInstance($paymentHandlerId); + if (null === $paymentHandler || false === $paymentHandler->sqlData) { + return null;",- +ShopPaymentHandlerFactory,__construct,* @var ShopPaymentConfigLoaderInterface,"$this->shopPaymentConfigLoader = $shopPaymentConfigLoader; + $this->shopPaymentHandlerDataAccess = $shopPaymentHandlerDataAccess;",- +ShopPaymentHandlerFactory,createPaymentHandler,* @var ShopPaymentHandlerDataAccessInterface,"$paymentHandler = $this->shopPaymentHandlerDataAccess->getBarePaymentHandler($paymentHandlerId); + $configData = $this->shopPaymentConfigLoader->loadFromPaymentHandlerId($paymentHandlerId, $portalId); + $paymentHandler->setConfigData($configData); + $paymentHandler->SetPaymentUserData($userParameterList); + + return $paymentHandler;",- +TShopDataExtranetCore,GetLinkLogout,"* returns link to current page with logout method as parameter for given spotname of extranet module if not on ""thank you"" page of order process + * otherwise it would return link to home page with logout method as parameter for given spotname. + * + * @param string $sSpotName + * + * @return string","$oGlobal = TGlobal::instance(); + // if we are on the last page of checkout process we can't use the active page url for logout + // so we redirect to the home url with logout method as parameter + if ($oGlobal->UserDataExists(MTShopOrderWizardCore::URL_PARAM_STEP_SYSTEM_NAME) && 'thankyou' == $oGlobal->GetUserData(MTShopOrderWizardCore::URL_PARAM_STEP_SYSTEM_NAME)) { + return self::getPageService()->getLinkToPortalHomePageAbsolute().'?'.TTools::GetArrayAsURL(array('module_fnc['.$sSpotName.']' => 'Logout'));",- +TShopDataExtranetUser,__sleep,"* shop specific extranet user extensions. +/*","$aData = parent::__sleep(); + $aData[] = 'aArticleViewHistory'; + $aData[] = 'aNoticeList'; + + return $aData;",- +TShopDataExtranetUser,GetCustomerNumber,"* the article ids last viewed by the user (ie. on the detail page) will be stored here + * Note: the although the list may grow longer (the complete history will be saved for logged in users) + * we will only keep the first 100 in this list. + * + * @var array","$sCustNr = parent::GetCustomerNumber(); + if (empty($sCustNr)) { + $oShop = TdbShop::GetInstance(); + $sCustNr = $oShop->GetNextFreeCustomerNumber(); + $aData = $this->sqlData; + $aData['customer_number'] = $sCustNr; + $this->LoadFromRow($aData);",- +TShopDataExtranetUser,GetUserAlias,"* the notice list (merkzettel) of the user. Note: this list is stored in session and for logged in users + * in the database. + * + * @var array","$sAlias = trim($this->fieldAliasName); + if (empty($sAlias)) { + $sAlias = $this->fieldFirstname.' '.mb_substr($this->fieldLastname, 0, 1).'.';",- +TShopDataExtranetUser,GetReviewsPublished,* we use the post insert hook to set the customer number.,"return TdbShopArticleReviewList::GetPublishedReviewsForUser($this->id, $this->iLanguageId);",- +TShopDataExtranetUser,AddArticleIdToViewHistory,* @return void,"if (is_null($this->aArticleViewHistory)) { + $this->GetArticleViewHistory();",- +TShopDataExtranetUser,GetArticleViewHistory,"* returns the users customer number, if set. + * + * @return int","if (is_null($this->aArticleViewHistory)) { + $this->aArticleViewHistory = array(); + $iMaxQueueLength = 100; + $shop = $this->getShopService()->getActiveShop(); + if ($shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCount < $iMaxQueueLength && $shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCount > 0) { + $iMaxQueueLength = $shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCount;",- +TShopDataExtranetUser,GetNoticeListArticles,* save view history to user data...,"if (is_null($this->aNoticeList)) { + $this->aNoticeList = array(); + $iMaxQueueLength = 1000; + + if ($this->IsLoggedIn()) { + // fetch from user + $iNumRecsAdded = 0; + $oNoticeList = $this->GetFieldShopUserNoticeListList(); + while (($oNoticeListItem = $oNoticeList->Next()) && $iNumRecsAdded <= $iMaxQueueLength) { + if (!empty($oNoticeListItem->fieldShopArticleId)) { + $this->aNoticeList[$oNoticeListItem->fieldShopArticleId] = $oNoticeListItem->sqlData;",- +TShopDataExtranetUser,AddArticleIdToNoticeList,"* takes the article view history from session and merges it with the data + * in the database. this is done when the user logs in to make the history permanent. + * + * @return void","$dNewAmountOnList = 0; + + if (is_null($this->aNoticeList)) { + $this->GetNoticeListArticles();",- +TShopDataExtranetUser,RemoveArticleFromNoticeList,"* takes the notice list from session and merges it with the data + * in the database. this is done when the user logs in to make the notice list permanent. + * + * @return void","$this->GetNoticeListArticles(); + if (array_key_exists($sArticleId, $this->aNoticeList)) { + unset($this->aNoticeList[$sArticleId]); + if ($this->IsLoggedIn()) { + $noticeListItemObject = TdbShopUserNoticeList::GetNewInstance(); + if (true === $noticeListItemObject->LoadFromFields( + array( + 'data_extranet_user_id' => $this->id, + 'shop_article_id' => $sArticleId, + ) + )) { + $noticeListItemObject->Delete();",- +TShopDataExtranetUser,ValidateData,@var $oItem TdbShopUserNoticeList,"if (is_null($sFormDataName)) { + $sFormDataName = TdbDataExtranetUser::MSG_FORM_FIELD;",- +TShopDataExtranetUser,GetTotalOrderValue,"* return alias for the user. + * + * @return string","$query = ""SELECT SUM(value_total) AS ordervalue + FROM `shop_order` + WHERE `data_extranet_user_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' + AND (`shop_order`.`id` IS NULL OR `shop_order`.`canceled` = '0') + ""; + if (!is_null($sStartDate)) { + $query .= "" AND `datecreated` >= '"".MySqlLegacySupport::getInstance()->real_escape_string($sStartDate).""' "";",- +TShopDataExtranetUser,Logout,"* get all reviews that have been published. + * + * @return TdbShopArticleReviewList","$oBasket = TShopBasket::GetInstance(); + if (is_array($oBasket->aCompletedOrderStepList)) { + reset($oBasket->aCompletedOrderStepList); + foreach ($oBasket->aCompletedOrderStepList as $sStepName => $bValue) { + $oBasket->aCompletedOrderStepList[$sStepName] = false;",- +TShopDataExtranetUser,UpdateShippingAddress,"* add an article to the view history. + * + * @param int $iArticleId + * + * @return void","$oOldAddress = clone $this->GetShippingAddress(); + $oOldBillingAddress = clone $this->GetBillingAddress(); + $bUpdated = parent::UpdateShippingAddress($aAddressData); + + $oNewAddress = $this->GetShippingAddress(); + if (false === $oNewAddress->hasSameDataInSqlData($oOldAddress)) { + $this->hookChangedShippingAddress($oOldAddress, $oNewAddress);",- +TShopDataExtranetUser,SetAddressAsShippingAddress,"* returns the ids of up to the last 100 articles viewed. + * + * @return array","$oOldShippingAddress = clone $this->GetShippingAddress(); + $oOldBillingAddress = clone $this->GetBillingAddress(); + + $oNewShippingAddress = parent::SetAddressAsShippingAddress($sAddressId); + + if (false === $oNewShippingAddress->hasSameDataInSqlData($oOldShippingAddress)) { + $this->hookChangedShippingAddress($oOldShippingAddress, $oNewShippingAddress);",- +TShopDataExtranetUser,ShipToAddressOtherThanBillingAddress,"* returns the of the articles on the notice list. note: we limit the notice list to 1000 items. + * + * @return array","$oOldAddress = clone $this->GetShippingAddress(); + $oOldBillingAddress = clone $this->GetBillingAddress(); + + $bUpdated = parent::ShipToAddressOtherThanBillingAddress(); + $oNewAddress = $this->GetShippingAddress(); + if (false === $oNewAddress->hasSameDataInSqlData($oOldAddress)) { + $this->hookChangedShippingAddress($oOldAddress, $oNewAddress);",- +TShopDataExtranetUser,ShipToBillingAddress,"* add an article to the notice list. + * + * @param int $iArticleId + * @param float $iAmount + * + * @return float|false - new amount on list","$oOldAddress = clone $this->GetShippingAddress(); + $oOldBillingAddress = clone $this->GetBillingAddress(); + $bUpdated = parent::ShipToBillingAddress($bSetShippingToBillingAddress); + + $oNewAddress = $this->GetShippingAddress(); + if (false === $oNewAddress->hasSameDataInSqlData($oOldAddress)) { + $this->hookChangedShippingAddress($oOldAddress, $oNewAddress);",- +TShopDataExtranetUser,SetAddressAsBillingAddress,@var $oNoticeListItem TdbShopUserNoticeList,"$oOldShippingAddress = clone $this->GetShippingAddress(); + $oOldBillingAddress = clone $this->GetBillingAddress(); + $oNewBillingAddress = parent::SetAddressAsBillingAddress($sAddressId); + + $oNewShippingAddress = $this->GetShippingAddress(); + if (false === $oNewShippingAddress->hasSameDataInSqlData($oOldShippingAddress)) { + $this->hookChangedShippingAddress($oOldShippingAddress, $oNewShippingAddress);",- +TShopDataExtranetUser,UpdateBillingAddress,"* save user notice list to cookie. + * + * @return void","$oOldShippingAddress = clone $this->GetShippingAddress(); + $oOldBillingAddress = clone $this->GetBillingAddress(); + + $bUpdated = parent::UpdateBillingAddress($aAddressData); + $oNewShippingAddress = $this->GetShippingAddress(); + if (false === $oNewShippingAddress->hasSameDataInSqlData($oOldShippingAddress)) { + $this->hookChangedShippingAddress($oOldShippingAddress, $oNewShippingAddress);",- +MTShopMyAccountCore,Execute,* @return void,"parent::Execute(); + + $activePage = $this->getActivePageService()->getActivePage(); + $aSignup = array('module_fnc' => array($this->sModuleSpotName => 'NewsletterSubscribe')); + $this->data['sNewsSignupLink'] = $activePage->GetRealURLPlain($aSignup); + + $aSignout = array('module_fnc' => array($this->sModuleSpotName => 'NewsletterUnsubscribe')); + $this->data['sNewsSignoutLink'] = $activePage->GetRealURLPlain($aSignout); + + return $this->data;",- +MTShopMyAccountCore,NewsletterSubscribe,"* There are different ways of opting in into the newsletter table: + * - Subscribe on Website + * - Subscribe on MyAccount page + * - Subscribe while ordering + * This information is now put into the optincode field.","// subscribe shop user to newsletter + $oUser = TdbDataExtranetUser::GetInstance(); + + $oNewsletter = TdbPkgNewsletterUser::GetInstanceForActiveUser(); + if (is_null($oNewsletter)) { + $oNewsletter = TdbPkgNewsletterUser::GetNewInstance(); + $aData = array(); + $sNow = date('Y-m-d H:i:s'); + $aData['email'] = $oUser->GetUserEMail(); + $aData['data_extranet_salutation_id'] = $oUser->fieldDataExtranetSalutationId; + $aData['lastname'] = $oUser->fieldLastname; + $aData['firstname'] = $oUser->fieldFirstname; + $aData['signup_date'] = $sNow; + /** + * There are different ways of opting in into the newsletter table: + * - Subscribe on Website + * - Subscribe on MyAccount page + * - Subscribe while ordering + * This information is now put into the optincode field. + */ + $aData['optincode'] = 'MyAccount'; + $aData['data_extranet_user_id'] = $oUser->id; + $aData['cms_portal_id'] = $oUser->fieldCmsPortalId; + $oNewsletter->LoadFromRow($aData); + $oNewsletter->ConfirmSignup(); + $oNewsletter->Save(); + $oNewsletter->PostSignUpNewsletterUserOnly(); + TdbPkgNewsletterUser::GetInstanceForActiveUser(true); + + $oMsgManager = TCMSMessageManager::GetInstance(); + $oMsgManager->AddMessage(self::MSG_BASE_NAME.'-newsletter', 'NEWSLETTER-USER-SUBSCRIBED');",- +MTShopMyAccountCore,NewsletterUnsubscribe,* @return void,"$oNewsletter = TdbPkgNewsletterUser::GetInstanceForActiveUser(); + if (!is_null($oNewsletter)) { + $oNewsletter->SignOut(); + TdbPkgNewsletterUser::GetInstanceForActiveUser(true); + $oMsgManager = TCMSMessageManager::GetInstance(); + $oMsgManager->AddMessage(self::MSG_BASE_NAME.'-newsletter', 'NEWSLETTER-USER-UNSUBSCRIBED');",- +MTShopMyAccountCore,GetHtmlHeadIncludes,* @return never,"$aIncludes = parent::GetHtmlHeadIncludes(); + $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgNewsletter')); + + return $aIncludes;",- +MTShopMyAccountCore,_AllowCache,* @return string[],return false;,- +TPkgRunFrontendAction_SendOrderEMail,runAction,"* @param array $aParameter + * + * @return TPkgRunFrontendActionStatus","$oStatus = new TPkgRunFrontendActionStatus(); + if (isset($aParameter['email']) && isset($aParameter['order_id']) && !empty($aParameter['email']) && !empty($aParameter['order_id'])) { + $oOrder = TdbShopOrder::GetNewInstance(); + if ($oOrder->Load($aParameter['order_id'])) { + $bSuccess = $oOrder->SendOrderNotification($aParameter['email']); + if ($bSuccess) { + $oStatus->sMessage = TGlobal::Translate('chameleon_system_shop.orders.msg_order_confirm_sent', array('%mail%' => $aParameter['email'])); + $oStatus->sMessageType = 'MESSAGE';",- +ProductStatistics,setDetailViews,@var int,$this->detailViews = $detailViews;,- +ProductStatistics,getDetailViews,@var int,return (null !== $this->detailViews) ? $this->detailViews : 0;,- +ProductStatistics,setReviewAverage,@var int,$this->reviewAverage = $reviewAverage;,- +ProductStatistics,getReviewAverage,@var int,return (null !== $this->reviewAverage) ? $this->reviewAverage : 0;,- +ProductStatistics,setReviews,"* @param int $detailViews + * + * @return void",$this->reviews = $reviews;,- +ProductStatistics,getReviews,* @return int,return (null !== $this->reviews) ? $this->reviews : 0;,- +ProductStatistics,setSales,"* @param int $reviewAverage + * + * @return void",$this->sales = $sales;,- +ProductStatistics,getSales,* @return int,return (null !== $this->sales) ? $this->sales : 0;,- +ProductVariantNameGenerator,generateName,* {@inheritdoc},"if (false === $product->IsVariant()) { + return null;",- +ProductVariantNameGenerator,generateNamesForAllLanguages,"* @param \TdbShopArticle $product + * @param string $variantNameType + * @param string $languageId + * + * @return string","if (false === $product->IsVariant()) { + return null;",- +PaymentMethodDataAccessRuntimeCacheDecorator,__construct,* @var PaymentMethodDataAccessInterface,$this->subject = $subject;,- +PaymentMethodDataAccessRuntimeCacheDecorator,getShippingCountryIds,* @var array,"$key = sprintf('shippingCountryIds-%s', $paymentMethodId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +PaymentMethodDataAccessRuntimeCacheDecorator,getBillingCountryIds,* @param PaymentMethodDataAccessInterface $subject,"$key = sprintf('billingCountryIds-%s', $paymentMethodId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +PaymentMethodDataAccessRuntimeCacheDecorator,getPermittedUserIds,* {@inheritdoc},"$key = sprintf('permittedUserIds-%s', $paymentMethodId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +PaymentMethodDataAccessRuntimeCacheDecorator,getPermittedUserGroupIds,* {@inheritdoc},"$key = sprintf('permittedUserGroupIds-%s', $paymentMethodId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +PaymentMethodDataAccessRuntimeCacheDecorator,getPermittedArticleIds,* {@inheritdoc},"$key = sprintf('articleIdRestrictions-%s', $paymentMethodId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +PaymentMethodDataAccessRuntimeCacheDecorator,getPermittedCategoryIds,* {@inheritdoc},"$key = sprintf('categoryIdRestrictions-%s', $paymentMethodId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +PaymentMethodDataAccessRuntimeCacheDecorator,getPermittedArticleGroupIds,* {@inheritdoc},"$key = sprintf('articleGroupIdRestrictions-%s', $paymentMethodId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +PaymentMethodDataAccessRuntimeCacheDecorator,getInvalidArticleIds,* {@inheritdoc},"$key = sprintf('invalidArticleIds-%s', $paymentMethodId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +PaymentMethodDataAccessRuntimeCacheDecorator,getInvalidCategoryIds,* {@inheritdoc},"$key = sprintf('invalidCategoryIds-%s', $paymentMethodId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +PaymentMethodDataAccessRuntimeCacheDecorator,getInvalidArticleGroupIds,* {@inheritdoc},"$key = sprintf('invalidArticleGroupIds-%s', $paymentMethodId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +ProductStatisticsServiceRuntimeCacheDecorator,__construct,* @var ProductStatisticsServiceInterface,$this->subject = $subject;,- +ProductStatisticsServiceRuntimeCacheDecorator,getStats,* @var ProductStatisticsInterface[],"if (isset($this->cacheStats[$articleId])) { + return $this->cacheStats[$articleId];",- +ProductStatisticsServiceRuntimeCacheDecorator,add,* @param ProductStatisticsServiceInterface $subject,"$this->subject->add($articleId, $type, $amount); + $this->resetStatsCache($articleId);",- +ProductStatisticsServiceRuntimeCacheDecorator,set,* {@inheritdoc},"$this->subject->set($articleId, $type, $amount); + $this->resetStatsCache($articleId);",- +ProductStatisticsServiceRuntimeCacheDecorator,updateAllBasedOnVariants,* {@inheritdoc},"$this->subject->updateAllBasedOnVariants($parentArticleId); + $this->cacheStats = array();",- +ShopCategoryDataAccessRuntimeCacheDecorator,__construct,* root categories do not have a parent id - so we force a key to use in the parentChildMapping.,$this->subject = $subject;,- +ShopCategoryDataAccessRuntimeCacheDecorator,getAllActive,* @var ShopCategoryDataAccessInterface,"if (null !== $this->categoryCache) { + return $this->categoryCache;",- +ShopCategoryDataAccessRuntimeCacheDecorator,getActiveChildren,* @var array|null,"$childIds = $this->getChildrenIds($categoryId); + $children = array(); + foreach ($childIds as $childId) { + $children[] = $this->getCategory($childId);",- +ShopCategoryDataAccessRuntimeCacheDecorator,getCategory,* @var array|null,"$categoryCache = $this->getAllActive(); + if (isset($categoryCache[$categoryId])) { + return $categoryCache[$categoryId];",- +ShopShippingGroupDataAccessRuntimeCacheDecorator,__construct,* @var ShopShippingGroupDataAccessInterface,$this->subject = $subject;,- +ShopShippingGroupDataAccessRuntimeCacheDecorator,getPermittedUserIds,* @var array,"$key = sprintf('permittedUserIds-%s', $shippingGroupId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +ShopShippingGroupDataAccessRuntimeCacheDecorator,getPermittedUserGroupIds,* @param ShopShippingGroupDataAccessInterface $subject,"$key = sprintf('permittedUserGroupIds-%s', $shippingGroupId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +ShopShippingGroupDataAccessRuntimeCacheDecorator,getPermittedPortalIds,* {@inheritdoc},"$key = sprintf('permittedPortalIds-%s', $shippingGroupId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +ShopShippingTypeDataAccessRuntimeCacheDecorator,__construct,* @var ShopShippingTypeDataAccessInterface,$this->subject = $subject;,- +ShopShippingTypeDataAccessRuntimeCacheDecorator,getPermittedArticleGroupIds,"* @var array","$key = sprintf('permittedArticleGroupIds-%s', $shippingTypeId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +ShopShippingTypeDataAccessRuntimeCacheDecorator,getPermittedArticleIds,* @param ShopShippingTypeDataAccessInterface $subject,"$key = sprintf('permittedArticleIds-%s', $shippingTypeId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +ShopShippingTypeDataAccessRuntimeCacheDecorator,getPermittedCategoryIds,* {@inheritdoc},"$key = sprintf('permittedCategoryIds-%s', $shippingTypeId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +ShopShippingTypeDataAccessRuntimeCacheDecorator,getPermittedPortalIds,* {@inheritdoc},"$key = sprintf('permittedPortalIds-%s', $shippingTypeId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +ShopShippingTypeDataAccessRuntimeCacheDecorator,getPermittedCountryIds,* {@inheritdoc},"$key = sprintf('permittedCountryIds-%s', $shippingTypeId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +ShopShippingTypeDataAccessRuntimeCacheDecorator,getPermittedUserGroupIds,* {@inheritdoc},"$key = sprintf('permittedUserGroupIds-%s', $shippingTypeId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +ShopShippingTypeDataAccessRuntimeCacheDecorator,getPermittedUserIds,* {@inheritdoc},"$key = sprintf('permittedUserIds-%s', $shippingTypeId); + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +ShopShippingTypeDataAccessRuntimeCacheDecorator,getAvailableShippingTypes,* {@inheritdoc},"$parameter = array( + 'iGroupId' => $shippingGroupId, + 'dNumberOfArticles' => $basket->dTotalNumberOfArticles, + 'dWeight' => $basket->dTotalWeight, + 'dBasketVolume' => $basket->dTotalVolume, + 'dBasketValue' => $basket->dCostArticlesTotalAfterDiscounts, + ); + if ('' !== $shippingCountryId) { + $parameter['sActiveShippingCountryId'] = $shippingCountryId;",- +ShopStockMessageDataAccessRuntimeCacheDecorator,__construct,* @var ShopStockMessageDataAccessInterface,$this->subject = $subject;,- +ShopStockMessageDataAccessRuntimeCacheDecorator,getStockMessage,* @var array,"$cache = $this->getAll(); + if (isset($cache[$id])) { + return TdbShopStockMessage::GetNewInstance($cache[$id], $languageId);",- +ShopStockMessageDataAccessRuntimeCacheDecorator,getAll,* @param ShopStockMessageDataAccessInterface $subject,"$key = 'all'; + if (array_key_exists($key, $this->cache)) { + return $this->cache[$key];",- +OrderStepPageService,__construct,* @var PortalAndLanguageAwareRouterInterface,"$this->router = $router; + $this->urlUtil = $urlUtil; + $this->routingUtil = $routingUtil;",- +OrderStepPageService,getLinkToOrderStepPageRelative,* @var UrlUtil,"$orderStep = $this->getOrderStepInCorrectLanguage($orderStep, $language); + $parameters = $this->addBasketStepParameter($parameters, $orderStep); + + return $this->router->generateWithPrefixes($this->getBasketStepRouteName($orderStep), $parameters, $portal, $language, UrlGeneratorInterface::ABSOLUTE_PATH);",- +OrderStepPageService,getLinkToOrderStepPageAbsolute,* @var RoutingUtilInterface,"$orderStep = $this->getOrderStepInCorrectLanguage($orderStep, $language); + $parameters = $this->addBasketStepParameter($parameters, $orderStep); + + $url = $this->router->generateWithPrefixes($this->getBasketStepRouteName($orderStep), $parameters, $portal, $language, UrlGeneratorInterface::ABSOLUTE_URL); + + if (true === $forceSecure) { + $url = $this->getSecureUrlIfNeeded($url, $portal, $language);",- +PaymentInfoService,__construct,* @var Connection,$this->databaseConnection = $databaseConnection;,- +PaymentInfoService,isPaymentMethodActive,* @param Connection $databaseConnection,"$query = 'SELECT COUNT(*) FROM `shop_payment_method`'; + $parameters = array(); + + if (null !== $portal) { + $query .= ""\nLEFT JOIN `shop_payment_method_cms_portal_mlt` ON `shop_payment_method`.`id` = `shop_payment_method_cms_portal_mlt`.`source_id` + WHERE (`shop_payment_method_cms_portal_mlt`.`target_id` = :portalId OR `shop_payment_method_cms_portal_mlt`.`target_id` IS NULL)""; + $query .= ' AND '; + $parameters['portalId'] = $portal->id;",- +ProductInventoryService,getAvailableStock,* @var Connection,"/** @var int[]|false $stock */ + $stock = $this->databaseConnection->fetchNumeric( + 'SELECT `amount` FROM `shop_article_stock` WHERE `shop_article_id` = :id', + array('id' => $shopArticleId) + ); + if (is_array($stock) && isset($stock[0])) { + return (int) $stock[0];",- +ProductInventoryService,addStock,* {@inheritdoc},"$query = 'INSERT INTO `shop_article_stock` + SET `id` = :id, + `amount` = :amount, + `shop_article_id` = :articleId + ON DUPLICATE KEY UPDATE `amount` = `amount` + :amount + '; + $this->databaseConnection->executeQuery( + $query, + array('id' => \TTools::GetUUID(), 'amount' => $stock, 'articleId' => $shopArticleId), + array('amount' => \PDO::PARAM_INT) + );",- +ProductInventoryService,setStock,@var int[]|false $stock,"$query = 'INSERT INTO `shop_article_stock` + SET `id` = :id, + `amount` = :amount, + `shop_article_id` = :articleId + ON DUPLICATE KEY UPDATE `amount` = :amount + '; + $this->databaseConnection->executeQuery( + $query, + array('id' => \TTools::GetUUID(), 'amount' => $stock, 'articleId' => $shopArticleId), + array('amount' => \PDO::PARAM_INT) + );",- +ProductInventoryService,updateVariantParentStock,@var false $stock,"$query = 'SELECT + SUM(`shop_article_stock`.amount) AS amount + FROM `shop_article_stock` + INNER JOIN `shop_article` ON `shop_article_stock`.`shop_article_id` = `shop_article`.`id` + WHERE `shop_article`.`variant_parent_id` = :articleId + '; + $result = $this->databaseConnection->fetchNumeric($query, array('articleId' => $parentArticleId)); + $amount = (is_array($result) && isset($result[0])) ? (int) $result[0] : 0; + + $updateData = array( + 'amount' => $amount, + 'articleId' => $parentArticleId, + ); + $query = 'INSERT INTO `shop_article_stock` + SET `amount` = :amount, + `shop_article_id` = :articleId, + `id` = :id + ON DUPLICATE KEY UPDATE `amount` = :amount + '; + $updateData['id'] = \TTools::GetUUID(); + $this->databaseConnection->executeQuery( + $query, + $updateData, + array('amount' => \PDO::PARAM_INT) + );",- +ProductInventoryService,setDatabaseConnection,* {@inheritdoc},$this->databaseConnection = $connection;,- +ProductInventoryServiceCacheProxy,__construct,* @var ProductInventoryServiceInterface,$this->subject = $subject;,- +ProductInventoryServiceCacheProxy,getAvailableStock,"@var array","if (isset($this->cache['x'.$shopArticleId])) { + return $this->cache['x'.$shopArticleId];",- +ProductInventoryServiceCacheProxy,addStock,* {@inheritdoc},"$this->triggerCacheChange($shopArticleId); + + return $this->subject->addStock($shopArticleId, $stock);",- +ProductInventoryServiceCacheProxy,setStock,"* {@inheritdoc} + * @psalm-suppress InvalidReturnStatement + * @FIXME Returning a void return","$this->triggerCacheChange($shopArticleId); + + return $this->subject->setStock($shopArticleId, $stock);",- +ProductInventoryServiceCacheProxy,updateVariantParentStock,"* {@inheritdoc} + * @psalm-suppress InvalidReturnStatement + * @FIXME Returning a void return","$this->triggerCacheChange($parentArticleId); + + return $this->subject->updateVariantParentStock($parentArticleId);",- +ProductStatisticsService,getStats,* @var Connection,"$query = 'SELECT * FROM `shop_article_stats` WHERE `shop_article_id` = :articleId'; + $data = $this->databaseConnection->fetchAssociative($query, array('articleId' => $articleId)); + if (is_array($data)) { + $stats = $this->createStatsObject($data);",- +ProductStatisticsService,add,"* @param string $articleId + * + * @return ProductStatisticsInterface","$field = $this->getTargetField($type); + $query = ""INSERT INTO `shop_article_stats` + SET `id` = :id, + `{$field",- +ProductStatisticsService,set,"* @param array $row + * + * @return ProductStatistics","$field = $this->getTargetField($type); + $query = ""INSERT INTO `shop_article_stats` + SET `id` = :id, + `{$field",- +ProductStatisticsService,updateAllBasedOnVariants,"* @param string $articleId + * @param int $type + * @param float $amount + * @psalm-param self::TYPE_* $type + * @return void","$query = 'SELECT + SUM(`shop_article_stats`.stats_sales) AS stats_sales, + SUM(`shop_article_stats`.`stats_detail_views`) AS stats_detail_views, + (SUM(`shop_article_stats`.`stats_review_average`)/COUNT(`shop_article`.`id`)) AS stats_review_average, + SUM(`shop_article_stats`.`stats_review_count`) AS stats_review_count + FROM `shop_article_stats` + INNER JOIN `shop_article` ON `shop_article_stats`.`shop_article_id` = `shop_article`.`id` + WHERE `shop_article`.`variant_parent_id` = :articleId + '; + $result = $this->databaseConnection->fetchAssociative($query, array('articleId' => $parentArticleId)); + if (is_array($result)) { + $stats = $this->createStatsObject($result);",- +ProductStatisticsService,setDatabaseConnection,"* @param string $articleId + * @param int $type + * @param float $amount + * @psalm-param self::TYPE_* $type + * @return void",$this->databaseConnection = $connection;,- +ProductVariantService,getProductBasedOnSelection: \TdbShopArticle,* {@inheritDoc},"if (true === $shopArticle->IsVariant() && \count($typeSelection) === 0) { + return $shopArticle;",- +ShopSearchSuggest,__construct,* @var Connection,$this->databaseConnection = $databaseConnection;,- +ShopSearchSuggest,getSearchSuggestions,* @param Connection $databaseConnection,"if ('' === trim($searchTerm)) { + return array();",- +ShopService,setDatabaseConnection,* @var string|null,$this->databaseConnection = $connection;,- +ShopService,__construct,* @var TdbShop[] - key = portalId,"$this->requestStack = $requestStack; + $this->portalDomainService = $portalDomainService; + $this->extranetUserProvider = $extranetUserProvider;",- +ShopService,getActiveShop,* @var Connection,return $this->getShopForPortalId($this->getActivePortalId());,- +ShopService,getShopForPortalId,* @var RequestStack,"if (isset($this->shops[$cmsPortalId])) { + return $this->shops[$cmsPortalId];",- +ShopService,getId,* @var PortalDomainServiceInterface,return $this->getActiveShop()->id;,- +ShopService,getConfiguration,* @var ExtranetUserProviderInterface,return $this->getActiveShop()->sqlData;,- +ShopService,getActiveProduct,"* set to true if the recalculation of the basket has been called (and set back to false once that is done. + * + * @var bool","$request = $this->requestStack->getCurrentRequest(); + if (null === $request) { + return null;",- +ShopService,getActiveCategory,"* @param Connection $connection + * + * @return void","$request = $this->requestStack->getCurrentRequest(); + if (null === $request) { + return null;",- +ShopService,getActiveBasket,"* @param PortalDomainServiceInterface $portalDomainService + * @param RequestStack $requestStack + * @param ExtranetUserProviderInterface $extranetUserProvider","$request = $this->requestStack->getCurrentRequest(); + if (null === $request) { + return null;",- +ShopService,resetBasket,* @return string|null,"$this->extranetUserProvider->getActiveUser()->ObserverUnregister('oUserBasket'); + + $request = $this->requestStack->getCurrentRequest(); + if (null === $request || false == $request->hasSession()) { + return ;",- +ShopService,getBasketLink,* {@inheritdoc},"$bTargetBasketPageWithoutRedirect = (false === $useRedirect); + + return $this->getActiveShop()->GetBasketLink(false, $bTargetBasketPageWithoutRedirect);",- +ShopService,getCheckoutLink,"* {@inheritdoc} + * + * @param null|string $cmsPortalId","$bTargetBasketPageWithoutRedirect = (false === $useRedirect); + + return $this->getActiveShop()->GetBasketLink(true, $bTargetBasketPageWithoutRedirect);",- +BasketProductAmountValidatorTest,testIsAmountValid,* @var BasketProductAmountValidator,"$this->givenABasketProductAmountValidator(); + $this->whenICallIsAmountValid($requestedAmount); + $this->thenTheExpectedValidityShouldBeReturned($expectedResult);",- +BasketProductAmountValidatorTest,getIsAmountValidData,* @var bool,"return array( + array( + 0, + true, + ), + array( + 1, + true, + ), + array( + 2, + true, + ), + array( + -7, + true, + ), + array( + '0', + true, + ), + array( + '2', + true, + ), + array( + '-23', + true, + ), + array( + 3.14, + false, + ), + array( + 2.00000000001, + false, + ), + array( + '3.14', + false, + ), + array( + 'a1', + false, + ), + array( + '1a', + false, + ), + );",- +SortStringTest,it_should_return_an_sort_array,* @var SortString,"$this->givenASortTypeWith($sortString); + $this->whenICallGetAsArray(); + $this->thenIShouldHave($expectedArray);",- +SortStringTest,dataProviderSortRawData,"* @test + * @dataProvider dataProviderSortRawData + * + * @param $sortString + * @param $expectedArray","return array( + array('', array()), + array('field2 ASC, field3 DESC, field4', array('field2' => 'ASC', 'field3' => 'DESC', 'field4' => 'ASC')), + array('field2 ASC, field3 DESC, field4', array('field2' => 'ASC', 'field3' => 'DESC', 'field4' => 'ASC')), + array('field2 bar, field3 DESC, field4', array('field2 bar' => 'ASC', 'field3' => 'DESC', 'field4' => 'ASC')), + array('field2 some expression ASC, some expression desc, some other expression', array('field2 some expression' => 'ASC', 'some expression' => 'DESC', 'some other expression' => 'ASC')), + );",- +StateFactoryTest,it_creates_state_object_from_user_input,* @var array,"$this->givenUserData($userData); + $this->whenWeCallTheFactoryMethod(); + $this->thenWeExpectTheState($expectedState);",- +StateFactoryTest,dataProviderUserInput,* @var \ChameleonSystem\ShopBundle\objects\ArticleList\Interfaces\StateInterface,"$data = array(); + + // from state string plus param + $expectedState = self::getStateFactory()->createState(); + $expectedState->setState(StateInterface::PAGE, 4); + $expectedState->setState(StateInterface::PAGE_SIZE, 20); + $stateString = $expectedState->getStateString(array(StateInterface::PAGE)); + $userData = array(StateInterface::STATE_STRING => $stateString, StateInterface::PAGE => 4); + $data[] = array($userData, $expectedState); + + // from parameter array + $param = array( + StateInterface::PAGE => 5, + StateInterface::PAGE_SIZE => 21, + StateInterface::SORT => 'somesortid', + ); + $expectedState = self::getStateFactory()->createState(); + $expectedState->setState(StateInterface::PAGE, 5); + $expectedState->setState(StateInterface::PAGE_SIZE, 21); + $expectedState->setState(StateInterface::SORT, 'somesortid'); + $data[] = array($param, $expectedState); + + // nothing + $expectedState = self::getStateFactory()->createState(); + $data[] = array(array(), $expectedState); + $data[] = array(null, $expectedState); + + return $data;",- +StateFactoryTest,it_should_create_a_state_based_on_another_state_enriched_by_default_values,* @var StateFactory,"$this->givenAState($state); + $this->givenDefaultStateValues($defaultStateValues); + $this->whenWeCallTheEnrichFactoryMethod(); + $this->thenWeExpectTheEnrichedStateToHave($expectedStateData);",- +StateFactoryTest,dataProviderEnrichedStates,* @var ConfigurationInterface,"$data = array(); + + $state = self::getStateFactory()->createState(); + $defaultStateValues = array( + StateInterface::PAGE_SIZE => 10, + StateInterface::SORT => 'somesortid', + ); + $data[] = array($state, $defaultStateValues, $defaultStateValues); + + $state = self::getStateFactory()->createState(); + $state->setState(StateInterface::SORT, 'newsortid'); + $state->setState(StateInterface::QUERY, 'somequery'); + $expectedResult = $defaultStateValues; + $expectedResult[StateInterface::SORT] = 'newsortid'; + $expectedResult[StateInterface::QUERY] = 'somequery'; + $data[] = array($state, $defaultStateValues, $expectedResult); + + $state = self::getStateFactory()->createState(); + $state->setState(StateInterface::PAGE_SIZE, 20); + $expectedResult = $defaultStateValues; + $expectedResult[StateInterface::PAGE_SIZE] = 20; + $data[] = array($state, $defaultStateValues, $expectedResult); + + $state = self::getStateFactory()->createState(); + $state->setState(StateInterface::PAGE, 2); + $expectedResult = $defaultStateValues; + $expectedResult[StateInterface::PAGE] = 2; + $data[] = array($state, $defaultStateValues, $expectedResult); + + $state = self::getStateFactory()->createState(); + $state->setState(StateInterface::SORT, 'newsortid'); + $expectedResult = $defaultStateValues; + $expectedResult[StateInterface::SORT] = 'newsortid'; + $data[] = array($state, $defaultStateValues, $expectedResult); + + return $data;",- +StateTest,it_should_construct_from_state_string,* @var \ChameleonSystem\ShopBundle\objects\ArticleList\State,"$this->givenAStateString($stateString); + $this->whenIConstructTheStateWithTheStateStringAndQueryParameter(); + $this->thenIShouldGetAStateWithThatStateString($expectedStateString);",- +StateTest,dataProviderStateString,* @var \ChameleonSystem\ShopBundle\objects\ArticleList\Exceptions\StateParameterException,"return array( + array(null, '', null), + array('', '', null), + array('p:1,s:sortid,ps:10', 'p:1,s:sortid,ps:10'), + array('p:0,s:sortid,ps:10', 's:sortid,ps:10'), + array('p:-1', ''), + array('p:', ''), + array('p:invalid', ''), + array('ps:-1', 'ps:-1'), + array('ps:', ''), + array('ps:0', ''), + array('ps:invalid', ''), + array('sortid:', ''), + );",- +StateTest,it_should_set_state_from_string,"* @test + * @dataProvider dataProviderStateString","$this->givenAStateString($stateString); + $this->givenANewStateInstance(); + $this->whenISetTheStateFromString($stateString); + $this->thenIShouldGetAStateWithThatStateString($expectedStateString);",- +StateTest,it_should_set_a_state,"* @test + * @dataProvider dataProviderStateString","$this->givenANewStateInstance(); + $this->whenISetTheStateKeyWithTheStateValue($stateKey, $stateValue); + if (null === $exception) { + $this->thenTheStateShouldHaveTheStateValueForTheStateKey($stateKey, $resultValue);",- +StateTest,dataProviderStateKeyAndValue,"* @test + * @dataProvider dataProviderStateKeyAndValue","$invalidValueException = new StateParameterException('', StateInterface::ERROR_CODE_INVALID_STATE_VALUE); + + return array( + array(StateInterface::SORT, '1234', '1234', null), + array(StateInterface::SORT, '', null, null), + array(StateInterface::PAGE, '-1', null, $invalidValueException), + array(StateInterface::PAGE, '0', null, null), + array(StateInterface::PAGE, '5', '5', null), + array(StateInterface::PAGE, 'invalid', null, $invalidValueException), + array(StateInterface::PAGE_SIZE, '-1', '-1', null), + array(StateInterface::PAGE_SIZE, '0', null, $invalidValueException), + array(StateInterface::PAGE_SIZE, '5', '5', null), + array(StateInterface::PAGE_SIZE, 'invalid', null, $invalidValueException), + array(StateInterface::QUERY, array('fo' => 'bar'), array('fo' => 'bar'), null), + );",- +StateTest,it_should_return_a_state_as_array,"* @test + * @dataProvider dataProviderStateArray","$this->givenAStateString($stateString); + $this->givenAQueryParameter($queryParameter); + $this->whenIConstructTheStateWithTheStateStringAndQueryParameter(); + $this->thenTheStateShouldReturnAStateArrayThatMatches($expectedOutput);",- +StateTest,dataProviderStateArray,"* @test + * @dataProvider dataProviderStateArrayWithoutQueryParameter","return array( + array('p:1,s:sortid,ps:10', null, array(StateInterface::PAGE => 1, StateInterface::SORT => 'sortid', StateInterface::PAGE_SIZE => 10)), + array('p:0,s:sortid,ps:10', null, array(StateInterface::SORT => 'sortid', StateInterface::PAGE_SIZE => 10)), + array('p:1,s:sortid,ps:10', array('some' => 'data', 'and' => 'somemore'), array(StateInterface::PAGE => 1, StateInterface::SORT => 'sortid', StateInterface::PAGE_SIZE => 10, StateInterface::QUERY => array('some' => 'data', 'and' => 'somemore'))), + );",- +StateTest,it_should_return_a_state_as_array_without_query_parameter,"* @test + * @dataProvider dataProviderInputOutputStateString + * + * @param $inputStateString + * @param $queryParameter + * @param $outputStateString + * @param array $varyingParameters","$this->givenAStateString($stateString); + $this->givenAQueryParameter($queryParameter); + $this->whenIConstructTheStateWithTheStateStringAndQueryParameter(); + $this->thenTheStateShouldReturnAStateArrayWithoutQueryParameterThatMatches($expectedOutput);",- +StateTest,dataProviderStateArrayWithoutQueryParameter,"* @test + * @dataProvider dataProviderQueryParameter","return array( + array('p:1,s:sortid,ps:10', null, array(StateInterface::PAGE => 1, StateInterface::SORT => 'sortid', StateInterface::PAGE_SIZE => 10)), + array('p:0,s:sortid,ps:10', null, array(StateInterface::SORT => 'sortid', StateInterface::PAGE_SIZE => 10)), + array('p:1,s:sortid,ps:10', array('some' => 'data', 'and' => 'somemore'), array(StateInterface::PAGE => 1, StateInterface::SORT => 'sortid', StateInterface::PAGE_SIZE => 10)), + );",- +StateTest,it_should_return_the_state_as_string,"* @test + * @dataProvider dataProviderUrlQueryOutputTester + * + * @param $parameterIdentifier + * @param $stateString + * @param $queryData + * @param $expectedOutput","$this->givenAStateString($inputStateString); + $this->givenAQueryParameter($queryParameter); + $this->whenIConstructTheStateWithTheStateStringAndQueryParameter(); + $this->whenIAmVaryingTheParameter($varyingParameters); + $this->thenIShouldGetAStateWithThatStateString($outputStateString);",- +StateTest,dataProviderInputOutputStateString,"* @test + * @dataProvider dataProviderSetUnsetStates + * + * @param $inputStateString + * @param $valuesSet + * @param $expectedStateValues","return array( + array('p:1,s:sortid,ps:10', null, 'p:1,s:sortid,ps:10', null), + array('p:1,s:sortid,ps:10', null, 's:sortid,ps:10', array(StateInterface::PAGE)), + array('p:1,s:sortid,ps:10', null, 's:sortid', array(StateInterface::PAGE, StateInterface::PAGE_SIZE)), + array('p:1,s:sortid,ps:10', array('some' => 'value'), 'p:1,s:sortid,ps:10', null), + );",- +TShopPaymentHandlerPayPalExpressTest,it_switches_zip_and_city_when_city_is_numeric_and_zip_is_not,* @test,"$testCases = array( + array( + 'adr' => array( + 'postalcode' => 'Freiburg', + 'city' => '79098', + ), + 'expectedAdr' => array( + 'postalcode' => '79098', + 'city' => 'Freiburg', + ), + ), + array( + 'adr' => array( + 'postalcode' => 'Freiburg', + 'city' => ' 79098', + ), + 'expectedAdr' => array( + 'postalcode' => '79098', + 'city' => 'Freiburg', + ), + ), + array( + 'adr' => array( + 'postalcode' => 'Freiburg', + 'city' => '079098', + ), + 'expectedAdr' => array( + 'postalcode' => '079098', + 'city' => 'Freiburg', + ), + ), + array( + 'adr' => array( + 'postalcode' => '123 Freiburg', + 'city' => '79098', + ), + 'expectedAdr' => array( + 'postalcode' => '79098', + 'city' => '123 Freiburg', + ), + ), + ); + + $reflectionMethod = new \ReflectionMethod('TShopPaymentHandlerPayPalExpress', 'postProcessBillingAndShippingAddress'); + $reflectionMethod->setAccessible(true); + $object = new \TShopPaymentHandlerPayPalExpress(); + + foreach ($testCases as $testCase) { + $adrBilling = $testCase['adr']; + $adrShipping = $testCase['adr']; + $reflectionMethod->invokeArgs($object, array($adrBilling, $adrShipping)); + $this->assertEquals($testCase['expectedAdr'], $adrBilling, 'billing does not match'); + $this->assertEquals($testCase['expectedAdr'], $adrShipping, 'shipping does not match');",- +TShopPaymentHandlerPayPalExpressTest,it_does_not_switches_zip_and_city_when_zip_is_numeric_and_city_is_not,* @test,"$testCases = array( + array( + 'adr' => array( + 'postalcode' => '79098', + 'city' => 'Freiburg', + ), + 'expectedAdr' => array( + 'postalcode' => '79098', + 'city' => 'Freiburg', + ), + ), + array( + 'adr' => array( + 'postalcode' => ' 79098', + 'city' => 'Freiburg', + ), + 'expectedAdr' => array( + 'postalcode' => '79098', + 'city' => 'Freiburg', + ), + ), + array( + 'adr' => array( + 'postalcode' => '079098', + 'city' => 'Freiburg', + ), + 'expectedAdr' => array( + 'postalcode' => '079098', + 'city' => 'Freiburg', + ), + ), + array( + 'adr' => array( + 'postalcode' => '79098', + 'city' => '123 Freiburg', + ), + 'expectedAdr' => array( + 'postalcode' => '79098', + 'city' => '123 Freiburg', + ), + ), + ); + + $reflectionMethod = new \ReflectionMethod('TShopPaymentHandlerPayPalExpress', 'postProcessBillingAndShippingAddress'); + $reflectionMethod->setAccessible(true); + $object = new \TShopPaymentHandlerPayPalExpress(); + + foreach ($testCases as $testCase) { + $adrBilling = $testCase['adr']; + $adrShipping = $testCase['adr']; + $reflectionMethod->invokeArgs($object, array($adrBilling, $adrShipping)); + $this->assertEquals($testCase['expectedAdr'], $adrBilling, 'billing does not match'); + $this->assertEquals($testCase['expectedAdr'], $adrShipping, 'shipping does not match');",- +TShopPaymentHandlerPayPalExpressTest,it_does_not_switch_zip_and_city_when_both_are_numeric,* @test,"$testCases = array( + array( + 'adr' => array( + 'postalcode' => '79098', + 'city' => '24234345', + ), + 'expectedAdr' => array( + 'postalcode' => '79098', + 'city' => '24234345', + ), + ), + ); + + $reflectionMethod = new \ReflectionMethod('TShopPaymentHandlerPayPalExpress', 'postProcessBillingAndShippingAddress'); + $reflectionMethod->setAccessible(true); + $object = new \TShopPaymentHandlerPayPalExpress(); + + foreach ($testCases as $testCase) { + $adrBilling = $testCase['adr']; + $adrShipping = $testCase['adr']; + $reflectionMethod->invokeArgs($object, array($adrBilling, $adrShipping)); + $this->assertEquals($testCase['expectedAdr'], $adrBilling, 'billing does not match'); + $this->assertEquals($testCase['expectedAdr'], $adrShipping, 'shipping does not match');",- +TdbShopArticle,it_should_keep_custom_data_even_when_serializing_and_unserializing,* @test,"$testCustomData = array('custom' => 'data'); + $basketArticle = new TShopBasketArticleCore(); + + $basketArticle->setCustomData($testCustomData); + + $basketArticleSerialized = serialize($basketArticle); + + $unserializedArticle = unserialize($basketArticleSerialized); + + $this->assertEquals($testCustomData, $unserializedArticle->getCustomData());",- +TPkgShopViewMyOrderDetailsTest,it_addsAnOrderToAGuestsOrderList,"* Class TPkgShopViewMyOrderDetailsTest. + * + * @covers \TPkgShopViewMyOrderDetails","$this->mockSessionAdapter->addOrderId('ORDERID')->shouldBeCalled(null); + $viewMyOrderDetails = new TPkgShopViewMyOrderDetails($this->mockDbAdapter->reveal(), $this->mockSessionAdapter->reveal()); + + $viewMyOrderDetails->addOrderIdToMyList('ORDERID');",- +TPkgShopViewMyOrderDetailsTest,it_addsAnOrderToAUsersOrderList,* @var IPkgShopViewMyOrderDetailsDbAdapter|ObjectProphecy,"$viewMyOrderDetails = new TPkgShopViewMyOrderDetails($this->mockDbAdapter->reveal(), $this->mockSessionAdapter->reveal()); + + $viewMyOrderDetails->addOrderIdToMyList('ORDERID', 'USERID');",- +TPkgShopViewMyOrderDetailsTest,it_confirmsOrderInUsersOrderList,* @var IPkgShopViewMyOrderDetailsSessionAdapter|ObjectProphecy,"$this->mockDbAdapter->hasOrder('USERID', 'ORDERID')->willReturn(true); + $viewMyOrderDetails = new TPkgShopViewMyOrderDetails($this->mockDbAdapter->reveal(), $this->mockSessionAdapter->reveal()); + + $this->assertTrue($viewMyOrderDetails->orderIdBelongsToUser('ORDERID', 'USERID'));",- +TPkgShopViewMyOrderDetailsTest,it_confirmsOrderInGuestsOrderList,* @test,"$this->mockSessionAdapter->hasOrder('ORDERID')->willReturn(true); + $viewMyOrderDetails = new TPkgShopViewMyOrderDetails($this->mockDbAdapter->reveal(), $this->mockSessionAdapter->reveal()); + + $this->assertTrue($viewMyOrderDetails->orderIdBelongsToUser('ORDERID'));",- +TPkgShopViewMyOrderDetailsTest,it_deniesOrderInUsersOrderList,* @test,"$this->mockDbAdapter->hasOrder('USERID', 'ORDERID')->willReturn(false); + $viewMyOrderDetails = new TPkgShopViewMyOrderDetails($this->mockDbAdapter->reveal(), $this->mockSessionAdapter->reveal()); + + $this->assertFalse($viewMyOrderDetails->orderIdBelongsToUser('ORDERID', 'USERID'));",- +TPkgShopViewMyOrderDetailsTest,it_deniesOrderInGuestsOrderList,* @test,"$this->mockSessionAdapter->hasOrder('ORDERID')->willReturn(false); + $viewMyOrderDetails = new TPkgShopViewMyOrderDetails($this->mockDbAdapter->reveal(), $this->mockSessionAdapter->reveal()); + + $this->assertFalse($viewMyOrderDetails->orderIdBelongsToUser('ORDERID'));",- +ShopPaymentConfigLoaderTest,it_loads_empty_values_on_empty_configuration_in_loadFromPaymentHandlerId,* @test,"$this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); + $this->shopPaymentConfigLoaderDataAccess->loadPaymentHandlerGroupConfig('groupId')->willReturn(array()); + $this->shopPaymentConfigLoaderDataAccess->loadPaymentHandlerConfig('handlerId')->willReturn(array()); + + $expected = array(); + + $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); + $config = $loader->loadFromPaymentHandlerId('handlerId', 'portalId1'); + $allValues = $config->getAllValues(); + + $this->assertEquals($expected, $allValues);",- +ShopPaymentConfigLoaderTest,it_loads_correct_sandbox_configuration_in_loadFromOrderId,* @test,"$this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn( + \IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX + ); + $this->shopPaymentConfigLoaderDataAccess->getDataFromOrderId('orderId')->willReturn(new OrderPaymentInfo('orderId', 'handlerId', 'portalId1')); + $this->initFullConfig(); + $this->initFullExpectedValue(); + + $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); + $loader->addConfigProvider('groupSystemName', $this->shopPaymentConfigProvider->reveal()); + + $config = $loader->loadFromOrderId('orderId'); + $allValues = $config->getAllValues(); + ksort($allValues); + + $this->assertEquals($this->expectedConfig, $allValues);",- +ShopPaymentConfigLoaderTest,it_loads_correct_sandbox_configuration_in_loadFromPaymentHandlerId,* @test,"$this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn( + \IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX + ); + $this->initFullConfig(); + $this->initFullExpectedValue(); + + $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); + $loader->addConfigProvider('groupSystemName', $this->shopPaymentConfigProvider->reveal()); + + $config = $loader->loadFromPaymentHandlerId('handlerId', 'portalId1'); + $allValues = $config->getAllValues(); + ksort($allValues); + + $this->assertEquals($this->expectedConfig, $allValues);",- +ShopPaymentConfigLoaderTest,it_loads_correct_sandbox_configuration_with_default_environment_in_loadFromPaymentHandlerId,* @test,"$this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn('default'); + $this->initFullConfig(); + $this->initFullExpectedValue(); + + $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); + $loader->addConfigProvider('groupSystemName', $this->shopPaymentConfigProvider->reveal()); + + $config = $loader->loadFromPaymentHandlerId('handlerId', 'portalId1'); + $allValues = $config->getAllValues(); + ksort($allValues); + + $this->assertEquals($this->expectedConfig, $allValues);",- +ShopPaymentConfigLoaderTest,it_loads_correct_sandbox_configuration_in_loadFromPaymentHandlerGroupId,* @test,"$this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn( + \IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX + ); + $this->initFullConfig(false); + $this->initPaymentHandlerGroupOnlyExpectedValue(); + + $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); + $loader->addConfigProvider('groupSystemName', $this->shopPaymentConfigProvider->reveal()); + + $config = $loader->loadFromPaymentHandlerGroupId('groupId', 'portalId1'); + $allValues = $config->getAllValues(); + ksort($allValues); + + $this->assertEquals($this->expectedConfig, $allValues);",- +ShopPaymentConfigLoaderTest,it_loads_correct_sandbox_configuration_in_loadFromPaymentHandlerGroupSystemName,* @test,"$this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn( + \IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX + ); + $this->shopPaymentConfigLoaderDataAccess->getPaymentHandlerGroupIdFromSystemName('groupSystemName')->willReturn('groupId'); + $this->initFullConfig(false); + $this->initPaymentHandlerGroupOnlyExpectedValue(); + + $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); + $loader->addConfigProvider('groupSystemName', $this->shopPaymentConfigProvider->reveal()); + + $config = $loader->loadFromPaymentHandlerGroupSystemName('groupSystemName', 'portalId1'); + $allValues = $config->getAllValues(); + ksort($allValues); + + $this->assertEquals($this->expectedConfig, $allValues);",- +ShopPaymentConfigLoaderTest,it_throws_configuration_exception_on_error,* @test,"$this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn( + \IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX + ); + $this->shopPaymentConfigLoaderDataAccess->getPaymentHandlerGroupIdFromSystemName('groupSystemName')->willThrow(new DataAccessException('This is a test exception.')); + + $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); + $loader->addConfigProvider('groupSystemName', $this->shopPaymentConfigProvider->reveal()); + + try { + $config = $loader->loadFromPaymentHandlerGroupSystemName('groupSystemName', 'portalId1'); + $this->fail();",- +ShopPaymentHandlerMock,getUserPaymentDataWithoutLoading,* @var array,return $this->paymentUserData;,- +ShopPaymentHandlerMock,SetPaymentUserData,* @return array,$this->paymentUserData = $paymentUserData;,- +TPkgShopPaymentIPayment_TPkgShopPaymentIPNHandler_BaseResponse,handleIPN,"* process the IPN request - the request object contains all details (payment handler, group, order etc) + * the call should return true if processing should continue, false if it is to stop. On Error it should throw an error + * extending AbstractPkgShopPaymentIPNHandlerException. + * + * @param TPkgShopPaymentIPNRequest $oRequest + * @trows AbstractPkgShopPaymentIPNHandlerException + * + * @return bool","$oStatus = $oRequest->getIpnStatus(); + if ($oStatus && 'success' === $oStatus->fieldCode) { + // #23380 some payment methods redirect the user in the last order step to an external source - there the user + // confirms (and executes) the payment and is then sent back to our thank-you-page. Only if the user arrives there is + // the order marked as completed - some users close the browser before arriving back at the shop. these orders are then never + // marked as completed - even though they are paid. This case should be handled here + $oOrder = $oRequest->getOrder(); + $aPayload = $oRequest->getRequestPayload(); + $oPaymentHandler = $oOrder->GetPaymentHandler(); + if (!is_null($oPaymentHandler)) { + $oPaymentHandler->SetPaymentUserData($aPayload); + $oPaymentHandler->SaveUserPaymentDataToOrder($oOrder->id);",- +TPkgShopPaymentIPayment_TPkgShopPaymentIPNHandler_BaseResponse,getIPNTransactionDetails,"* return an instance of TPkgShopPaymentIPN_TransactionDetails if your IPN should trigger a transaction for the order + * (ie payment or refunds etc). if you return null, then no transaction will be triggered. + * + * @param TPkgShopPaymentIPNRequest $oRequest + * + * @return TPkgShopPaymentIPN_TransactionDetails|null","$oStatus = $oRequest->getIpnStatus(); + if (null === $oStatus) { + return null;",- +CurrencyBasket,SetActivePaymentMethod,"* Reloads the active payment method on currency change, + * so that the payment method holds the payment charges in the correct currency. + * + * {@inheritdoc}","$oldActivePaymentMethod = $this->GetActivePaymentMethod(); + $isPaymentSet = parent::SetActivePaymentMethod($oShopPayment); + $newActivePaymentMethod = $this->GetActivePaymentMethod(); + if (null === $oldActivePaymentMethod || null === $newActivePaymentMethod) { + return $isPaymentSet;",- +ChameleonSystemShopCurrencyExtension,load,* @return void,"$loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); + $loader->load('services.xml');",- +CurrencyChangedEvent,__construct,* @var string|null,$this->newCurrencyId = $newCurrencyId;,- +CurrencyChangedEvent,getNewCurrencyId,* @param string|null $newCurrencyId,return $this->newCurrencyId;,- +TPkgShopCurrencyMapper,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oCurrency', 'TdbPkgShopCurrency', TdbPkgShopCurrency::GetActiveInstance(), true);",- +TPkgShopCurrencyMapper,Accept,* {@inheritdoc},"/** @var $oCurrency TdbPkgShopCurrency */ + $oCurrency = $oVisitor->GetSourceObject('oCurrency'); + if ($oCurrency && $bCachingEnabled) { + $oCacheTriggerManager->addTrigger($oCurrency->table, $oCurrency->id);",- +TPkgShopCurrency,GetFormattedCurrency,"* format the double value as a string. includes the currency symbol as part of the response. + * note: will not do any conversion (we assume that dValue is already in the correct currency). + * + * @param float $dValue + * + * @return string","$oLocal = TCMSLocal::GetActive(); + $sValue = $oLocal->FormatNumber($dValue, 2).' '.$this->GetCurrencyDisplaySymbol(); + + return $sValue;",- +TPkgShopCurrency,getISO4217Code,"* return the ISO-4217 code for the currency. + * + * @return string",return $this->fieldIso4217;,- +TPkgShopCurrency,GetCurrencyDisplaySymbol,"* return the symbol used to mark the currency in the shop. + * + * @return string",return $this->fieldSymbol;,- +TPkgShopCurrency,SetAsActive,"* return the active currency. Currency is set defined via + * - user session + * - user cookie + * - user profile + * note: passing bReset will reset and return NOTHING. + * + * @static + * + * @return TdbPkgShopCurrency|false + * + * @deprecated use the service chameleon_system_shop_currency.shop_currency instead + * + * @param bool $bReset","$sCurrencyId = $this->id; + + /** @var Request $request */ + $request = ServiceLocator::get('request_stack')->getCurrentRequest(); + if (null !== $request && true === $request->hasSession()) { + $request->getSession()->set(TdbPkgShopCurrency::SESSION_NAME, $sCurrencyId);",- +TPkgShopCurrency,Convert,@var $currencyService ShopCurrencyServiceInterface,"if (null == $oBaseCurrency) { + $oBaseCurrency = TdbPkgShopCurrency::GetBaseCurrency();",- +TPkgShopCurrency_CMSFieldPrice,RenderFieldPostLoadString,* @return string,"$oViewParser = new TViewParser(); + /** @var $oViewParser TViewParser */ + $oViewParser->bShowTemplatePathAsHTMLHint = false; + $aData = $this->GetFieldWriterData(); + $aData['numberOfDecimals'] = $this->_GetNumberOfDecimals(); + $aData['sValueTypeFieldName'] = $this->oDefinition->GetFieldtypeConfigKey('sValueTypeFieldName'); + $oViewParser->AddVarArray($aData); + + return $oViewParser->RenderObjectPackageView('postload', 'pkgShopCurrency/views/TCMSFields/TPkgShopCurrency_CMSFieldPrice');",- +TPkgShopCurrency_CMSFieldPrice,RenderFieldPostWakeupString,@var $oViewParser TViewParser,"$oViewParser = new TViewParser(); + $oViewParser->bShowTemplatePathAsHTMLHint = false; + $aData = $this->GetFieldWriterData(); + $aData['numberOfDecimals'] = $this->_GetNumberOfDecimals(); + $oViewParser->AddVarArray($aData); + + return $oViewParser->RenderObjectPackageView('postwakeup', 'pkgShopCurrency/views/TCMSFields/TPkgShopCurrency_CMSFieldPrice');",- +TPkgShopCurrency_CMSFieldPrice,RenderFieldPropertyString,"* injected into the PostWakeupHook in the auto class. + * + * @return string","$sNormalfield = parent::RenderFieldPropertyString(); + + $oViewParser = new TViewParser(); + $oViewParser->bShowTemplatePathAsHTMLHint = false; + $aData = $this->GetFieldWriterData(); + $aData['sFieldName'] = $aData['sFieldName'].'Original'; + $aData['sFieldType'] = 'double'; + + $oViewParser->AddVarArray($aData); + + $sNormalfield .= ""\n"".$oViewParser->RenderObjectView('property', 'TCMSFields/TCMSField'); + + return $sNormalfield;",- +MTPkgShopCurrencyChangeCurrencyCore,Execute,"* used to show available currencies to the user and to provide a method to change the currency. +/*","parent::Execute(); + + $this->data['oActiveCurrency'] = TdbPkgShopCurrency::GetActiveInstance(); + $this->data['oCurrencyList'] = TdbPkgShopCurrencyList::GetList(); + + return $this->data;",- +MTPkgShopCurrencyChangeCurrencyCore,_AllowCache,* @return void,return true;,- +MTPkgShopCurrencyChangeCurrencyCore,_GetCacheParameters,"* if this function returns true, then the result of the execute function will be cached. + * + * @return bool","$parameters = parent::_GetCacheParameters(); + $parameters['sActiveCurrency'] = TdbPkgShopCurrency::GetActiveCurrencyId(); + + return $parameters;",- +MTPkgShopCurrencyChangeCurrencyCore,_GetCacheTableInfos,"* return an assoc array of parameters that describe the state of the module. + * + * @return array","$aTrigger = parent::_GetCacheTableInfos(); + if (!is_array($aTrigger)) { + $aTrigger = array();",- +TPkgShopCurrency_PkgCmsActionPlugin,ChangeCurrency,"* @param array $aData + * @param bool $bRedirect + * @return void","$sId = (isset($aData['sPkgShopCurrencyId'])) ? ($aData['sPkgShopCurrencyId']) : (''); + if (empty($sId)) { + return;",- +TPkgCmsNavigation_CurrencySelection,GetRequirements,"* add currency selection menu. +/*","$oRequirements->NeedsSourceObject('aTree', 'array', array());",- +TPkgCmsNavigation_CurrencySelection,Accept,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the + * needed information and returning it. + * + * example: + * + * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); + * $oRequirements->NeedsSourceObject(""bar""); + * $oRequirements->NeedsMappedValue(""baz""); + * + * @param IMapperRequirementsRestricted $oRequirements","$oCurrencyList = TdbPkgShopCurrencyList::GetList(); + if ($oCurrencyList->Length() < 2) { + return;",- +CurrencyRequestStateProvider,"__construct( + RequestInfoServiceInterface $requestInfoService, + ShopCurrencyServiceInterface $currencyService + )",* @var RequestInfoServiceInterface,"$this->requestInfoService = $requestInfoService; + $this->currencyService = $currencyService;",- +CurrencyRequestStateProvider,getStateElements,* @var ShopCurrencyServiceInterface,"if (false === $this->requestInfoService->isChameleonRequestType(RequestTypeInterface::REQUEST_TYPE_FRONTEND)) { + return [];",- +ShopCurrencyService,__construct,* @var RequestStack,"$this->requestStack = $requestStack; + $this->extranetUserProvider = $extranetUserProvider;",- +ShopCurrencyService,getSymbol,* @var ExtranetUserProviderInterface,return $this->getObject()->GetCurrencyDisplaySymbol();,- +ShopCurrencyService,getIso4217Code,* {@inheritdoc},return $this->getObject()->getISO4217Code();,- +ShopCurrencyService,formatNumber,* {@inheritdoc},return $this->getObject()->GetFormattedCurrency($value);,- +ShopCurrencyService,getObject,* {@inheritdoc},"$activeCurrencyId = $this->getActiveCurrencyId(); + if (null === $activeCurrencyId || $activeCurrencyId === TdbPkgShopCurrency::GetDefaultCurrency()->id) { + return TdbPkgShopCurrency::GetDefaultCurrency();",- +ShopCurrencyService,reset,* {@inheritdoc},// in the past there was built-in cache logic in this class - moved to ShopCurrencyServiceRequestLevelCacheDecorator.,- +ShopCurrencyService,getActiveCurrencyId,* {@inheritdoc},"$request = $this->requestStack->getCurrentRequest(); + if (null === $request || false === $request->hasSession() || false === $request->getSession()->isStarted()) { + return null;",- +ShopCurrencyServiceRequestLevelCacheDecorator,__construct,* @var array,$this->subject = $subject;,- +ShopCurrencyServiceRequestLevelCacheDecorator,getSymbol,* @var ShopCurrencyServiceInterface,"$cacheKey = 'getSymbol'; + if (isset($this->cache[$cacheKey])) { + return $this->cache[$cacheKey];",- +ShopCurrencyServiceRequestLevelCacheDecorator,getIso4217Code,* @param ShopCurrencyServiceInterface $subject,"$cacheKey = 'getIso4217Code'; + if (isset($this->cache[$cacheKey])) { + return $this->cache[$cacheKey];",- +ShopCurrencyServiceRequestLevelCacheDecorator,formatNumber,* {@inheritdoc},return $this->subject->formatNumber($value);,- +ShopCurrencyServiceRequestLevelCacheDecorator,reset,* {@inheritdoc},"$this->subject->reset(); + $this->cache = array();",- +ShopCurrencyServiceRequestLevelCacheDecorator,getObject,* {@inheritdoc},"$cacheKey = 'getObject'; + if (isset($this->cache[$cacheKey])) { + return $this->cache[$cacheKey];",- +ShopCurrencyServiceRequestLevelCacheDecorator,getActiveCurrencyId,* {@inheritdoc},"$cacheKey = ""getActiveCurrencyId-$bUseDefaultIfNotDefinedForUser""; + if (isset($this->cache[$cacheKey])) { + return $this->cache[$cacheKey];",- +TPkgShopDhlPackstation_TPkgExtranetMapper_AddressForm,Accept,"* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager + * + * @return","parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); + + $oAddress = $oVisitor->GetSourceObject('oAddressObject'); + $aFieldList = array('aFieldPackstation' => 'is_dhl_packstation'); + $this->SetInputFields($aFieldList, $oVisitor, $oAddress, 'checkbox');",- +TPkgShopDhlPackstation_DataExtranetUser,SetAddressAsBillingAddress,"* set address as new billing address... will check if the address belongs to the user. + * + * @param string $sAddressId + * + * @return TdbDataExtranetUserAddress|null|false","$oNewBillingAdr = null; + if (0 != strcmp($this->fieldDefaultBillingAddressId, $sAddressId)) { + $oAdr = TdbDataExtranetUserAddress::GetNewInstance(); + if ($oAdr->LoadFromFields( + array('id' => $sAddressId, 'data_extranet_user_id' => $this->id, 'is_dhl_packstation' => '0') + ) + ) { + $this->SaveFieldsFast(array('default_billing_address_id' => $sAddressId)); + $oNewBillingAdr = $this->GetBillingAddress(true);",- +TPkgShopDhlPackstation_DataExtranetUser,UpdateShippingAddress,"* clear field for type change after updating address. + * + * @param array $aAddressData + * + * @return bool","$aAddressData = $this->fillPackStationFieldValue($aAddressData); + $bChangeDHLPackStation = $this->DHLPackStationStatusChanged($aAddressData); + $bIsDHLPackStation = ('0' == $aAddressData['is_dhl_packstation']) ? false : true; + $bUpdated = parent::UpdateShippingAddress($aAddressData); + if (true === $bUpdated && true === $bChangeDHLPackStation) { + $oShippingAddress = $this->GetShippingAddress(); + if (false === is_null($oShippingAddress)) { + $oShippingAddress->SetIsDhlPackstation($bIsDHLPackStation, false);",- +TPkgShopDhlPackstation_DataExtranetUser,fillPackStationFieldValue,"* add pack station field if missing in address data. + * + * @param array $aAddressData + * + * @return array","if (is_array($aAddressData) && false === isset($aAddressData['is_dhl_packstation'])) { + $aAddressData['is_dhl_packstation'] = 0;",- +TPkgShopDhlPackstation_DataExtranetUser,DHLPackStationStatusChanged,"* check if address type status changed. + * + * @param array $aAddressData + * + * @return bool","$bChangeDHLPackStation = false; + $aAddressData = $this->fillPackStationFieldValue($aAddressData); + $bIsDHLPackStation = ('0' == $aAddressData['is_dhl_packstation']) ? false : true; + $oOldAddress = clone $this->GetShippingAddress(); + if ($bIsDHLPackStation != $oOldAddress->fieldIsDhlPackstation) { + $bChangeDHLPackStation = true;",- +TPkgShopDhlPackstation_DataExtranetUserAddress,SetIsDhlPackstation,"* @param bool $bIsPackstation + * @param bool $bSave set to false if you not want to save cleard fiel values + * + * @return void","$aData = $this->sqlData; + if ($bIsPackstation) { + $aClear = array('company', 'address_additional_info', 'streetnr');",- +TPkgShopDhlPackstation_DataExtranetUserAddress,GetRequiredFields,"* return array with required fields. + * + * @return string[]","$aRequiredFields = parent::GetRequiredFields(); + if ($this->fieldIsDhlPackstation) { + $aRequiredFields[] = 'address_additional_info'; + $sKey = array_search('telefon', $aRequiredFields); + if (false !== $sKey) { + unset($aRequiredFields[$sKey]);",- +TPkgShopDhlPackstation_ShopStepUserDataV2,AllowedMethods,"* define any methods of the class that may be called via get or post. + * + * @return array","$aExternalFunctions = parent::AllowedMethods(); + $aExternalFunctions[] = 'ChangeShippingAddressIsPackstationState'; + + return $aExternalFunctions;",- +TPkgShopDhlPackstation_ShopStepUserDataV2,ChangeShippingAddressIsPackstationState,"* switch the current shipping address from being a packstation address to a normal address and back. + * + * @return void","$this->SetPreventProcessStepMethodFromExecuting(true); + + $bIsDhlPackstation = false; + $aShipping = $this->GetShippingAddressData(); + if (is_array($aShipping) && array_key_exists('is_dhl_packstation', $aShipping)) { + $bIsDhlPackstation = ('1' == $aShipping['is_dhl_packstation']) ? (true) : (false);",- +TPkgShopDhlPackstation_ShopStepUserDataV2,ChangeSelectedAddress,"* set state of ship to billing yes/no. + * + * if the user wants shipping=billing, then we can only allow this if the new target + * + * @param string $sShipToBillingAddress + * + * @return void","$oUser = self::getExtranetUserProvider()->getActiveUser(); + if ($oUser->IsLoggedIn()) { + $newShippingAddressId = $this->GetShippingAddressData('selectedAddressId'); + $newBillingAddressId = $this->GetBillingAddressData('selectedAddressId'); + if ('new' !== $newShippingAddressId) { + $this->updateStepAddressDataForAddressId($newShippingAddressId, $newBillingAddressId); + + if ($newShippingAddressId === $newBillingAddressId && + true === $this->isShipToBillingAddressAndBillingAddressIsPackstation() + ) { + $this->SetShipToBillingAddress('0'); + $newBillingAddress = $oUser->GetBillingAddress(); + $this->SetBillingAddressData($newBillingAddress->sqlData); + $this->getFlashMessageService()->addMessage( + TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING, + 'PkgShopDhlPackstation-ERROR-BILLING-MAY-NOT-BE-PACKSTATION' + );",- +Configuration,allowUseOfPostSearchFilter,* @return bool,return $this->fieldCanBeFiltered;,- +DbAdapter,getFilterableListInstanceIdOnPage,* @var Connection,"// find module instances of type x on page with setting y + $query = ""SELECT `shop_module_article_list`.`cms_tpl_module_instance_id` + FROM `shop_module_article_list` + INNER JOIN `cms_tpl_page_cms_master_pagedef_spot` ON `shop_module_article_list`.`cms_tpl_module_instance_id` = `cms_tpl_page_cms_master_pagedef_spot`.`cms_tpl_module_instance_id` + WHERE `shop_module_article_list`.`can_be_filtered` = '1' + AND `cms_tpl_page_cms_master_pagedef_spot`.`cms_tpl_page_id` = :pageId + ""; + + /** @psalm-var false|non-empty-list $instanceData */ + $instanceData = $this->getDatabaseConnection()->fetchNumeric($query, array('pageId' => $pageId)); + if (false === $instanceData) { + return null;",- +DbAdapter,setDatabaseConnection,"* @param string $pageId + * + * @return string|null",$this->databaseConnection = $connection;,- +DbAdapter,getFilterableListInstanceSpotOnPage,@psalm-var false|non-empty-list $instanceData,"// find module instances of type x on page with setting y + $query = ""SELECT `cms_master_pagedef_spot`.`name` + FROM `shop_module_article_list` + INNER JOIN `cms_tpl_page_cms_master_pagedef_spot` ON `shop_module_article_list`.`cms_tpl_module_instance_id` = `cms_tpl_page_cms_master_pagedef_spot`.`cms_tpl_module_instance_id` + INNER JOIN `cms_master_pagedef_spot` ON `cms_tpl_page_cms_master_pagedef_spot`.`cms_master_pagedef_spot_id` = `cms_master_pagedef_spot`.`id` + WHERE `shop_module_article_list`.`can_be_filtered` = '1' + AND `cms_tpl_page_cms_master_pagedef_spot`.`cms_tpl_page_id` = :pageId + ""; + $instanceData = $this->getDatabaseConnection()->fetchNumeric($query, array('pageId' => $pageId)); + if (false === $instanceData) { + return null;",- +ChameleonSystemShopListFilterExtension,load,* @return void,"$loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); + $loader->load('services.xml');",- +AbstractPkgShopListfilterMapper_Filter,GetRequirements,* {@inheritdoc},"$oRequirements->NeedsSourceObject('oFilterItem', 'TdbPkgShopListfilterItem'); + $oRequirements->NeedsSourceObject('oActiveFilter', 'TdbPkgShopListfilter', TdbPkgShopListfilter::GetActiveInstance());",- +AbstractPkgShopListfilterMapper_Filter,Accept,* {@inheritdoc},"/** @var $oFilterItem TdbPkgShopListfilterItem */ + $oFilterItem = $oVisitor->GetSourceObject('oFilterItem'); + $aFilterData = array( + 'sTitle' => $oFilterItem->fieldName, + 'sInputURLName' => $oFilterItem->GetURLInputName(), + 'sResetURL' => $oFilterItem->GetAddFilterURL(''), + 'bActive' => $oFilterItem->IsActive(), + ); + $oVisitor->SetMappedValueFromArray($aFilterData);",- +TPkgShopListfilterMapper_FilterBoolean,Accept,@var $oFilterItem TPkgShopListfilterItemBoolean,"parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); + + /** @var $oFilterItem TPkgShopListfilterItemBoolean */ + $oFilterItem = $oVisitor->GetSourceObject('oFilterItem'); + $aFilterData = array( + '0' => array( + 'sValue' => '', + 'bActive' => false, + 'iCount' => 0, + 'sURL' => '#', + ), + '1' => array( + 'sValue' => '', + 'bActive' => false, + 'iCount' => 0, + 'sURL' => '#', + ), + ); + + $aOptions = $oFilterItem->GetOptions(); + $iActiveValue = $oFilterItem->GetActiveValue(); + foreach ($aOptions as $sValue => $iCount) { + $aFilterData[$sValue] = array( + 'sValue' => $sValue, + 'bActive' => $sValue == $iActiveValue, + 'iCount' => $iCount, + 'sURL' => $oFilterItem->GetAddFilterURL($sValue), + );",- +TPkgShopListfilterMapper_FilterNumericSlider,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",* {@inheritdoc},"parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); + + /** @var $oFilterItem TPkgShopListfilterItemNumeric */ + $oFilterItem = $oVisitor->GetSourceObject('oFilterItem'); + /** @var $oActiveFilter TdbPkgShopListfilter */ + $oActiveFilter = $oVisitor->GetSourceObject('oActiveFilter'); + + $userDataValueLow = false; + $userDataValueHigh = false; + $userData = $oActiveFilter->GetCurrentFilterAsArray(); + if (count($userData) > 0) { + $dStartAmountTmp = $oFilterItem->GetActiveStartValue(); + if (!empty($dStartAmountTmp)) { + $userDataValueLow = $dStartAmountTmp;",- +TPkgShopListfilterMapper_FilterNumericSlider,setDisabled,@var $oFilterItem TPkgShopListfilterItemNumeric,"// slider need that as string + $this->disabled = ($disabled) ? 'true' : 'false'; + + return $this;",- +TPkgShopListfilterMapper_FilterNumericSlider,getDisabled,@var $oActiveFilter TdbPkgShopListfilter,return $this->disabled;,- +TPkgShopListfilterMapper_FilterNumericSlider,setMax,"* no articles + * $lowestArticlePrice = $highestArticlePrice = 0.","$this->max = $max; + + return $this;",- +TPkgShopListfilterMapper_FilterNumericSlider,getMax,"* 1 article + * $lowestArticlePrice = $highestArticlePrice + * slider + * range (values): + * - $lowestArticlePrice (rounded down) + * - $highestArticlePrice (rounded up) + * selected (min & max): + * - $lowestArticlePrice (rounded down) + * - $highestArticlePrice (rounded up) + * - *** IGNORE url input + * disabled: + * - true + * step: + * - $highestArticlePrice (rounded up) - $lowestArticlePrice (rounded down).",return $this->max;,- +TPkgShopListfilterMapper_FilterNumericSlider,setMin,@psalm-suppress InvalidCast,"$this->min = $min; + + return $this;",- +TPkgShopListfilterMapper_FilterNumericSlider,getMin,@psalm-suppress InvalidCast,return $this->min;,- +TPkgShopListfilterMapper_FilterNumericSlider,setStep,@psalm-suppress InvalidCast,"$this->step = $step; + + return $this;",- +TPkgShopListfilterMapper_FilterNumericSlider,getStep,@psalm-suppress InvalidCast,return $this->step;,- +TPkgShopListfilterMapper_FilterNumericSlider,setValueHigh,* at least 2.,"$this->valueHigh = $valueHigh; + + return $this;",- +TPkgShopListfilterMapper_FilterNumericSlider,getValueHigh,@psalm-suppress InvalidCast,return $this->valueHigh;,- +TPkgShopListfilterMapper_FilterNumericSlider,setValueLow,@psalm-suppress InvalidCast,"$this->valueLow = $valueLow; + + return $this;",- +TPkgShopListfilterMapper_FilterNumericSlider,getValueLow,"* as the $stepSize is rounded + * ($lowestArticlePrice + ($stepCount * $stepSize) can be higher than the actual $highestArticlePrice + * this would mess up the behaviour between the slider and the selects. + * + * => set $highestArticlePrice based on last option element in $selectToPrice",return $this->valueLow;,- +TPkgShopListfilterMapper_FilterNumericSlider,setDisabled,"* @param float $value + * + * @return float","$this->disabled = $disabled; + + return $this;",- +TPkgShopListfilterMapper_FilterNumericSlider,getDisabled,"* @param float $value + * + * @return float",return $this->disabled;,- +TPkgShopListfilterMapper_FilterNumericSlider,setSelectedOption,"* String representation of the boolean + * @var string + * @psalm-var 'true'|'false'","$this->selectedOption = $selectedOption; + + return $this;",- +TPkgShopListfilterMapper_FilterNumericSlider,getSelectedOption,@var int,return $this->selectedOption;,- +TPkgShopListfilterMapper_FilterNumericSlider,setOptions,@var int,"$this->options = $options; + + return $this;",- +TPkgShopListfilterMapper_FilterNumericSlider,addOption,@var int,"if (false === in_array($option, $this->options)) { + $this->options[] = $option;",- +TPkgShopListfilterMapper_FilterNumericSlider,getOptions,@var int,return $this->options;,- +TPkgShopListfilterMapper_FilterStandard,Accept,"* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager + * + * @return","parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); + + /** @var $oFilterItem TPkgShopListfilterItemMultiselect */ + $oFilterItem = $oVisitor->GetSourceObject('oFilterItem'); + + /** @var $oActiveFilter TdbPkgShopListfilter */ + $oActiveFilter = $oVisitor->GetSourceObject('oActiveFilter'); + + $aFilterData = array(); + $aOptions = $oFilterItem->GetOptions(); + foreach ($aOptions as $sValue => $iCount) { + $aFilterData[] = array( + 'sValue' => $sValue, + 'bActive' => $oFilterItem->IsSelected(trim($sValue)), + 'iCount' => $iCount, + 'sURL' => $oFilterItem->GetAddFilterURL(trim($sValue)), + 'bAllowMultiSelect' => $oFilterItem->fieldAllowMultiSelection, + );",- +TPkgShopListfilterMapper_Variants,GetRequirements,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the + * needed information and returning it. + * + * example: + * + * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); + * $oRequirements->NeedsSourceObject(""bar""); + * $oRequirements->NeedsMappedValue(""baz""); + * + * @param IMapperRequirementsRestricted $oRequirements","parent::GetRequirements($oRequirements); + $oRequirements->NeedsSourceObject('sShopVariantTypeIds', 'string'); + $oRequirements->NeedsSourceObject('aFilterData', 'array');",- +TPkgShopListfilterMapper_Variants,Accept,"* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager + * + * @return","parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); + + $aFilterData = $oVisitor->GetSourceObject('aFilterData'); + $sShopVariantTypeIds = $oVisitor->GetSourceObject('sShopVariantTypeIds'); + + $aRestriction = array(); + reset($aFilterData); + foreach ($aFilterData as $aFilter) { + $aRestriction[] = MySqlLegacySupport::getInstance()->real_escape_string($aFilter['sValue']);",- +FilterApi,"__construct( + RequestStack $requestStack, + DbAdapter $dbAdapter, + DbAdapterInterface $listDbAdapter, + StateFactoryInterface $stateFactory, + ResultFactoryInterface $resultFactory, + ActivePageServiceInterface $activePageService, + CacheInterface $cache, + StateRequestExtractorCollectionInterface $stateRequestExtractorCollection + )",* @var DbAdapter,"$this->dbAdapter = $dbAdapter; + $this->listDbAdapter = $listDbAdapter; + $this->stateFactory = $stateFactory; + $this->requestStack = $requestStack; + $this->resultFactory = $resultFactory; + $this->activePageService = $activePageService; + $this->cache = $cache; + $this->stateRequestExtractorCollection = $stateRequestExtractorCollection;",- +FilterApi,getArticleListQuery,* @var DbAdapterInterface,"$config = $this->getListConfiguration(); + + return $this->resultFactory->getFilterQuery($config);",- +FilterApi,getArticleListFilterRelevantState,* @var StateFactoryInterface,"$state = $this->getArticleListState(); + + $parameterIdentifier = $this->getArticleListSpotName(); + + return $state->getStateAsUrlQueryArray($parameterIdentifier, array(StateInterface::PAGE));",- +FilterApi,getListConfiguration,* @var RequestStack,"if (null !== $this->listModuleConfig) { + return $this->listModuleConfig;",- +FilterApi,allowCache,* @var ResultFactoryInterface,return $this->resultFactory->_AllowCache($this->getListConfiguration());,- +FilterApi,getCacheParameter,* @var ConfigurationInterface,"return $this->resultFactory->_GetCacheParameters($this->getListConfiguration(), $this->getArticleListState());",- +FilterApi,getCacheTrigger,* @var ActivePageServiceInterface,return $this->resultFactory->_GetCacheTableInfos($this->getListConfiguration());,- +FilterApi,getArticleListState,* @var string|null,"if (null !== $this->articleListState) { + return $this->articleListState;",- +FilterApi,getResultFactory,* @var StateInterface,return $this->resultFactory;,- +TPkgShopListfilter,setListState,* @var null|array,$this->listState = $listState;,- +TPkgShopListfilter,getListSate,* @var string,return $this->listState;,- +TPkgShopListfilter,getActiveFilterAsQueryString,* @var array,"$oFilterList = $this->GetFieldPkgShopListfilterItemList(); + + return $oFilterList->GetQueryRestriction();",- +TPkgShopListfilter,isStaticFilter,"* return the active instance based on the active category or shop config + * Attention: If list filter has configured a static filter the static filter data was added to post data + * within this function. + * + * @return TdbPkgShopListfilter|null","if (!is_array($this->staticFilter)) { + return false;",- +TPkgShopListfilter,setArticleListQuery,@var $filterApi FilterApiInterface,$this->articleListQuery = $articleListQuery;,- +TPkgShopListfilter,Render,"* @param array $listState + * @return void","$oView = new TViewParser(); + /** @var $oView TViewParser */ + $oView->AddVar('oListfilter', $this); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, TdbPkgShopListfilter::VIEW_PATH, $sViewType);",- +TPkgShopListfilter,GetFieldPkgShopListfilterItemList,* @return TdbPkgShopListfilter|null,"$oList = $this->GetFromInternalCache('FieldPkgShopListfilterItemList'); + if (is_null($oList)) { + $aTrigger = array('class' => __CLASS__, 'method' => 'GetFieldPkgShopListfilterItemList', 'id' => $this->id); + $aTrigger['activeFilter'] = TGlobal::instance()->GetUserData(TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA); + $bCaching = false; + if (!is_array($aTrigger['activeFilter']) || 0 == count($aTrigger['activeFilter'])) { + $bCaching = true;",- +TPkgShopListfilter,GetCurrentFilterAsHiddenInputFields,* @return array,"$oList = $this->GetFieldPkgShopListfilterItemList(); + + return $oList->GetListSettingAsInputFields();",- +TPkgShopListfilter,GetCurrentFilterAsArray,* @return string,"$aFilterAsArray = $this->GetFromInternalCache('aFilterAsArray'); + if (is_null($aFilterAsArray)) { + $oList = $this->GetFieldPkgShopListfilterItemList(); + $aFilterAsArray = $oList->GetListSettingAsArray(); + $this->SetInternalCache('aFilterAsArray', $aFilterAsArray);",- +TPkgShopListfilter,GetFilterValuesForFilterType,"* @param string $staticFilter + * + * @return void","/** @var array|null $aActiveFilter */ + $aActiveFilter = $this->GetFromInternalCache('aFilterDataAsArrayFor'.$sFilterSystemName); + + if (is_null($aActiveFilter)) { + $aActiveFilter = false; + + $aFilterData = $this->GetCurrentFilterAsArray(); + if (is_array($aFilterData) && array_key_exists(TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA, $aFilterData) && is_array($aFilterData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA]) && count($aFilterData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA]) > 0) { + $aFilterData = $aFilterData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA]; + $oFilterId = TdbPkgShopListfilterItem::GetNewInstance(); + if ($oFilterId->LoadFromFields(array('pkg_shop_listfilter_id' => $this->id, 'systemname' => $sFilterSystemName))) { + if (is_array($aFilterData) && array_key_exists($oFilterId->id, $aFilterData)) { + if (is_array($aFilterData[$oFilterId->id]) && count($aFilterData[$oFilterId->id]) > 0) { + $aActiveFilter = $aFilterData[$oFilterId->id];",- +TPkgShopListfilterItem,GetURLInputName,"* you need to set this to the field name you want to filter by. + * + * @var string",return urlencode(TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA).'['.urlencode($this->id).']';,- +TPkgShopListfilterItem,GetActiveSettingAsHiddenInputField,"* the item list filtered by all other listfilter item aside from this one. + * + * @var TCMSRecordList|null","/** + * @psalm-suppress InvalidArgument + * @FIXME Passing an array (`aActiveFilterData`) to `TGlobal::OutHTML` which expects a string. Due to `htmlentities` being used in that method, this will return an empty string up to PHP7.4 but result in an fatal error in PHP8+ + */ + return 'GetURLInputName()).'"" value=""'.TGlobal::OutHTML($this->aActiveFilterData).'"" />';",- +TPkgShopListfilterItem,GetActiveSettingAsArray,"* the current user selection for the filter. + * + * @var array|null","$aData = array(); + if (is_array($this->aActiveFilterData) || !empty($this->aActiveFilterData)) { + $aData = array(TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA => array($this->id => $this->aActiveFilterData));",- +TPkgShopListfilterItem,GetAddFilterURL,* @var bool,"// @todo: the sorting is lost here (#29269) + $oActiveListfilter = TdbPkgShopListfilter::GetActiveInstance(); + $aURLData = $oActiveListfilter->GetCurrentFilterAsArray(); + $aURLData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA][$this->id] = $sValue; + $aURLData[TdbPkgShopListfilter::URL_PARAMETER_IS_NEW_REQUEST] = '1'; + + return $this->getActivePageService()->getLinkToActivePageRelative($aURLData);",- +TPkgShopListfilterItem,SetFilteredItemList,"* {@inheritdoc} + * + * @return void",$this->oItemListFilteredByOtherItems = $oItemListFilteredByOtherItems;,- +TPkgShopListfilterItem,GetOptions,"* called when an object recovers from serialization. + * + * @return void","$aOptions = $this->GetFromInternalCache('aOptions'); + if (is_null($aOptions)) { + $aOptions = array(); + $sIdSelect = $this->GetResultSetBaseQuery(); + + if (PKG_SHOP_LISTFILTER_ENABLE_COUNT_PER_FILTER_ITEM) { + $sItemQuery = ""SELECT `shop_article`.`{$this->sItemFieldName",- +TPkgShopListfilterItem,Render,* @return void,"$oView = new TViewParser(); + /** @var $oView TViewParser */ + $oView->AddVar('oListItem', $this); + $oView->AddVar('oFilterType', $this->GetFieldPkgShopListfilterItemType()); + $oView->AddVar('aCallTimeVars', $aCallTimeVars); + $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); + $oView->AddVarArray($aOtherParameters); + + return $oView->RenderObjectPackageView($sViewName, TdbPkgShopListfilterItem::VIEW_PATH, $sViewType);",- +TPkgShopListfilterItem,GetQueryRestrictionForActiveFilter,"* @param array|string $aData + * @psalm-param array|'' $aData + * @return array|null - Returns `null` if the resulting array would be empty or if an empty string was passed as input.",return '';,- +TPkgShopListfilterItem,IsActive,"* overload view settings from filter-type if nothing is set in this filter-item. + * + * @return void",return $this->bIsActive;,- +TPkgShopListfilterItemList,__construct,"* create a new instance. + * + * @param string|null $sQuery + * @param string|null $iLanguageId","$this->bAllowItemCache = true; + parent::__construct($sQuery, $iLanguageId);",- +TPkgShopListfilterItemList,GetQueryRestriction,"* return sql condition for the current filter list. optionaly excluding the element passed. + * + * @param TdbPkgShopListfilterItem $oExcludeItem + * @param bool $bReturnAsArray - set to true if you want an array with the query parts instead of a string + * + * @return string|string[] + * @psalm-return ($bReturnAsArray is true ? string[] : string)","$sQuery = ''; + $aQueryItems = array(); + $iPointer = $this->getItemPointer(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + if (is_null($oExcludeItem) || !$oExcludeItem->IsSameAs($oItem)) { + $sTmpQuery = trim($oItem->GetQueryRestrictionForActiveFilter()); + if (!empty($sTmpQuery)) { + $aQueryItems[] = $sTmpQuery;",- +TPkgShopListfilterItemList,GetListSettingAsInputFields,"* return the setting of the list element as input fields (hidden). + * + * @return string","$sInput = ''; + $aInputItems = array(); + $iPointer = $this->getItemPointer(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + $sTmp = trim($oItem->GetActiveSettingAsHiddenInputField()); + if (!empty($sTmp)) { + $aInputItems[] = $sTmp;",- +TPkgShopListfilterItemList,GetListSettingAsArray,"* return the setting of the list element as input fields (hidden). + * + * @return array","$aSettings = array(); + $iPointer = $this->getItemPointer(); + $this->GoToStart(); + while ($oItem = $this->Next()) { + $aTmpSetting = $oItem->GetActiveSettingAsArray(); + $aSettings = array_merge_recursive($aSettings, $aTmpSetting);",- +TPkgShopListfilterItemBoolean,GetActiveValue,"* return the current active value (0 or 1). if none is set, we will return 0. + * + * @return int + * @psalm-suppress InvalidReturnType, InvalidReturnStatement + * @FIXME We can't be sure that the return type is `int`. Better add a cast here.","$iValue = $this->aActiveFilterData; + if (is_null($iValue) || ('0' != $iValue && '1' != $iValue)) { + $iValue = '';",- +TPkgShopListfilterItemCategoryTree,GetTreeFromValueList,"* you need to set this to the table name of the connected table. + * + * @var string",$aValues = $oListItem->GetOptions();,- +TPkgShopListfilterItemIsNew,GetQueryRestrictionForActiveFilter,"* you need to set this to the field name you want to filter by. + * + * @var string","$sQuery = ''; + $sValue = $this->GetActiveValue(); + if ('1' == $sValue || '0' == $sValue) { + $sQuery = ""`shop_article`.`{$this->sItemFieldName",- +TPkgShopListfilterItemIsOnStock,GetOptions,"* you need to set this to the field name you want to filter by. + * + * @var string","$aOptions = $this->GetFromInternalCache('aOptions'); + if (is_null($aOptions)) { + if (PKG_SHOP_LISTFILTER_ENABLE_COUNT_PER_FILTER_ITEM) { + $oObj = clone $this->oItemListFilteredByOtherItems; + $iCount = $this->oItemListFilteredByOtherItems->Length(); + $databaseConnection = $this->getDatabaseConnection(); + $quotedItemFieldName = $databaseConnection->quoteIdentifier($this->sItemFieldName); + $oObj->AddFilterString("" `shop_article_stock`.$quotedItemFieldName > 0""); + $iWithStockCount = $oObj->Length(); + $aOptions[0] = $iCount - $iWithStockCount; + $aOptions[1] = $iWithStockCount;",- +TPkgShopListfilterItemIsOnStock,GetQueryRestrictionForActiveFilter,"* return option as assoc array (name=>count). + * + * @return array","$sQuery = ''; + $sValue = $this->GetActiveValue(); + if ('1' == $sValue) { + $sQuery = '`shop_article_stock`.`'.MySqlLegacySupport::getInstance()->real_escape_string($this->sItemFieldName).'` > 0';",- +TPkgShopListfilterItemIsReduced,GetOptions,"* you need to set this to the field name you want to filter by. + * + * @var string","$aOptions = $this->GetFromInternalCache('aOptions'); + if (is_null($aOptions)) { + $aOptions = $this->oItemListFilteredByOtherItems->GetItemUniqueValueListForField('id', array($this, 'ArticleIsReduced')); + $this->OrderOptions($aOptions); + $this->SetInternalCache('aOptions', $aOptions);",- +TPkgShopListfilterItemIsReduced,ArticleIsReduced,"* return option as assoc array (name=>count). + * + * @return array","if ($aRow['price_reference'] > $aRow['price']) { + return '1';",- +TPkgShopListfilterItemIsReduced,GetQueryRestrictionForActiveFilter,"* @param string $sFieldName + * @param string $sValue + * @param array $aRow + * @return string + * + * @psalm-return '0'|'1'","$sQuery = ''; + $sValue = $this->GetActiveValue(); + if ('1' == $sValue) { + $sQuery = '`shop_article`.`price_reference` > 0 AND `shop_article`.`price_reference` != `shop_article`.`price` ';",- +TPkgShopListfilterItemLevelTree,GetRenderedCategoryTree,"* you need to set this to the table name of the connected table. + * + * @var string","$aFilterCategories = $this->GetOptions(); + $oTree = TShopCategoryTree::GetCategoryTree(); + $oTree->ResetCounter(); + foreach ($aFilterCategories as $sCategoryId => $sCategoryCount) { + $oTree->AddItemCount($sCategoryId, $sCategoryCount);",- +TPkgShopListfilterItemManufacturer,GetQueryRestrictionForActiveFilter,"* you need to set this to the table name of the connected table. + * + * @var string","$sQuery = parent::GetQueryRestrictionForActiveFilter(); + + if (is_null($sQuery)) { + $aValues = $this->aActiveFilterData; + if (is_array($aValues) && count($aValues) > 0) { + $quotedItemFieldName = $this->getDatabaseConnection()->quoteIdentifier($this->sItemFieldName); + $sQuery = "" `shop_article`.$quotedItemFieldName = '' "";",- +TPkgShopListfilterItemManufacturer,GetOptions,"* you need to set this to the field name in the article table (note: the field is not derived from + * the table name since this may differ). + * + * @var string","$aOptions = $this->GetFromInternalCache('aOptions'); + if (is_null($aOptions)) { + $aOptions = array(); + //select shop_manufacturer_id, that has available(searchable, invirtual, active, etc) articles of filtered categories + $sIdSelect = $this->GetResultSetBaseQuery(); + + //select id of available(searchable, invirtual, active, etc) articles of filtered categories + $sArticleIdsQuery = $this->GetResultSetBaseQuery('id'); + $databaseConnection = $this->getDatabaseConnection(); + $quotedItemTableName = $databaseConnection->quoteIdentifier($this->sItemTableName); + $quotedItemFieldName = $databaseConnection->quoteIdentifier($this->sItemFieldName); + $quotedTargetTableNameField = $databaseConnection->quoteIdentifier($this->GetTargetTableNameField()); + if (PKG_SHOP_LISTFILTER_ENABLE_COUNT_PER_FILTER_ITEM) { + $sItemQuery = "" + SELECT itemtable.$quotedTargetTableNameField AS attribute, COUNT(itemtable.$quotedTargetTableNameField) AS matches + FROM $quotedItemTableName AS itemtable + INNER JOIN `shop_article` ON `shop_article`.$quotedItemFieldName = itemtable.`id` + INNER JOIN ($sIdSelect) AS Z ON itemtable.`id` = Z.$quotedItemFieldName + INNER JOIN ($sArticleIdsQuery) AS Y ON `shop_article`.`id` = Y.`id` + GROUP BY itemtable.$quotedTargetTableNameField + ORDER BY itemtable.$quotedTargetTableNameField + "";",- +TPkgShopListfilterItemMultiselect,IsSelected,"* you need to set this to the table name of the connected table. + * + * @var string","$bIsSelected = false; + if (is_array($this->aActiveFilterData)) { + $bIsSelected = in_array($sItemName, $this->aActiveFilterData);",- +TPkgShopListfilterItemMultiselect,IsActiveFilter,"* you need to set this to the field name in the article table (note: the field is not derived from + * the table name since this may differ). + * + * @var string","$bIsSelected = false; + if (is_array($this->aActiveFilterData)) { + $bIsSelected = true;",- +TPkgShopListfilterItemMultiselect,GetOptions,"* return true if the item is selected. + * + * @param string $sItemName + * + * @return bool","$aOptions = $this->GetFromInternalCache('aOptions'); + if (is_null($aOptions)) { + $aOptions = array(); + $sIdSelect = $this->GetResultSetBaseQuery(); + $databaseConnection = $this->getDatabaseConnection(); + $quotedItemTableName = $databaseConnection->quoteIdentifier($this->sItemTableName); + $quotedItemFieldName = $databaseConnection->quoteIdentifier($this->sItemFieldName); + $quotedTargetTableNameField = $databaseConnection->quoteIdentifier($this->GetTargetTableNameField()); + if (PKG_SHOP_LISTFILTER_ENABLE_COUNT_PER_FILTER_ITEM) { + $sItemQuery = "" + SELECT itemtable.$quotedTargetTableNameField AS attribute, COUNT(itemtable.$quotedTargetTableNameField) AS matches + FROM $quotedItemTableName AS itemtable + INNER JOIN `shop_article` ON `shop_article`.$quotedItemFieldName = itemtable.`id` + INNER JOIN ($sIdSelect) AS Z ON itemtable.`id` = Z.$quotedItemFieldName + GROUP BY itemtable.$quotedTargetTableNameField + "";",- +TPkgShopListfilterItemMultiselect,GetQueryRestrictionForActiveFilter,"* return true if a item is selected. + * + * @return bool","/** @var string|null $sQuery */ + $sQuery = $this->GetFromInternalCache('sQueryRestrictionForActiveFilter'); + + if (is_null($sQuery)) { + $aValues = $this->aActiveFilterData; + if (is_array($aValues) && count($aValues) > 0) { + $aValues = TTools::MysqlRealEscapeArray($aValues); + $sItemListQuery = 'SELECT * FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($this->sItemTableName).'` WHERE '.$this->GetTargetTableNameField()."" IN ('"".implode(""','"", $aValues).""')""; + $tRes = MySqlLegacySupport::getInstance()->query($sItemListQuery); + $aIdList = array(); + while ($aItemRow = MySqlLegacySupport::getInstance()->fetch_assoc($tRes)) { + $aIdList[] = MySqlLegacySupport::getInstance()->real_escape_string($aItemRow['id']);",- +TPkgShopListfilterItemMultiselect,GetActiveSettingAsHiddenInputField,"* return option as assoc array (name=>count). + * + * @return array","$sHTML = ''; + if (is_array($this->aActiveFilterData)) { + reset($this->aActiveFilterData); + foreach ($this->aActiveFilterData as $sItemName) { + $sHTML .= 'GetURLInputName()).'[]"" value=""'.TGlobal::OutHTML($sItemName).'"" />';",- +TPkgShopListfilterItemMultiselectMLT,GetQueryRestrictionForActiveFilter,"* return the query restriction for active filter. returns false if there + * is no active restriction for this item. + * + * @return string|null","/** @var string|null $sQuery */ + $sQuery = $this->GetFromInternalCache('sQueryRestrictionForActiveFilter'); + + if (is_null($sQuery)) { + if (true === is_array($this->aActiveFilterData) && count($this->aActiveFilterData) > 0) { + $sItemListQuery = $this->GetSQLQueryForQueryRestrictionForActiveFilter(); + $aIdList = array(); + if (!empty($sItemListQuery)) { + $tRes = MySqlLegacySupport::getInstance()->query($sItemListQuery); + $aIdList = array(); + while ($aItemRow = MySqlLegacySupport::getInstance()->fetch_assoc($tRes)) { + $aIdList[] = MySqlLegacySupport::getInstance()->real_escape_string($aItemRow['source_id']);",- +TPkgShopListfilterItemMultiselectMLT,GetOptions,@var string|null $sQuery,"$aOptions = $this->GetFromInternalCache('aOptions'); + if (is_null($aOptions)) { + $aOptions = array(); + $sIdSelect = $this->GetResultSetBaseQuery(); + $databaseConnection = $this->getDatabaseConnection(); + $quotedItemTableName = $databaseConnection->quoteIdentifier($this->sItemTableName); + $quotedTableName = $databaseConnection->quoteIdentifier(""shop_article_{$this->sItemFieldName",- +TPkgShopListfilterItemMultiselectPropertyTable,GetOptions,"* return option as assoc array (name=>count). + * + * @return array","$aOptions = $this->GetFromInternalCache('aOptions'); + if (is_null($aOptions)) { + if (!empty($this->fieldMysqlFieldName)) { + $this->sItemTableName = $this->fieldMysqlFieldName;",- +TPkgShopListfilterItemNumeric,GetActiveStartValue,"* return active start value. + * + * @return float|false","$sStartValue = false; + if (is_array($this->aActiveFilterData) && array_key_exists( + self::URL_PARAMETER_FILTER_START_VALUE, + $this->aActiveFilterData + ) + ) { + $sStartValue = $this->aActiveFilterData[self::URL_PARAMETER_FILTER_START_VALUE];",- +TPkgShopListfilterItemNumeric,GetActiveEndValue,"* return active end value. + * + * @return float|false","$sEndValue = false; + if (is_array($this->aActiveFilterData) && array_key_exists( + self::URL_PARAMETER_FILTER_END_VALUE, + $this->aActiveFilterData + ) + ) { + $sEndValue = $this->aActiveFilterData[self::URL_PARAMETER_FILTER_END_VALUE];",- +TPkgShopListfilterItemNumeric,GetActiveSettingAsHiddenInputField,"* return setting of element as hidden input fields. + * + * @return string","$sInput = ''; + if (false !== $this->GetActiveStartValue()) { + $sInput .= 'GetURLInputName().'['.self::URL_PARAMETER_FILTER_START_VALUE.']' + ).'"" value=""'.TGlobal::OutHTML($this->GetActiveStartValue()).'"" />';",- +TPkgShopListfilterItemNumeric,GetQueryRestrictionForActiveFilter,"* return the query restriction for active filter. returns false if there + * is no active restriction for this item. + * + * @return string","$sQuery = ''; + $dStartValue = $this->GetActiveStartValue(); + $dEndValue = $this->GetActiveEndValue(); + if ($dStartValue > 0 && $dEndValue > 0) { + $sQuery = ""`shop_article`.`{$this->sItemFieldName",- +TPkgShopListfilterItemPriceSlider,GetOptions,"* return option as assoc array (name=>count). + * + * @return array","$aOptions = $this->GetFromInternalCache('aOptions'); + if (is_null($aOptions)) { + $aOptions = array(); + + // we only care for the max and min value... + $sIdSelect = $this->GetResultSetBaseQuery(); + + $query = ""SELECT MAX(`price`) AS maxprice, MIN(`price`) AS minprice + FROM `shop_article` + INNER JOIN ({$sIdSelect",- +TPkgShopListfilterItemShopAttributeList,GetOptions,"* possible filter config defines. + * + * PKG_SHOP_LISTFILTER_ENABLE_COUNT_PER_FILTER_ITEM -> set to true if you want a count per filter option + * + * PKG_SHOP_LISTFILTER_ATTRIBUTE_FILTER_SELECT_VARIANTS -> set to true if you want the filter to include variants + * + * PKG_SHOP_LISTFILTER_ATTRIBUTE_FILTER_SELECT_VARIANTS_PARENTS -> set to true if you want to include variants and + * show only parent articles in list. If false you have to show variants in article list. + * + * /*","$aOptions = $this->GetFromInternalCache('aOptions'); + if (is_null($aOptions)) { + $aOptions = array(); + $oShopAttribute = $this->GetFieldShopAttribute(); + if (is_object($oShopAttribute)) { + $sIdSelect = $this->GetResultSetBaseQuery(); + // now add the filter from the filter module... + $query = 'CREATE TEMPORARY TABLE `_tmp_category_article` ( + `id` CHAR( 36 ) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL + ) ENGINE = MEMORY'; + MySqlLegacySupport::getInstance()->query($query); + $query = ""INSERT INTO _tmp_category_article (`id`) {$sIdSelect",- +TPkgShopListfilterItemShopAttributeList,GetQueryRestrictionForActiveFilter,"* you need to set this to the table name of the connected table. + * + * @var string","/** @var string|null $sQuery */ + $sQuery = $this->GetFromInternalCache('sQueryRestrictionForActiveFilter'); + + if (null === $sQuery) { + $databaseConnection = $this->getDatabaseConnection(); + $aValues = $this->aActiveFilterData; + if (is_array($aValues) && count($aValues) > 0) { + $sItemListQuery = $this->GetSQLQueryForQueryRestrictionForActiveFilter(); + $aIdList = array(); + if (!empty($sItemListQuery)) { + $tRes = MySqlLegacySupport::getInstance()->query($sItemListQuery); + $aIdList = array(); + while ($aItemRow = MySqlLegacySupport::getInstance()->fetch_assoc($tRes)) { + $aIdList[] = $databaseConnection->quote($aItemRow['source_id']);",- +TPkgShopListfilterItemShopAttributeNumeric,GetActiveStartValue,"* you need to set this to the table name of the connected table. + * + * @var string","$sStartValue = false; + if (is_array($this->aActiveFilterData) && array_key_exists(self::URL_PARAMETER_FILTER_START_VALUE, $this->aActiveFilterData)) { + $sStartValue = $this->aActiveFilterData[self::URL_PARAMETER_FILTER_START_VALUE];",- +TPkgShopListfilterItemShopAttributeNumeric,GetActiveEndValue,"* you need to set this to the field name in the article table (note: the field is not derived from + * the table name since this may differ). + * + * @var string","$sEndValue = false; + if (is_array($this->aActiveFilterData) && array_key_exists(self::URL_PARAMETER_FILTER_END_VALUE, $this->aActiveFilterData)) { + $sEndValue = $this->aActiveFilterData[self::URL_PARAMETER_FILTER_END_VALUE];",- +TPkgShopListfilterItemShopAttributeNumeric,GetMinValue,"* return active start value. + * + * @return float|false",return $this->fieldMinValue;,- +TPkgShopListfilterItemShopAttributeNumeric,GetMaxValue,"* return active end value. + * + * @return float|false",return $this->fieldMaxValue;,- +used,GetItemName,"* base class used to select from a specific variant type. +/*","/** @var array $aLookupList */ + static $aLookupList = array(); + + if (!array_key_exists($aRow['id'], $aLookupList)) { + $aLookupList[$aRow['id']] = array(); + $oVariantType = $this->GetVariantType($aRow); + if ($oVariantType) { + $oArticle = TdbShopArticle::GetNewInstance(); + $oArticle->LoadFromRow($aRow); + + /** @var string[] $aResult */ + $aResult = array(); + $oVariantValues = $oArticle->GetVariantValuesAvailableForType($oVariantType); + if ($oVariantValues) { + while ($oVariantValue = $oVariantValues->Next()) { + if (!empty($oVariantValue->fieldNameGrouped)) { + $aResult[] = $oVariantValue->fieldNameGrouped;",- +used,GetQueryRestrictionForActiveFilter,"* you need to set this to the table name of the connected table. + * + * @var string","/** @var string|null $sQuery */ + $sQuery = $this->GetFromInternalCache('sQueryRestrictionForActiveFilter'); + + if (is_null($sQuery)) { + $aValues = $this->aActiveFilterData; + if (!is_array($aValues)) { + if (empty($aValues)) { + $aValues = array();",- +used,GetOptions,"* you need to set this to the field name in the article table (note: the field is not derived from + * the table name since this may differ). + * + * @var string","$aOptions = $this->GetFromInternalCache('aOptions'); + if (is_null($aOptions)) { + $aOptions = array(); + $sIdSelect = $this->GetResultSetBaseQuery(); + + $databaseConnection = $this->getDatabaseConnection(); + $quotedTargetTableNameField = $databaseConnection->quoteIdentifier($this->GetTargetTableNameField()); + + if (PKG_SHOP_LISTFILTER_ENABLE_COUNT_PER_FILTER_ITEM) { + $sItemQuery = ""SELECT `shop_variant_type_value`.{$quotedTargetTableNameField",- +used,getVariantTypeIds,* @var string,"$aId = array(); + $query = ""SELECT `id` FROM shop_variant_type WHERE `identifier` = '{$this->sVariantTypeIdentifier",- +used,GetAddFilterURL,"* base class used to select from a specific variant type. +/*","$oActiveListfilter = TdbPkgShopListfilter::GetActiveInstance(); + $aURLData = $oActiveListfilter->GetCurrentFilterAsArray(); + if (false == $this->fieldAllowMultiSelection || '' == $sValue) { + if ($this->IsSelected($sValue)) { + unset($aURLData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA][$this->id]);",- +TCMSTableEditor_PkgShopListfilterItem,ProcessFieldsBeforeDisplay,* @property TdbPkgShopListfilterItem $oTable,"parent::ProcessFieldsBeforeDisplay($oFields); + $this->RemoveDisabledFields($oFields);",- +MTPkgShopListfilterCore,__construct,* @var FilterApiInterface,"parent::__construct(); + $this->filterApi = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_shop_list_filter.filter_api');",- +MTPkgShopListfilterCore,Init,"* if this function returns true, then the result of the execute function will be cached. + * + * @return bool","parent::Init(); + //we need to call this here because function could be load static filter (configured in module config) data to post data + TdbPkgShopListfilter::GetActiveInstance();",- +MTPkgShopListfilterCore,Execute,"* return an assoc array of parameters that describe the state of the module. + * + * @return array","parent::Execute(); + $this->data['oFilter'] = TdbPkgShopListfilter::GetActiveInstance(); + + return $this->data;",- +MTPkgShopListfilterCore,_AllowCache,"* if the content that is to be cached comes from the database (as ist most often the case) + * then this function should return an array of assoc arrays that point to the + * tables and records that are associated with the content. one table entry has + * two fields: + * - table - the name of the table + * - id - the record in question. if this is empty, then any record change in that + * table will result in a cache clear. + * + * @return array",return $this->filterApi->allowCache();,- +MTPkgShopListfilterCore,_GetCacheParameters,* @return string[],"$parameters = parent::_GetCacheParameters(); + $listState = $this->filterApi->getCacheParameter(); + $listState['is_filter_module'] = true; + + return array_merge_recursive($parameters, $listState);",- +ResultModification,apply,"* @param ResultInterface $result + * @param array $configuration + * @param int $filterDepth + * + * @return ResultInterface","if (false === $this->listAllowsUseOfPostSearchFilter($configuration, $filterDepth)) { + return $result;",- +ResultModification,applyState,"* @return bool + * + * @param int $filterDepth",return $result;,- +StateRequestExtractor,extract,* {@inheritDoc},"if (false === $this->postSearchFilterEnabled($configuration)) { + return array(); // no need to add state data",- +TPkgShopListfilter_TShopCategory,GetFieldPkgShopListfilterIdRecursive,"* returns the ID of the Listfilter for that is set for this category or one of its ancestors. + * + * @return string","/** @var string|null $sFilterId */ + $sFilterId = $this->GetFromInternalCache('sActingFilterForCategory'); + if (null !== $sFilterId) { + return $sFilterId;",- +TPkgShopListfilter_TShopModuleArticleListFilter,GetListQuery,* @var bool,"$this->bCanBeFiltered = $oListConfig->fieldCanBeFiltered; + + return parent::GetListQuery($oListConfig);",- +Select,setDisabled,@var bool,"$this->disabled = $disabled; + + return $this;",- +Select,getDisabled,@var int[],return $this->disabled;,- +Select,setSelectedOption,@var int,"$this->selectedOption = $selectedOption; + + return $this;",- +Select,getSelectedOption,"* @param bool $disabled + * + * @return Select",return $this->selectedOption;,- +Select,setOptions,* @return bool,"$this->options = $options; + + return $this;",- +Select,addOption,"* @param int $selectedOption + * + * @return Select","$this->options[] = $option; + + return $this;",- +Select,getOptions,* @return int,return $this->options;,- +Slider,setDisabled,"* @var string + * @psalm-var 'true'|'false' + * String representation of the disabled state.","// slider need that as string + $this->disabled = ($disabled) ? 'true' : 'false'; + + return $this;",- +Slider,getDisabled,@var int,return $this->disabled;,- +Slider,setMax,@var int,"$this->max = $max; + + return $this;",- +Slider,getMax,@var int,return $this->max;,- +Slider,setMin,@var int,"$this->min = $min; + + return $this;",- +Slider,getMin,@var int,return $this->min;,- +Slider,setStep,"* @param bool $disabled + * + * @return Slider","$this->step = $step; + + return $this;",- +Slider,getStep,"* @return string + * @psalm-return 'true'|'false'",return $this->step;,- +Slider,setValueHigh,"* @param int $max + * + * @return Slider","$this->valueHigh = $valueHigh; + + return $this;",- +Slider,getValueHigh,* @return int,return $this->valueHigh;,- +Slider,setValueLow,"* @param int $min + * + * @return Slider","$this->valueLow = $valueLow; + + return $this;",- +Slider,getValueLow,* @return int,return $this->valueLow;,- +TPkgShopNewsletterSignupWithOrder_TShopOrder,CreateOrderInDatabaseCompleteHook,"* method can be used to modify the data saved to order before the save is executed. + * + * @param TShopBasket $oBasket + * @param array $aOrderData + * + * @return void","// ------------------------------------------------------------------------ + if ($this->fieldNewsletterSignup && false == $this->fieldCanceled) { + $sMail = $this->fieldUserEmail; + $sUserId = $this->fieldDataExtranetUserId; + // now signup user + + $oNewsletter = null; + if (!empty($sUserId)) { + // try to load by id + $oNewsletter = TdbPkgNewsletterUser::GetNewInstance(); + if (false == $oNewsletter->LoadFromField('data_extranet_user_id', $sUserId)) { + $oNewsletter = null;",- +TPkgShopNewsletterSignupWithOrder_TShopBasket,getUserSelectedNewsletterOptionInOrderStep,* @var bool,return $this->userSelectedNewsletterOptionInOrderStep;,- +TPkgShopNewsletterSignupWithOrder_TShopBasket,setUserSelectedNewsletterOptionInOrderStep,* @return bool,$this->userSelectedNewsletterOptionInOrderStep = $userSelectedNewsletterOptionInOrderStep;,- +ChameleonSystemShopOrderStatusExtension,load,* @return void,"$loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); + $loader->load('services.xml');",- +ChameleonSystemShopOrderStatusExtension,prepend,"* {@inheritdoc} + * + * @return void","$container->prependExtensionConfig('monolog', ['channels' => ['order_status']]);",- +TPkgShopOrderStatusException_OrderStatusCodeNotFound,setShopId,* @var string|null,"$this->shopId = $shopId; + + return $this;",- +TPkgShopOrderStatusException_OrderStatusCodeNotFound,getShopId,* @var string|null,return $this->shopId;,- +TPkgShopOrderStatusException_OrderStatusCodeNotFound,setStatusCode,"* @param string|null $shopId + * + * @return $this","$this->statusCode = $statusCode; + + return $this;",- +TPkgShopOrderStatusException_OrderStatusCodeNotFound,getStatusCode,* @return string|null,return $this->statusCode;,- +TPkgShopOrderStatusException_OrderStatusCodeNotFound,__toString: string,"* @param string|null $statusCode + * + * @return $this","$sString = parent::__toString(); + $sString = $sString.""\n: Status Code "".$this->getStatusCode(); + $sString = $sString.' in shop '.$this->getShopId(); + + return $sString;",- +TPkgShopOrderStatusException_PostOrderStatusAddedExceptions,setOrderStatus,* @var TPkgCmsException[],"$this->orderStatus = $orderStatus; + + return $this;",- +TPkgShopOrderStatusException_PostOrderStatusAddedExceptions,getOrderStatus,* @var TdbShopOrderStatus,return $this->orderStatus;,- +TPkgShopOrderStatusException_PostOrderStatusAddedExceptions,setExceptionList,"* @param TdbShopOrderStatus $orderStatus + * + * @return $this","$this->exceptionList = $exceptionList; + + return $this;",- +TPkgShopOrderStatusException_PostOrderStatusAddedExceptions,getExceptionList,* @return TdbShopOrderStatus,return $this->exceptionList;,- +TPkgShopOrderStatusException_PostOrderStatusAddedExceptions,__toString: string,"* @param TPkgCmsException[] $exceptionList + * + * @return $this","$sString = parent::__toString(); + $sString = $sString.""\n: Status Entry "".$this->getOrderStatus()->sqlData; + + $sString .= ""\nExceptionList: ""; + foreach ($this->getExceptionList() as $exception) { + $sString .= ""\n"".$exception;",- +TPkgShopOrderStatusMapper_Status,GetRequirements,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the + * needed information and returning it. + * + * example: + * + * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); + * $oRequirements->NeedsSourceObject(""bar""); + * $oRequirements->NeedsMappedValue(""baz""); + * + * @param IMapperRequirementsRestricted $oRequirements","$oRequirements->NeedsSourceObject('oObject', 'TdbShopOrderStatus|TdbShopOrder', null, true); + $oRequirements->NeedsSourceObject('local', 'TdbCmsLocals', TdbCmsLocals::GetActive(), true);",- +TPkgShopOrderStatusMapper_Status,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )","* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapperVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager","/** @var TdbCmsLocals $local */ + $local = $oVisitor->GetSourceObject('local'); + + /** @var TdbShopOrderStatus|TdbShopOrder $oStatus */ + $oObject = $oVisitor->GetSourceObject('oObject'); + + if (null === $oObject) { + return;",- +TPkgShopOrderStatusManagerEndPoint,setLogger,"* @var IPkgCmsCoreLog + * + * @deprecated since 6.3.0",$this->logger = $logger;,- +TPkgShopOrderStatusManagerEndPoint,addStatus,"* @param IPkgCmsCoreLog $logger + * + * @deprecated since 6.3.0 - is not supported anymore; use only getShopLogger() or do your own logging + * + * @return void","$this->getShopLogger()->info('add status', array('oData' => $oData)); + $this->validateStatusData($oData); + $this->getShopLogger()->info('status validated ok'); + $aData = $oData->getDataAsTdbArray(); + $oStatus = TdbShopOrderStatus::GetNewInstance($aData); + $oStatus->AllowEditByAll(true); + $oStatus->SaveFieldsFast($aData); + $oStatus->AllowEditByAll(false); + $this->getShopLogger()->info('status saved'); + + $aItems = $oData->getItems(); + $itemCount = count($aItems); + $count = 0; + /** @var TPkgShopOrderStatusItemData $item */ + foreach ($aItems as $item) { + ++$count; + $this->getShopLogger()->info(""process status {$count",- +TPkgShopOrderStatusManagerEndPoint,sendStatusMailToCustomer,"* @return IPkgCmsCoreLog + * + * @deprecated since 6.3.0 - use getShopLogger() instead","$this->getShopLogger()->info('start sendStatusMailToCustomer'); + $statusCode = $oStatus->GetFieldShopOrderStatusCode(); + + if (null !== $statusCode && false === $statusCode->fieldSendMailNotification) { + $this->getShopLogger()->info('no mail needed'); + + return true;",- +TPkgShopOrderStatusDataEndPoint,__construct,* @var TdbShopOrder,"$this + ->setOrder($order) + ->setStatusTimestamp($iStatusTimestamp) + ->setShopOrderStatusCode($shopOrderStatusCode) + ->setInfo($info);",- +TPkgShopOrderStatusDataEndPoint,setInfo,* @var string,"$this->info = $info; + + return $this;",- +TPkgShopOrderStatusDataEndPoint,setOrder,* @var TdbShopOrderStatusCode,"$this->order = $shopOrder; + + return $this;",- +TPkgShopOrderStatusDataEndPoint,setShopOrderStatusCode,* @var int,"$this->shopOrderStatusCode = $shopOrderStatusCode; + + return $this;",- +TPkgShopOrderStatusDataEndPoint,setStatusTimestamp,* @var string|null,"$this->statusTimestamp = $statusTimestamp; + + return $this;",- +TPkgShopOrderStatusDataEndPoint,addItem,* @var TPkgShopOrderStatusItemData[],"$this->items[] = $item; + + return $this;",- +TPkgShopOrderStatusDataEndPoint,getInfo,@var null | \Symfony\Component\HttpFoundation\ParameterBag,return $this->info;,- +TPkgShopOrderStatusDataEndPoint,getOrder,"* @param TdbShopOrder $order + * @param string $shopOrderStatusCode - system_name of shop_order_status_code + * @param int $iStatusTimestamp + * @param string|null $info",return $this->order;,- +TPkgShopOrderStatusDataEndPoint,getShopOrderStatusCode,"* @param string|null $info + * + * @return $this",return $this->shopOrderStatusCode;,- +TPkgShopOrderStatusDataEndPoint,getStatusTimestamp,"* @param \TdbShopOrder $shopOrder + * + * @return $this",return $this->statusTimestamp;,- +TPkgShopOrderStatusDataEndPoint,getItems,"* @param string $shopOrderStatusCode + * + * @return $this",return $this->items;,- +TPkgShopOrderStatusDataEndPoint,getShopOrderStatusCodeObject,"* @param int $statusTimestamp + * + * @return $this","if (true === $bRefresh) { + $this->shopOrderStatusCodeObject = null;",- +TPkgShopOrderStatusDataEndPoint,getStatusData,"* @param TPkgShopOrderStatusItemData $item + * + * @return $this",return $this->statusData;,- +TPkgShopOrderStatusDataEndPoint,setStatusData,* @return string|null,"$this->statusData = $statusData; + + return $this;",- +TPkgShopOrderStatusDataEndPoint,getDataAsTdbArray,* @return \TdbShopOrder,"$data = (null === $this->getStatusData()) ? array() : $this->getStatusData()->all(); + $data = serialize($data); + + return array( + 'shop_order_id' => $this->getOrder()->id, + 'shop_order_status_code_id' => $this->getShopOrderStatusCodeObject()->id, + 'status_date' => date('Y-m-d H:i:s', $this->getStatusTimestamp()), + 'info' => $this->getInfo(), + 'data' => $data, + );",- +TPkgShopOrderStatusItemDataEndPoint,__construct,* @var string,$this->setShopOrderItemId($shopOrderItemId)->setAmount($amount);,- +TPkgShopOrderStatusItemDataEndPoint,getShopOrderItemId,* @var int,return $this->shopOrderItemId;,- +TPkgShopOrderStatusItemDataEndPoint,getAmount,"* @param string $shopOrderItemId + * @param int $amount",return $this->amount;,- +TPkgShopOrderStatusItemDataEndPoint,setAmount,* @return string,"$this->amount = $amount; + + return $this;",- +TPkgShopOrderStatusItemDataEndPoint,setShopOrderItemId,* @return int,"$this->shopOrderItemId = $shopOrderItemId; + + return $this;",- +TPkgShopOrderStatusItemDataEndPoint,getDataAsTdbArray,"* @param int $amount + * + * @return $this","return array( + 'shop_order_status_id' => '', + 'shop_order_item_id' => $this->getShopOrderItemId(), + 'amount' => $this->getAmount(), + );",- +TPkgRunFrontendAction_SendOrderStatusEMail,runAction,"* @param array $aParameter + * + * @return TPkgRunFrontendActionStatus|TdbShopOrderStatus + * + * @psalm-suppress UndefinedPropertyAssignment + * @FIXME Properties `sMessage` and `sMessageType` do not exist on `TdbShopOrderStatus`","$oStatus = new TPkgRunFrontendActionStatus(); + if (isset($aParameter['order_status_id']) && isset($aParameter['order_id']) && !empty($aParameter['order_status_id']) && !empty($aParameter['order_id'])) { + $oStatus = TdbShopOrderStatus::GetNewInstance(); + if ($oStatus->LoadFromFields( + array('shop_order_id' => $aParameter['order_id'], 'id' => $aParameter['order_status_id']) + ) + ) { + $oStatusManager = new TPkgShopOrderStatusManager(); + $bSuccess = $oStatusManager->sendStatusMailToCustomer($oStatus); + if ($bSuccess) { + $oStatus->sMessage = TGlobal::Translate('chameleon_system_shop_order_status.msg.mail_success'); + $oStatus->sMessageType = 'MESSAGE';",- +TPkgShopBasketMapper_TelephoneOrder,GetRequirements,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the + * needed information and returning it. + * + * example: + * + * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); + * $oRequirements->NeedsSourceObject(""bar""); + * $oRequirements->NeedsMappedValue(""baz""); + * + * @param IMapperRequirementsRestricted $oRequirements",,- +TPkgShopBasketMapper_TelephoneOrder,Accept,"* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager + * + * @return","$Step = TdbShopOrderStep::GetStep('user'); + $aLink = array('sLinkURL' => '#telephoneModal', 'sTitle' => TGlobal::Translate('chameleon_system_shop_order_via_phone.action.open_telefon_order_form')); + $oVisitor->SetMappedValue('aLink', $aLink);",- +TPkgShopBasketMapper_TelephoneOrderForm,GetRequirements,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the + * needed information and returning it. + * + * example: + * + * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); + * $oRequirements->NeedsSourceObject(""bar""); + * $oRequirements->NeedsMappedValue(""baz""); + * + * @param IMapperRequirementsRestricted $oRequirements","// Set per default + $oRequirements->NeedsSourceObject('oActiveUser', 'TdbDataExtranetUser', TdbDataExtranetUser::GetInstance()); + $oRequirements->NeedsSourceObject('oActivePage', 'TCMSActivePage', $this->getActivePageService()->getActivePage(), true); + $oRequirements->NeedsSourceObject('oGlobal', 'TGlobal', $oGlobal = TGlobal::instance()); + $oRequirements->NeedsSourceObject('oMessageManager', 'TCMSMessageManager', $oMessageManager = TCMSMessageManager::GetInstance()); + $oRequirements->NeedsSourceObject('oTextBlock', 'TdbPkgCmsTextBlock', TdbPkgCmsTextBlock::GetInstanceFromSystemName('telephone_order_info_text'), true); + $oRequirements->NeedsSourceObject('sName', 'string', 'phone'); + $oRequirements->NeedsSourceObject('sFunction', 'string', 'OrderViaPhone'); + $oRequirements->NeedsSourceObject('sCustomMSGConsumer', 'string', MTShopOrderWizardCore::ORDER_VIA_PHONE_MESSAGE_CONSUMER_NAME); + $oRequirements->NeedsSourceObject('sTelephoneURLParameter', 'string', MTShopOrderWizardCore::ORDER_VIA_PHONE_URL_PARAMETER); + + // Set manually + $oRequirements->NeedsSourceObject('sSpotName', 'string', ''); + $oRequirements->NeedsSourceObject('sTitle', 'string', '', true); + $oRequirements->NeedsSourceObject('sText', 'string', '', true);",- +TPkgShopBasketMapper_TelephoneOrderForm,Accept,"* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager + * + * @return","$oVisitor->SetMappedValue('sSpotName', $oVisitor->GetSourceObject('sSpotName')); + $oVisitor->SetMappedValue('sTitle', $oVisitor->GetSourceObject('sTitle')); + $oVisitor->SetMappedValue('sText', $oVisitor->GetSourceObject('sText')); + $oVisitor->SetMappedValue('sName', $oVisitor->GetSourceObject('sName')); + $oVisitor->SetMappedValue('sFunction', $oVisitor->GetSourceObject('sFunction')); + + $oTextBlock = $oVisitor->GetSourceObject('oTextBlock'); + if (!is_null($oTextBlock)) { + $oVisitor->SetMappedValue('sRawInfoText', $oTextBlock->GetTextField('content'));",- +MTPkgShopOrderViaPhone_MTShopOrderWizard,Init,* @return void,parent::Init();,- +ChameleonSystemShopPaymentIPNExtension,load,"* {@inheritdoc} + * + * @return void","$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); + $loader->load('services.xml');",- +AbstractPkgShopPaymentIPNException,__toString: string,"* @return string + * @psalm-return class-string","$sString = parent::__toString(); + + $sString .= ""\ncalled in ["".$this->getFile().'] on line ['.$this->getLine().']'; + + return $sString;",- +TPkgShopPaymentIPNException_OrderHasNoPaymentGroup,"__construct( + $sOrderId, + $message = '', + $code = 0, + Exception $previous = null + )",* @var string,"$this->orderId = $sOrderId; + parent::__construct($message, $code, $previous);",- +TPkgShopPaymentIPNException_OrderHasNoPaymentGroup,__toString: string,"* @param string $sOrderId + * @param string $message + * @param int $code + * @param Exception|null $previous","$sString = parent::__toString(); + $sString = $sString.""\nOrder-ID: "".$this->getOrderId(); + + return $sString;",- +TPkgShopPaymentIPNException_OrderHasNoPaymentGroup,getOrderId,* @return string,return $this->orderId;,- +TPkgShopPaymentIPNException_InvalidIP,"__construct( + $sRequestIP, + TPkgShopPaymentIPNRequest $oRequest, + $message = '', + $code = 0, + Exception $previous = null + )",@var string,"$this->requestIP = $sRequestIP; + parent::__construct($oRequest, $message, $code, $previous);",- +TPkgShopPaymentIPNException_InvalidIP,__toString: string,"* @param string $sRequestIP + * @param TPkgShopPaymentIPNRequest $oRequest + * @param string $message + * @param int $code + * @param Exception|null $previous","$sString = parent::__toString(); + $sString = $sString.""\nRequest IP: "".$this->getRequestIP(); + + return $sString;",- +TPkgShopPaymentIPNException_InvalidIP,getResponseHeader,"* the header to return to the caller. + * + * @return string",return 'HTTP/1.0 403.6 IP address rejected';,- +TPkgShopPaymentIPNException_InvalidIP,getRequestIP,* @return string,return $this->requestIP;,- +TPkgShopPaymentIPNException_OrderNotFound,"__construct( + $iOrderCmsIdent, + TPkgShopPaymentIPNRequest $oRequest, + $message = '', + $code = 0, + Exception $previous = null + )",@var string|null,"$this->orderCmsIdent = $iOrderCmsIdent; + parent::__construct($oRequest, $message, $code, $previous);",- +TPkgShopPaymentIPNException_OrderNotFound,__toString: string,"* @param string|null $iOrderCmsIdent + * @param TPkgShopPaymentIPNRequest $oRequest + * @param string $message + * @param int $code + * @param Exception|null $previous","$sString = parent::__toString(); + $sString = $sString.""\nOrderCmsIdent: "".$this->getOrderCmsIdent(); + + return $sString;",- +TPkgShopPaymentIPNException_OrderNotFound,getResponseHeader,"* the header to return to the caller. + * + * @return string",return 'HTTP/1.0 404 Not Found';,- +TPkgShopPaymentIPNException_OrderNotFound,getOrderCmsIdent,* @return string|null,return $this->orderCmsIdent;,- +TPkgShopPaymentIPNException_RequestError,"__construct( + TPkgShopPaymentIPNRequest $oRequest, + $message = '', + $code = 0, + Exception $previous = null + )",* @var TPkgShopPaymentIPNRequest|null,"$this->request = $oRequest; + parent::__construct($message, $code, $previous);",- +TPkgShopPaymentIPNException_RequestError,__toString: string,"* @param TPkgShopPaymentIPNRequest $oRequest + * @param string $message + * @param int $code + * @param Exception $previous","$sString = parent::__toString(); + + $sString = $sString.""\nRequestURL: "".$this->getRequest()->getRequestURL().""\nRequestData: "".print_r( + $this->getRequest()->getRequestPayload(), + true + ); + + return $sString;",- +TPkgShopPaymentIPNException_RequestError,getResponseHeader,"* the header to return to the caller. + * + * @return string",return 'HTTP/1.0 403.10 Invalid configuration';,- +TPkgShopPaymentIPNException_RequestError,getRequest,* @return TPkgShopPaymentIPNRequest|null,return $this->request;,- +TPkgShopPaymentIPNException_SystemError,getResponseHeader,"* the header to return to the caller. + * + * @return string",return 'HTTP/1.0 500 Internal Server Error '.$this->getErrorType();,- +TPkgShopPaymentIPNManager,getIPNURL,"* @param TdbCmsPortal $portal + * @param TdbShopOrder $order + * + * @throws TPkgShopPaymentIPNException_OrderHasNoPaymentGroup + * + * @return string","$identifier = $this->getIPNIdentifierFromOrder($order); + if (null === $identifier) { + throw new TPkgShopPaymentIPNException_OrderHasNoPaymentGroup($order->id, 'failed to generate an IPN URL because the payment handler of the order is not assigned to any payment handler group');",- +TPkgShopPaymentIPNRequest,__construct,* @var string,"$this->requestURL = $sURL; + $this->requestPayload = $aRequestPayload;",- +TPkgShopPaymentIPNRequest,isIPNRequest,* @var array,"return false !== stripos($this->getRequestURL(), self::URL_IPN_IDENTIFIER);",- +TPkgShopPaymentIPNRequest,getIpnStatus,* @var TdbShopPaymentHandlerGroup|null,"if (null === $this->oStatus) { + $this->oStatus = $this->getPaymentHandlerGroup()->getIPNStatus($this);",- +TPkgShopPaymentIPNRequest,parseRequest,* @var TdbShopOrder|null,"if (false === $this->isIPNRequest()) { + throw new TPkgShopPaymentIPNException_RequestError($this, ""handleIPN called with an invalid URL (URL: {$this->getRequestURL( + )",- +TPkgShopPaymentIPNRequest,allowRequestFromIP,* @var TdbShopPaymentHandler|IPkgShopPaymentIPNHandler,return $this->getPaymentHandlerGroup()->isValidIP($sRequestIP);,- +TPkgShopPaymentIPNRequest,getRequestURL,* @var TdbPkgShopPaymentIpnStatus,return $this->requestURL;,- +TPkgShopPaymentIPNRequest,getRequestPayload,"* @param string $sURL + * @param array $aRequestPayload",return $this->requestPayload;,- +TPkgShopPaymentIPNRequest,getPaymentHandlerGroup,"* @param array $aRequestPayload + * @param null|string $sSourceCharset + * + * @return array",return $this->paymentHandlerGroup;,- +TPkgShopPaymentIPNRequest,getOrder,* @return bool,return $this->order;,- +TPkgShopPaymentIPNRequest,getPaymentHandler,* @return TdbPkgShopPaymentIpnStatus|null,return $this->paymentHandler;,- +TPkgShopPaymentIpnMessage,replayIPN,"* @return true|string - response string if exists, `true` otherwise","$oRequest = new TPkgShopPaymentIPNRequest($this->fieldRequestUrl, $this->fieldPayload); + $currentRequest = $this->getCurrentRequest(); + + $aData = array( + 'datecreated' => date('Y-m-d H:i:s'), + 'payload' => $this->fieldPayload, + 'success' => '0', + 'completed' => '0', + 'ip' => null === $currentRequest ? '' : $currentRequest->getClientIp(), + 'request_url' => $this->fieldRequestUrl, + 'cms_portal_id' => $this->fieldCmsPortalId, + 'shop_order_id', + ); + $oMessage = TdbPkgShopPaymentIpnMessage::GetNewInstance($aData); + $oMessage->Save(); + + try { + $oRequest->parseRequest($oMessage); + $oStatus = $oRequest->getIpnStatus(); + if (null === $oStatus) { + throw new TPkgShopPaymentIPNException_InvalidStatus($oRequest, 'IPN Request has no status or the status passed is not understood by the payment handler');",- +TPkgShopPaymentIpnTrigger,runTrigger,"* @param TdbPkgShopPaymentIpnMessageTrigger $oMessageTrigger + * + * @return void","$oIpnMessage = $oMessageTrigger->GetFieldPkgShopPaymentIpnMessage(); + + $sURL = $this->fieldTargetUrl; + $aPayload = $oIpnMessage->fieldPayload; + + $oToHost = new TPkgCmsCoreSendToHost($sURL); + $oToHost + ->setPayload($aPayload) + ->setMethod(TPkgCmsCoreSendToHost::METHOD_POST); + + try { + $oToHost->executeRequest(); + if (200 !== $oToHost->getLastResponseCode()) { + throw new TPkgCmsException( + 'IPN invalid response header code ['.$oToHost->getLastResponseCode().'] (expected 200)' + );",- +TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup,isValidIP,"* return true if the ip may send IPN to this payment type. + * + * @param string $sIP + * + * @return bool","$bAllowed = false; + $sIPSource = trim($this->fieldIpnAllowedIps); + if ('' === $sIPSource) { + return true;",- +TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup,handleIPN,"* process the IPN request - the request object contains all details (payment handler, group, order etc) + * the call should return true if processing should continue, false if it is to stop. On Error it should throw an error + * extending AbstractPkgShopPaymentIPNHandlerException. + * + * @param TPkgShopPaymentIPNRequest $oRequest + * + * @trows AbstractPkgShopPaymentIPNHandlerException + * + * @return void","$aHandlerChain = $this->getIPNHandlerChain(); + $this->handleIPNHook($oRequest); + foreach ($aHandlerChain as $sHandler) { + try { + /** @var $oHandler IPkgShopPaymentIPNHandler */ + $oHandler = new $sHandler(); + if (false === $oHandler->handleIPN($oRequest)) { + $this->handleTransactionHook($oHandler, $oRequest); + break;",- +TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup,validateIPNRequestData,@var $oHandler IPkgShopPaymentIPNHandler,return true;,- +TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup,getOrderFromRequestData,"* extend this method if you want to do things for incoming ipn. + * + * @param TPkgShopPaymentIPNRequest $oRequest + * + * @return void",return null;,- +TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup,processRawRequestData,"* trigger transaction for the order based on the IPN. + * + * @param IPkgShopPaymentIPNHandler $oHandler + * @param TPkgShopPaymentIPNRequest $oRequest + * + * @return void",return $aRequestData;,- +TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup,getIPNStatus,"* return an array with names of payment handler (classes that implement IPkgShopPaymentIPNHandler). + * + * @return array",return null;,- +TPkgShopPaymentIPN_TCMSSmartURLHandler,GetPageDef,* @return Request|null,"$oURLData = TCMSSmartURLData::GetActive(); + + $oGlobal = TGlobal::instance(); + $aRawData = $oGlobal->GetRawUserData(); + + $oRequest = new TPkgShopPaymentIPNRequest($oURLData->sRelativeURL, $aRawData); + + if (false === $oRequest->isIPNRequest()) { + return false;",- +TPkgShopPaymentIPN_TCMSTableEditor_PkgShopPaymentIpnMessage,DefineInterface,* adds table-specific buttons to the editor (add them directly to $this->oMenuItems).,"parent::DefineInterface(); + $this->methodCallAllowed[] = 'ReplayIPN';",- +TPkgShopPaymentIPN_TCMSTableEditor_PkgShopPaymentIpnMessage,ReplayIPN,* @return void,"/** @var TdbPkgShopPaymentIpnMessage $oMsg */ + $oMsg = $this->oTable; + + return $oMsg->replayIPN();",- +TPkgShopPaymentIPN_TShopOrder,hasIPNStatusCode,"* returns true if the status code has been sent as an IPN for the order. + * + * @param string $sStatusCode + * + * @return bool","$oStatusCode = TdbPkgShopPaymentIpnMessage::getMessageForOrder($this, $sStatusCode); + $bHasStatusCode = (null !== $oStatusCode); + + return $bHasStatusCode;",- +is,__construct,"* the class is used to transfer data from an IPN to a pkgShopPaymentTransaction + * Class TPkgShopPaymentIPN_TransactionDetails.","$this->amount = $amount; + $this->transactionType = $transactionType; + $this->context = $context; + $this->sequenceNumber = $sequenceNumber; + $this->transactionTimestamp = $iTransactionTimestamp; + $this->resultingBalance = $dBalance;",- +is,getAmount,@var float,return $this->amount;,- +is,getContext,"* @var string + * @psalm-var TPkgShopPaymentTransactionManager::TRANSACTION_TYPE_*",return $this->context;,- +is,getTransactionType,@var string,return $this->transactionType;,- +is,getSequenceNumber,@var string,return $this->sequenceNumber;,- +is,getTransactionTimestamp,@var int,return $this->transactionTimestamp;,- +is,getResultingBalance,@var float|null,return $this->resultingBalance;,- +is,setResultingBalance,"@var array","$this->resultingBalance = $resultingBalance; + + return $this;",- +is,setAdditionalData,"* @param float $amount + * @param string $transactionType - must be a valid type (one of TPkgShopPaymentTransactionManager::TRANSACTION_TYPE_*) + * @param string $context - a string explaining what caused the transaction + * @param string $sequenceNumber + * @param int $iTransactionTimestamp + * @param float $dBalance - if the IPN sends you a balance (amount remaining after transaction) then you can pass it here + * + * @psalm-param TPkgShopPaymentTransactionManager::TRANSACTION_TYPE_* $transactionType",$this->additionalData[$key] = $value;,- +is,getAdditionalData,* @return float,"if (true === isset($this->additionalData[$key])) { + return $this->additionalData[$key];",- +ChameleonSystemShopPaymentTransactionExtension,load,"* {@inheritdoc} + * + * @return void","$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); + $loader->load('services.xml');",- +TPkgShopPaymentTransactionMapper_CollectionFormForOrder,GetRequirements,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the + * needed information and returning it. + * + * example: + * + * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); + * $oRequirements->NeedsSourceObject(""bar""); + * $oRequirements->NeedsMappedValue(""baz""); + * + * @param IMapperRequirementsRestricted $oRequirements","$oRequirements->NeedsSourceObject('order', 'TdbShopOrder'); + $oRequirements->NeedsSourceObject('paymentType'); // must be one of TPkgShopPaymentTransactionData::TYPE_*",- +TPkgShopPaymentTransactionMapper_CollectionFormForOrder,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )","* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapperVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager","/** @var TdbShopOrder $order */ + $order = $oVisitor->GetSourceObject('order'); + + $sTransactionType = $oVisitor->GetSourceObject('paymentType'); + $sHeadline = ''; + switch ($sTransactionType) { + case TPkgShopPaymentTransactionData::TYPE_PAYMENT: + $sHeadline = TGlobal::Translate('chameleon_system_shop_payment_transaction.collection_form.headline_payment'); + break; + case TPkgShopPaymentTransactionData::TYPE_CREDIT: + case TPkgShopPaymentTransactionData::TYPE_PAYMENT_REVERSAL: + $sHeadline = TGlobal::Translate('chameleon_system_shop_payment_transaction.collection_form.headline_refund'); + break; + default: + $sHeadline = TGlobal::Translate('chameleon_system_shop_payment_transaction.error.invalid_transaction_type', array('%sTransactionType%' => $sTransactionType)); + break;",- +TPkgShopPaymentTransactionContextEndPoint,__construct,* @var string,"$this->context = $sContext; + $this->extranetUser = TdbDataExtranetUser::GetInstance(); + $request = $this->getCurrentRequest(); + $this->ip = null === $request ? '' : $request->getClientIp();",- +TPkgShopPaymentTransactionContextEndPoint,getContext,* @var TdbDataExtranetUser,return $this->context;,- +TPkgShopPaymentTransactionContextEndPoint,getExtranetUser,* @var string|null,return $this->extranetUser;,- +TPkgShopPaymentTransactionContextEndPoint,getIp,* @param string $sContext,return $this->ip;,- +TPkgShopPaymentTransactionDataEndPoint,__construct,* @var TdbShopOrder,"$this->setOrder($oOrder) + ->setType($type);",- +TPkgShopPaymentTransactionDataEndPoint,setOrder,* @var float,"$this->order = $order; + + return $this;",- +TPkgShopPaymentTransactionDataEndPoint,setConfirmed,* @var string - one of self::TYPE_*,"$this->confirmed = $confirmed; + + return $this;",- +TPkgShopPaymentTransactionDataEndPoint,setConfirmedTimestamp,* @var TPkgShopPaymentTransactionContext,"$this->confirmedTimestamp = $confirmedTimestamp; + + return $this;",- +TPkgShopPaymentTransactionDataEndPoint,setContext,* @var bool,"$this->context = $context; + + return $this;",- +TPkgShopPaymentTransactionDataEndPoint,addItem,* @var int,"$this->items[] = $item; + + return $this;",- +TPkgShopPaymentTransactionDataEndPoint,setSequenceNumber,* @var int,"$this->sequenceNumber = $sequenceNumber; + + return $this;",- +TPkgShopPaymentTransactionDataEndPoint,setTotalValue,* @var array of TPkgShopPaymentTransactionItemData,"$this->totalValue = $totalValue; + + return $this;",- +TPkgShopPaymentTransactionDataEndPoint,setType,"* use $this->addRequirement to add the requirements of the container. + * + * @return","$this->type = $type; + + return $this;",- +TPkgShopPaymentTransactionDataEndPoint,getConfirmed,"* @param TdbShopOrder $oOrder + * @param string $type - must be one of self::TYPE_*",return $this->confirmed;,- +TPkgShopPaymentTransactionDataEndPoint,getConfirmedTimestamp,"* @param \TdbShopOrder $order + * + * @return $this",return $this->confirmedTimestamp;,- +TPkgShopPaymentTransactionDataEndPoint,getContext,"* @param bool $confirmed + * + * @return $this",return $this->context;,- +TPkgShopPaymentTransactionDataEndPoint,getItems,"* @param int $confirmedTimestamp + * + * @return $this",return $this->items;,- +TPkgShopPaymentTransactionDataEndPoint,getSequenceNumber,"* @param \TPkgShopPaymentTransactionContext $context + * + * @return $this",return $this->sequenceNumber;,- +TPkgShopPaymentTransactionDataEndPoint,getTotalValue,"* @param TPkgShopPaymentTransactionItemData $item + * + * @return $this",return $this->totalValue;,- +TPkgShopPaymentTransactionDataEndPoint,getType,"* @param int $sequenceNumber + * + * @return $this",return $this->type;,- +TPkgShopPaymentTransactionDataEndPoint,getOrder,"* @param float $totalValue + * + * @return $this",return $this->order;,- +TPkgShopPaymentTransactionDataEndPoint,getTotalValueForItemType,"* @param string $type + * + * @return $this","$dTotal = 0; + reset($this->items); + /** @var TPkgShopPaymentTransactionItemData $oItem */ + foreach ($this->items as $oItem) { + if ($sType !== $oItem->getType()) { + continue;",- +TPkgShopPaymentTransactionItemDataEndPoint,setValue,* @var int,"$this->value = $value; + + return $this;",- +TPkgShopPaymentTransactionItemDataEndPoint,setAmount,* @var float,"$this->amount = $amount; + + return $this;",- +TPkgShopPaymentTransactionItemDataEndPoint,setOrderItemId,* @var string,"$this->orderItemId = $orderItemId; + + return $this;",- +TPkgShopPaymentTransactionItemDataEndPoint,setType,* @var string,"$this->type = $type; + + return $this;",- +TPkgShopPaymentTransactionItemDataEndPoint,getValue,* @var TdbShopOrderItem|null,return $this->value;,- +TPkgShopPaymentTransactionItemDataEndPoint,getAmount,"* @param float $value + * + * @return $this",return $this->amount;,- +TPkgShopPaymentTransactionItemDataEndPoint,getOrderItemId,"* @param int $amount + * + * @return $this",return $this->orderItemId;,- +TPkgShopPaymentTransactionItemDataEndPoint,getOrderItem,"* @param string $orderItemId + * + * @return $this","if (null === $this->orderItem && null !== $this->getOrderItemId()) { + $oOrderItem = TdbShopOrderItem::GetNewInstance(); + if (false === $oOrderItem->Load($this->getOrderItemId())) { + $sMsg = ""unable to load the shop_order_item [{$this->getOrderItemId()",- +TPkgShopPaymentTransactionItemDataEndPoint,getType,"* @param string $type - must be one of self::TYPE_* + * + * @return $this",return $this->type;,- +TPkgShopPaymentTransactionManagerEndPoint,__construct,* @param TdbShopOrder $oOrder,$this->order = $oOrder;,- +TPkgShopPaymentTransactionManagerEndPoint,addTransaction,"* important: the transaction will go through no matter what - make sure you validate the amount using getMaxAllowedValueFor + * before calling this method. + * + * @param TPkgShopPaymentTransactionData $transactionData + * + * @return TdbPkgShopPaymentTransaction","$transactionData->checkRequirements(); + + $sTransactionType = $transactionData->getType(); + $amount = $transactionData->getTotalValue(); + $oContext = $transactionData->getContext(); + $iSequenceNumber = $transactionData->getSequenceNumber(); + + $oTransactionType = $this->getTransactionTypeObject($sTransactionType); + + if (null === $iSequenceNumber) { + $iSequenceNumber = $this->getNextTransactionSequenceNumber();",- +TPkgShopPaymentTransactionManagerEndPoint,deleteTransaction,@var SecurityHelperAccess $securityHelper,"$transaction->AllowEditByAll(true); + $transaction->Delete();",- +TPkgShopPaymentTransactionManagerEndPoint,confirmTransactionById,@var TPkgShopPaymentTransactionItemData $oItem,"$oTransaction = TdbPkgShopPaymentTransaction::GetNewInstance(); + if (false === $oTransaction->Load($transactionId)) { + return null;",- +TPkgShopPaymentTransactionManagerEndPoint,confirmTransaction,"* @param TdbPkgShopPaymentTransaction $transaction + * + * @return void","$oTransaction = TdbPkgShopPaymentTransaction::GetNewInstance(); + $loadData = array('shop_order_id' => $this->order->id, 'sequence_number' => $iSequenceNumber); + if (true === $oTransaction->LoadFromFields($loadData)) { + $oTransaction = $this->confirmTransactionObject($oTransaction, $iConfirmedDate);",- +TPkgShopPaymentTransactionManagerEndPoint,confirmTransactionObject,"* searches for a transaction with matching id number and confirms it. returns the transaction if found, null if not. + * + * @param string $transactionId + * @param int $iConfirmedDate + * + * @return TdbPkgShopPaymentTransaction|null","if (false === $transaction->fieldConfirmed) { + $transaction->AllowEditByAll(true); + $transaction->SaveFieldsFast( + array('confirmed' => '1', 'confirmed_date' => date('Y-m-d H:i:s', $iConfirmedDate)) + ); + $transaction->AllowEditByAll(false); + // mark order as paid/unpaid depending on the remaining balance + $this->updateOrderPaidStatusBasedOnCurrentBalance(); + $this->updateRealUsedVoucherValueBasedOnTransactions($transaction);",- +TPkgShopPaymentTransactionManagerEndPoint,getTransactionBalance,"* searches for a transaction with matching sequence number and confirms it. returns the transaction if found, null if not. + * + * @param int $iSequenceNumber + * @param int $iConfirmedDate - unix timestamp + * + * @return \TdbPkgShopPaymentTransaction|null","$dTotal = 0.00; + $sRestriction = ''; + if (false === $bIncludeUnconfirmedTransactions) { + $sRestriction .= "" AND `pkg_shop_payment_transaction`.`confirmed` = '1'"";",- +TPkgShopPaymentTransactionManagerEndPoint,getMaxAllowedValueFor,"* confirm given transaction object. + * + * @param TdbPkgShopPaymentTransaction $transaction + * @param int $iConfirmedDate + * + * @return TdbPkgShopPaymentTransaction","$dMaxValue = 0; + switch ($sTransactionType) { + case self::TRANSACTION_TYPE_PAYMENT: + $currentTransactionBalance = $this->getTransactionBalance(true); + $dMaxValue = $this->order->fieldValueTotal - $currentTransactionBalance; + break; + case self::TRANSACTION_TYPE_PAYMENT_REVERSAL: + case self::TRANSACTION_TYPE_CREDIT: + $dMaxValue = $this->getTransactionBalance(true); + break; + default: + break;",- +TPkgShopPaymentTransactionManagerEndPoint,hasTransactions,"* @param string $sTransactionType + * + * @return TdbPkgShopPaymentTransactionType + * + * @throws TPkgShopPaymentTransactionException_InvalidTransactionType","$iNumberOfTransactions = 0; + $sTransactionTypeRestriction = ''; + if (null !== $sTransactionType) { + $oTransactionType = $this->getTransactionTypeObject($sTransactionType); + $sTransactionId = MySqlLegacySupport::getInstance()->real_escape_string($oTransactionType->id); + $sTransactionTypeRestriction = "" AND `pkg_shop_payment_transaction`.`pkg_shop_payment_transaction_type_id` = '{$sTransactionId",- +TPkgShopPaymentTransactionManagerEndPoint,getBillableProducts,"@var array $aTypeCache","$aProductList = array(); + $oOrderItemList = $this->order->GetFieldShopOrderItemList(); + $oOrderItemList->GoToStart(); + while ($oOrderItem = $oOrderItemList->Next()) { + $iBilled = $this->getProductAmountWithTransactionType( + $oOrderItem->id, + self::TRANSACTION_TYPE_PAYMENT, + $bIncludeUnconfirmedTransactions + ); + $iRemaining = round($oOrderItem->fieldOrderAmount - $iBilled); + if ($iRemaining > 0) { + $aProductList[$oOrderItem->id] = $iRemaining;",- +TPkgShopPaymentTransactionManagerEndPoint,getRefundableProducts,"* changes the paid status of the order (if required) based on the current balance + * returns true if the state of the order was changed. + * + * @return bool","$aProductList = array(); + $oOrderItemList = $this->order->GetFieldShopOrderItemList(); + $oOrderItemList->GoToStart(); + while ($oOrderItem = $oOrderItemList->Next()) { + $iBilled = $this->getProductAmountWithTransactionType( + $oOrderItem->id, + self::TRANSACTION_TYPE_PAYMENT, + false + ); + $iRefunded = $this->getProductAmountWithTransactionType( + $oOrderItem->id, + self::TRANSACTION_TYPE_CREDIT, + $bIncludeUnconfirmedTransactions + ); + $iRefunded += $this->getProductAmountWithTransactionType( + $oOrderItem->id, + self::TRANSACTION_TYPE_PAYMENT_REVERSAL, + $bIncludeUnconfirmedTransactions + ); + $iRefundable = round($iBilled + $iRefunded); + if ($iRefundable > 0) { + $aProductList[$oOrderItem->id] = $iRefundable;",- +TPkgShopPaymentTransactionManagerEndPoint,allProductsAreRefundable,"* returns the balance of all transactions for an order (without the order value). + * + * @param bool $bIncludeUnconfirmedTransactions + * + * @return float","$bProductsHaveBeenRefunded = $this->hasTransactions(self::TRANSACTION_TYPE_PAYMENT_REVERSAL) + || $this->hasTransactions(self::TRANSACTION_TYPE_CREDIT); + if (true === $bProductsHaveBeenRefunded) { + return false;",- +TPkgShopPaymentTransactionManagerEndPoint,"getProductAmountWithTransactionType( + $sOrderItemId, + $sTransactionTypeSystemName, + $bIncludeUnconfirmedTransactions = true + )","* returns the transaction sequence for the next transaction. + * + * @return int","$sTransactionTypeId = $this->getTransactionTypeObject($sTransactionTypeSystemName)->id; + $iTotal = 0; + $sOrderItemId = MySqlLegacySupport::getInstance()->real_escape_string($sOrderItemId); + $sTransactionTypeId = MySqlLegacySupport::getInstance()->real_escape_string($sTransactionTypeId); + $sOrderId = MySqlLegacySupport::getInstance()->real_escape_string($this->order->id); + $sIncompleteRestriction = ''; + if (false === $bIncludeUnconfirmedTransactions) { + $sIncompleteRestriction = "" AND `pkg_shop_payment_transaction`.`confirmed` = '1'"";",- +TPkgShopPaymentTransactionManagerEndPoint,"getTransactionPositionTotalForType( + $sTransactionPositionType, + $bIncludeUnconfirmedTransactions = true + )","* the max value is always an absolute value (ie positive). + * + * @param string $sTransactionType - must be one of self::TRANSACTION_TYPE_* + * + * @return float","$iTotal = 0; + $sOrderId = MySqlLegacySupport::getInstance()->real_escape_string($this->order->id); + $sIncompleteRestriction = ''; + if (false === $bIncludeUnconfirmedTransactions) { + $sIncompleteRestriction = "" AND `pkg_shop_payment_transaction`.`confirmed` = '1'"";",- +TPkgShopPaymentTransactionManagerEndPoint,"getTransactionDataFromOrder( + $sTransactionType = TPkgShopPaymentTransactionData::TYPE_PAYMENT, + $aProductAmountRestriction = null, + $bUseConfirmedTransactionsOnly = true + )","* returns true if there are transactions for the order (pending or not). + * + * @param null|string $sTransactionType - must be one of self::TRANSACTION_TYPE_* + * @psalm-param null|self::TRANSACTION_TYPE_* $sTransactionType + * + * @return bool","$dSignMultiplier = 1; + if (TPkgShopPaymentTransactionData::TYPE_PAYMENT === $sTransactionType) { + $aItemBaseToUse = $this->getBillableProducts($bUseConfirmedTransactionsOnly);",- +TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,DefineInterface,* @return void,"parent::DefineInterface(); + + if (false === $this->allowTransactions()) { + return;",- +TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,paymentTransactionCollectAll,* @return void,"if (false === $this->allowTransactions()) { + return;",- +TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,paymentTransactionRefundAll,@var TdbShopOrder $oOrder,"if (false === $this->allowTransactions()) { + return;",- +TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,pkgShopPaymentTransaction_PartialDebit,@var PaymentHandlerWithTransactionSupportInterface|\TdbShopPaymentHandler $paymentHandler,"if (false === $this->allowTransactions()) { + return;",- +TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,pkgShopPaymentTransaction_getPartialCollectForm,* @return void,"$oViewRenderer = new ViewRenderer(); + $oViewRenderer->AddMapper(new TPkgShopPaymentTransactionMapper_CollectionFormForOrder()); + $oViewRenderer->AddSourceObject('order', $this->oTable); + $oViewRenderer->AddSourceObject('paymentType', TPkgShopPaymentTransactionData::TYPE_PAYMENT); + + return $oViewRenderer->Render('pkgShopPaymentTransaction/collection-form.html.twig');",- +TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,pkgShopPaymentTransaction_getPartialRefundForm,@var TdbShopOrder $oOrder,"$oViewRenderer = new ViewRenderer(); + $oViewRenderer->AddMapper(new TPkgShopPaymentTransactionMapper_CollectionFormForOrder()); + $oViewRenderer->AddSourceObject('order', $this->oTable); + $oViewRenderer->AddSourceObject('paymentType', TPkgShopPaymentTransactionData::TYPE_CREDIT); + + return $oViewRenderer->Render('pkgShopPaymentTransaction/collection-form.html.twig');",- +TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,GetHtmlHeadIncludes,@var PaymentHandlerWithTransactionSupportInterface&\TdbShopPaymentHandler $paymentHandler,"$aIncludes = parent::GetHtmlHeadIncludes(); + + $aIncludesFromPackage = $this->getViewRendererSnippetDirectory()->getResourcesForSnippetPackage( + 'pkgShopPaymentTransaction' + ); + $aIncludes = array_merge($aIncludes, $aIncludesFromPackage); + + return $aIncludes;",- +PaymentTransactionHelper,getProductsCaptureOnOrderCreation,* {@inheritdoc},"$orderItems = $order->GetFieldShopOrderItemList(); + $orderItems->GoToStart(); + $captureItems = array(); + while ($orderedProduct = $orderItems->Next()) { + if (false === $isCaptureOnShipment || false === $this->allowProductCaptureOnShipment($orderedProduct)) { + $captureItems[$orderedProduct->id] = $orderedProduct->fieldOrderAmount;",- +PaymentTransactionHelper,getProductsCaptureOnShipping,* {@inheritdoc},"if (false === $isCaptureOnShipment) { + return array();",- +PaymentTransactionHelper,allowProductCaptureOnShipment,* {@inheritdoc},return false === $orderedProduct->isDownload();,- +TPkgShopPrimaryNavigationMapper_StandardNavi,GetRequirements,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the + * needed information and returning it. + * + * example: + * + * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); + * $oRequirements->NeedsSourceObject(""bar""); + * $oRequirements->NeedsMappedValue(""baz""); + * + * @param IMapperRequirementsRestricted $oRequirements","$oRequirements->NeedsSourceObject('oPortal', 'TdbCmsPortal');",- +TPkgShopPrimaryNavigationMapper_StandardNavi,Accept,"* To map values from models to views the mapper has to implement iVisitable. + * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. + * + * The mapper has to fill the values it is responsible for in the visitor. + * + * example: + * + * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); + * $oVisitor->SetMapperValue(""foo"", $foo); + * + * + * To be able to access the desired source object in the visitor, the mapper has + * to declare this requirement in its GetRequirements method (see IViewMapper) + * + * @param \IMapperVisitorRestricted $oVisitor + * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger + * @param IMapperCacheTriggerRestricted $oCacheTriggerManager + * + * @return","/** @var $oPortal TdbCmsPortal */ + $oPortal = $oVisitor->GetSourceObject('oPortal'); + + $oNodeList = TdbPkgShopPrimaryNaviList::GetListForCmsPortalId($oPortal->id); + + $aTree = array(); + while ($oNode = $oNodeList->Next()) { + $aTree[] = $oNode->getPkgCmsNavigationNodeObject();",- +TPkgShopPrimaryNavi,getPkgCmsNavigationNodeObject,* @return AbstractPkgCmsNavigationNode|null,"$oNaviNode = null; + if (true === empty($this->fieldTarget)) { + return $oNaviNode;",- +TPkgShopPrimaryNavigation_TPkgCmsNavigationNodeWithRootShopCategoriesAsChildren,getAChildren,* @return AbstractPkgCmsNavigationNode[]|null,"if (true === $this->bDisableSubmenu) { + return null;",- +TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category,load,* @extends AbstractPkgCmsNavigationNode,"$category = TdbShopCategory::GetNewInstance($sId); + if (false === $category->AllowDisplayInShop() || false == $category->fieldActive) { + return false;",- +TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category,loadFromNode,"* @param string $sId - shop category id + * + * @return bool","if (false === $oNode->fieldActive) { + return false;",- +TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category,getAChildren,"* @param TdbShopCategory $oNode + * + * @return bool","if (true === $this->bDisableSubmenu) { + return null;",- +TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category,getBIsActive,* @return AbstractPkgCmsNavigationNode[]|null,"if (null === $this->bIsActive) { + $this->bIsActive = false; + /** @var $oNode TdbShopCategory */ + $oNode = $this->getNodeCopy(); + $oActiveCategory = TdbShop::GetInstance()->GetActiveCategory(); + if ($oActiveCategory && $oNode && $oActiveCategory->id === $oNode->id) { + $this->bIsActive = true;",- +TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category,getBIsExpanded,@var $oNode TdbShopCategory,"if (null === $this->bIsExpanded) { + $this->bIsExpanded = $this->getBIsActive(); + if (false === $this->bIsExpanded) { + /** @var $oNode TdbShopCategory */ + $oNode = $this->getNodeCopy(); + $aCategoryPath = TdbShop::GetInstance()->GetActiveCategoryPath(); + if ($oNode && is_array($aCategoryPath) && isset($aCategoryPath[$oNode->id])) { + $this->bIsExpanded = true;",- +TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category,getNodeIconURL,@var TdbShopCategory[] $categoryList,"$sURL = null; + /** @var $oNode TdbShopCategory */ + $oNode = $this->getNodeCopy(); + $oImage = $oNode->GetImage(0, 'navi_icon_cms_media_id', $this->dummyImagesAllowed()); + if ($oImage) { + $sURL = $oImage->GetRelativeURL(); + $this->sNavigationIconId = $oImage->id;",- +TPkgShopPrimaryNavigation_TShop,GetFieldShopPrimaryNaviList,* @var TdbPkgShopPrimaryNaviList[],"$activePortal = self::getPortalDomainService()->getActivePortal(); + if (null === $activePortal) { + if (false === isset($this->primaryNavigationList['no-portal'])) { + $this->primaryNavigationList['no-portal'] = TdbPkgShopPrimaryNaviList::GetList();",- +MTPkgShopPrimaryNavigation,Accept,* {@inheritdoc},"$activePortal = $this->getPortalDomainService()->getActivePortal(); + if ($bCachingEnabled) { + $oCacheTriggerManager->addTrigger($activePortal->table, $activePortal->id);",- +MTPkgShopPrimaryNavigation,_AllowCache,* @return null|string,return true;,- +MTPkgShopPrimaryNavigation,_GetCacheParameters,@var ActivePageServiceInterface $activePageService,"$parameters = parent::_GetCacheParameters(); + + $parameters['sActivePageId'] = $this->getActivePageId(); + + $parameters['activeUserGroups'] = implode(',', $this->getActiveUserGroups()); + $parameters['activeCategoryId'] = $this->getActiveCategoryId(); + + return $parameters;",- +ChameleonSystemShopProductExportBundle,build,* @return void,"parent::build($container); + $container->addCompilerPass(new ExportHandlerPass());",- +ShopProductExporter,"__construct( + ResultFactoryInterface $resultFactory, + ShopServiceInterface $activeShopService, + StateFactoryInterface $stateFactory + )",* @var \ChameleonSystem\ShopBundle\objects\ArticleList\Interfaces\ResultFactoryInterface,"$this->resultFactory = $resultFactory; + $shopConfig = $activeShopService->getConfiguration(); + $this->validShopExportKey = $shopConfig['export_key']; + $this->stateFactory = $stateFactory;",- +ShopProductExporter,registerHandler,* @var ShopProductExportHandlerInterface[],$this->exportHandler[$alias] = $exportHandler;,- +ShopProductExporter,isValidExportKey,* @var string,return $exportKey === $this->validShopExportKey;,- +ShopProductExporter,export,* @var StateFactoryInterface,"if (false === $this->aliasExists($alias)) { + throw new \ErrorException(""alias [{$alias",- +ShopProductExporter,aliasExists,"* @param ResultFactoryInterface $resultFactory + * @param ShopServiceInterface $activeShopService + * @param StateFactoryInterface $stateFactory","return array_key_exists($alias, $this->exportHandler);",- +ChameleonSystemShopProductExportExtension,load,* @return void,"$loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); + $loader->load('services.xml');",- +ExportHandlerPass,process,"* You can modify the container here before it is dumped to PHP code. + * + * @param ContainerBuilder $container + * + * @api + * + * @return void","$exporter = $container->getDefinition('chameleon_system_shop_product_export.exporter'); + $exportHandlerIds = $container->findTaggedServiceIds('chameleon_system_shop_product_export.export_handler'); + $aliasRegistered = array(); + foreach ($exportHandlerIds as $exportHandlerId => $tagAttributes) { + foreach ($tagAttributes as $attributes) { + $alias = (isset($attributes['alias'])) ? $attributes['alias'] : null; + if (null === $alias) { + throw new \ErrorException(""the service {$exportHandlerId",- +ShopProductExportModule,__construct,* @var string,"parent::__construct(); + + $this->productExporter = $productExporter; + $this->dbAdapter = $dbAdapter; + $this->inputFilterUtil = $inputFilterUtil; + $this->cacheDir = $cacheDir;",- +ShopProductExportModule,Init,* @var string,"parent::Init(); + + $this->loadConfiguration(); + $this->getStateDataFromRequest(); + + if (false === is_dir($this->cacheDir)) { + if (!@mkdir($this->cacheDir, 0777, true) && !is_dir($this->cacheDir)) { + throw new ErrorException(sprintf('failed to create cache folder: %s', $this->cacheDir));",- +ShopProductExportModule,"Accept( + IMapperVisitorRestricted $oVisitor, + $bCachingEnabled, + IMapperCacheTriggerRestricted $oCacheTriggerManager + )",* @var \ChameleonSystem\ShopProductExportBundle\Interfaces\ShopProductExporterInterface,"$responseData = array( + 'exportData' => null, + 'error' => false, + 'spotName' => $this->sModuleSpotName, + ); + + if (false === $this->productExporter->aliasExists($this->exportView)) { + $responseData['error'] = 'no-view';",- +ShopProductExportModule,_AllowCache,* @var \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\DbAdapterInterface,return false;,- +TPkgShopProductExportBaseEndPoint,Init,"* article list loaded by module or something else that calls this class. + * + * @var TIterator|null",,- +TPkgShopProductExportBaseEndPoint,Run,"* absolute path to the cache file. + * + * @var string|null","$bSuccess = false; + + set_time_limit(1800); + $this->getCache()->disable(); + TCacheManagerRuntimeCache::SetEnableAutoCaching(false); + if ($this->Prepare()) { + $bSuccess = $this->Perform();",- +TPkgShopProductExportBaseEndPoint,getAttributeName,"* false if the export is in cache so load the cache file and pass it to the output + * true if there is no cache enabled or cache item is out of date. + * + * @var bool","/** @var array $aAttributesForSystemNames */ + static $aAttributesForSystemNames = null; + + /** @var array $aAttributesForIds */ + static $aAttributesForIds = null; + + if (null === $aAttributesForSystemNames && null === $aAttributesForIds) { + $oAttributesList = TdbShopAttributeList::GetList(); + while ($oAttribute = $oAttributesList->Next()) { + $sName = $oAttribute->GetName(); + $aAttributesForSystemNames[$oAttribute->fieldSystemName] = $sName; + $aAttributesForIds[$oAttribute->id] = $sName;",- +TPkgShopProductExportBaseEndPoint,"GetArticleAttributeValueListForAttributeNames( + $oArticle, + $aAttributeNames, + $sFieldName = 'system_name' + )","* only set if cached file is set - output will be written into file instead of output buffer. + * + * @var bool|resource","$aList = array(); + foreach ($aAttributeNames as $sAttributeName) { + $aList[$sAttributeName] = $this->GetArticleAttributeValueForAttributeName( + $oArticle, + $sAttributeName, + $sFieldName, + false + );",- +TPkgShopProductExportBaseEndPoint,SetArticleList,"* set to true on debug state. + * + * @var bool",$this->oArticleList = $oArticleList;,- +TPkgShopProductExportBaseEndPoint,GetArticleList,"* key will be accessed by exports - value should be system_name of the attribute that will be fetched. + * + * @var array",return $this->oArticleList;,- +TPkgShopProductExportBaseEndPoint,GetCacheFile,"* hook is called before an article is exported. + * + * @param TdbShopArticle $oArticle + * + * @return TdbShopArticle",return $this->sCacheFile;,- +TPkgShopProductExportBaseEndPoint,GetGenerateFile,"* do any initialization work that needs to be done before you want to run the export. + * + * @return void",return $this->bGenerateFile;,- +TPkgShopProductExportBaseEndPoint,SetDebug,"* Run the export. returns true if the export was successful, otherwise false + * this method should not be overwritten in child classes. + * + * @return bool + * @final",$this->bDebug = $bDebug;,- +TPkgShopProductExportBaseEndPoint,GetDebug,"* prepare the export - setup temp tables etc + * return false if the preparation failed. + * + * @return bool",return $this->bDebug;,- +TPkgShopProductExportBaseEndPoint,GetAllowedAttributes,"* method is called once on prepare of export + * set attributes system names specific keys that will be used by exports + * by default we set the ean and mpnr + * you can overwrite these keys (and add custom keys) with the help of the virtual class manager. + * + * e.g.$this->aAttributes['brand'] = 'hersteller'; + * + * @return void","static $aAttributes = null; + + if (null === $aAttributes) { + $aAttributes = array(); + $oAttributeList = TdbShopAttributeList::GetList(); + $oAttributeList->GoToStart(); + while ($oAttribute = $oAttributeList->Next()) { + $aAttributes[] = $oAttribute->fieldSystemName;",- +TCMSFieldText_ShowExportURL,GetExportURLList,"* varchar field with javascript to set the blog post url onblur. + * /*","$sReturn = ''; + if (isset($this->oTableRow) && $this->oTableRow instanceof TdbShop) { + /* @var $oShop TdbShop */ + $oShop = $this->oTableRow; + $oPortalList = $oShop->GetFieldCmsPortalList(); + $systemPageService = $this->getSystemPageService(); + while ($oPortal = $oPortalList->Next()) { + $sExportPageURL = $systemPageService->getLinkToSystemPageRelative('productexport', array(), $oPortal); + if (strstr($sExportPageURL, 'javascript:alert')) { + $sReturn = '

'.TGlobal::OutHTML(TGlobal::Translate('chameleon_system_shop_product_export.field_show_export_url.error_export_page_missing')).'
'; + continue;",- +TCMSFieldText_ShowExportURL,GetHTML,"* sets methods that are allowed to be called via URL (ajax call). + * + * @return void","$sHtml = parent::GetHTML(); + $sHtml .= 'getTranslator()->trans('chameleon_system_shop_product_export.field_show_export_url.show_list_button_title')).'""/>'; + $sHtml .= '
'; + $sHtml .= "" + ""; + return $aIncludes;",- +for,_AllowCache,"* Select right RatingService object. + * + * @return TdbPkgShopRatingService|null",return false;,- +for,_GetCacheTableInfos,"* loads config for instance. + * + * @return TdbPkgShopRatingServiceWidgetConfig|null","$aTrigger = parent::_GetCacheTableInfos(); + if (!is_array($aTrigger)) { + $aTrigger = array();",- +for,Execute,"* Module class for RatingTeaser-Module. + * +/*","parent::Execute(); + $this->data['oModuleConfig'] = $this->GetModuleConfig(); + $oItem = $this->GetRatingItem(); + if ($oItem) { + $this->data['sRatingItemContent'] = $oItem->Render();",- +for,_AllowCache,* @var TdbPkgShopRatingServiceTeaserCnf|null,return false;,- +for,_GetCacheTableInfos,"* Select one (random) rating item. + * + * @return TdbPkgShopRatingServiceRating|null","$aTrigger = parent::_GetCacheTableInfos(); + if (!is_array($aTrigger)) { + $aTrigger = array();",- +ChameleonSystemShopWishlistExtension,load,"* {@inheritdoc} + * + * @return void","$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); + $loader->load('services.xml');",- +TCMSCronJob_CleanWishlist,__construct,* @return void,parent::__construct();,- +TPkgShopWishlist,AddArticle,"* adds an article to the wishlist - returns the new amount of that article on the list. + * + * @param string $sArticleId + * @param float $dAmount + * @param string $sComment - optional comment + * + * @return float","$dNewAmount = 0; + $aItemData = array(); + $oItem = TdbPkgShopWishlistArticle::GetNewInstance(); + /** @var $oItem TdbPkgShopWishlistArticle */ + if ($oItem->LoadFromFields(array('pkg_shop_wishlist_id' => $this->id, 'shop_article_id' => $sArticleId))) { + $aItemData = $oItem->sqlData; + $aItemData['amount'] += $dAmount;",- +TPkgShopWishlist,GetMsgConsumerName,@var $oItem TdbPkgShopWishlistArticle,return TdbPkgShopWishlist::MSG_CONSUMER_BASE_NAME.$this->id;,- +TPkgShopWishlist,Render,"* return the msg consumer name for the wishlist instance. + * + * @return string","$oView = new TViewParser(); + $oMsgManager = TCMSMessageManager::GetInstance(); + $sMessages = ''; + if ($oMsgManager->ConsumerHasMessages($this->GetMsgConsumerName())) { + $sMessages = $oMsgManager->RenderMessages($this->GetMsgConsumerName());",- +TPkgShopWishlist,GetLink,"* render the filter. + * + * @param string $sViewName - name of the view + * @param string $sViewType - where to look for the view + * @param array $aCallTimeVars - optional parameters to pass to render method + * + * @return string","if (!empty($sMode)) { + $aAdditionalParameter[MTPkgShopWishlistCore::URL_MODE_PARAMETER_NAME] = $sMode;",- +TPkgShopWishlist,GetPublicLink,"* return link to the private view of the wishlist. + * + * @param string $sMode - select a mode of the wishlist (such as SendForm) + * @param array $aAdditionalParameter + * + * @return string","$oShopConfig = TdbShop::GetInstance(); + $aAdditionalParameter[MTPkgShopWishlistPublicCore::URL_PARAMETER_NAME] = array('id' => $this->id); + + return $oShopConfig->GetLinkToSystemPage('wishlist-public', $aAdditionalParameter, true);",- +TPkgShopWishlist,GetNumberOfItemsInList,"* return the public link to the wishlist. + * + * @param array $aAdditionalParameter + * + * @return string","$oWishlistItems = $this->GetFieldPkgShopWishlistArticleList(); + + return $oWishlistItems->Length();",- +TPkgShopWishlist,GetFieldPkgShopWishlistArticleList,"* returns the number of wishlist items on the list. + * + * @return int","$oWishlistItems = $this->GetFromInternalCache('oPkgShopWishlistArticleList'); + if (is_null($oWishlistItems)) { + $oWishlistItems = TdbPkgShopWishlistArticleList::GetListForPkgShopWishlistId($this->id, $this->iLanguageId); + $oWishlistItems->bAllowItemCache = true; + $this->SetInternalCache('oPkgShopWishlistArticleList', $oWishlistItems);",- +TPkgShopWishlist,GetFieldPkgShopWishlistMailHistoryList,"* Artikel der Wunschliste. + * + * @return TdbPkgShopWishlistArticleList","$oWishlistHistoryItems = $this->GetFromInternalCache('oPkgShopWishlistMailHistoryList'); + if (is_null($oWishlistHistoryItems)) { + $oWishlistHistoryItems = TdbPkgShopWishlistMailHistoryList::GetListForPkgShopWishlistId($this->id, $this->iLanguageId); + $oWishlistHistoryItems->bAllowItemCache = true; + $this->SetInternalCache('oPkgShopWishlistMailHistoryList', $oWishlistHistoryItems);",- +TPkgShopWishlist,GetDescriptionAsHTML,"* Wunschslisten Mailhistory. + * + * @return TdbPkgShopWishlistMailHistoryList","$sText = trim($this->fieldDescription); + $sText = TGlobal::OutHTML($sText); + $sText = nl2br($sText); + + return $sText;",- +TPkgShopWishlist,SendPerMail,"* use this method to add any variables to the render method that you may + * require for some view. + * + * @param string $sViewName - the view being requested + * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) + * + * @return array","$bSendSuccess = false; + $oOwner = $this->GetFieldDataExtranetUser(); + $oMail = TdbDataMailProfile::GetProfile('SendWishlist'); + $aMailData = array('to_name' => $sToName, 'to_mail' => $sToMail, 'comment' => $sComment, 'sWishlistURL' => $this->GetPublicLink()); + $oMail->AddDataArray($aMailData); + $aUserData = $oOwner->GetObjectPropertiesAsArray(); + $oMail->AddDataArray($aUserData); + $oMail->ChangeFromAddress($oOwner->GetUserEMail(), $oOwner->fieldFirstname.' '.$oOwner->fieldLastname); + $oMail->ChangeToAddress($sToMail, $sToName); + if ($oMail->SendUsingObjectView('emails', 'Customer')) { + $bSendSuccess = true; + $oHistory = TdbPkgShopWishlistMailHistory::GetNewInstance(); + /** @var $oHistory TdbPkgShopWishlistMailHistory */ + $aData = array('to_name' => $sToName, 'to_email' => $sToMail, 'comment' => $sComment, 'datesend' => date('Y-m-d H:i:s'), 'pkg_shop_wishlist_id' => $this->id); + $oHistory->LoadFromRow($aData); + $oHistory->AllowEditByAll(true); + $oHistory->Save();",- +TPkgShopWishlistArticle,GetCommentAsHTML,"* return comment text as html. + * + * @return string","$sText = trim($this->fieldComment); + $sText = TGlobal::OutHTML($sText); + $sText = nl2br($sText); + + return $sText;",- +TPkgShopWishlistArticle,GetRemoveFromWishlistLink,"* get link to remove item from wishlist. + * + * @param bool $bIncludePortalLink + * + * @return string","$oShopConfig = TdbShop::GetInstance(); + $aParameters = array('module_fnc['.$oShopConfig->GetBasketModuleSpotName().']' => 'RemoveFromWishlist', MTShopBasketCore::URL_ITEM_ID => $this->id, MTShopBasketCore::URL_MESSAGE_CONSUMER => MTShopBasketCore::MSG_CONSUMER_NAME); + + return $this->getActivePageService()->getLinkToActivePageRelative($aParameters);",- +TShopWishlistArticle,GetToWishlistLink,"* return the link that can be used to add the article to the users wishlist. + * + * @param bool $bIncludePortalLink + * @param bool $bRedirectToLoginPage + * + * @return string","$oShopConfig = TdbShop::GetInstance(); + + $aParameters = array('module_fnc['.$oShopConfig->GetBasketModuleSpotName().']' => 'AddToWishlist', MTShopBasketCore::URL_ITEM_ID => $this->id, MTShopBasketCore::URL_ITEM_AMOUNT => 1, MTShopBasketCore::URL_MESSAGE_CONSUMER => $this->GetMessageConsumerName()); + + $aIncludeParams = TdbShop::GetURLPageStateParameters(); + $oGlobal = TGlobal::instance(); + foreach ($aIncludeParams as $sKeyName) { + if ($oGlobal->UserDataExists($sKeyName) && !array_key_exists($sKeyName, $aParameters)) { + $aParameters[$sKeyName] = $oGlobal->GetUserData($sKeyName);",- +MTPkgShopWishlistCore,Init,* controlls the mode of the module.,"parent::Init(); + $this->aUserInput = $this->global->GetUserData(TdbPkgShopWishlist::URL_PARAMETER_FILTER_DATA); + if ($this->global->userdataExists(self::URL_MODE_PARAMETER_NAME)) { + $aAllowedModes = array('', 'SendForm'); + $sMode = $this->global->GetUserData(self::URL_MODE_PARAMETER_NAME); + if (in_array($sMode, $aAllowedModes)) { + $this->sActiveMode = $sMode;",- +MTPkgShopWishlistCore,Execute,* @var string,"parent::Execute(); + if (!empty($this->sActiveMode)) { + switch ($this->sActiveMode) { + case 'SendForm': + $this->ExecuteSendFormMode(); + break; + default: + break;",- +MTPkgShopWishlistPublicCore,Init,"* module is used to allow a user to search for public wishlist, and to display + * the detailpage of a wishlist when given the lists id. +/*","parent::Init(); + if ($this->global->userdataExists(self::URL_PARAMETER_NAME)) { + $this->aUserInput = $this->global->GetUserData(self::URL_PARAMETER_NAME); + if (!is_array($this->aUserInput)) { + $this->aUserInput = array();",- +MTPkgShopWishlistPublicCore,Execute,"* active wishlist if there is one. + * + * @var TdbPkgShopWishlist","parent::Execute(); + $this->data['oActiveWishlist'] = $this->oActiveWishlist; + + return $this->data;",- +MTShopWishlistBasketCore,GetHtmlHeadIncludes,"* Adds the article passed to the wishlist of the user (if the user is logged in). + * + * @param string $sArticleId + * @param float $dAmount + * @param string $sMessageHandler + * @param bool $bIsInternalCall + * + * @return void","$aIncludes = parent::GetHtmlHeadIncludes(); + $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgShop/shopBasket')); + + return $aIncludes;",- +TShopWishlistDataExtranetUser,AddArticleIdToWishlist,"* add an article to the wishlist. + * + * @param string $sArticleId + * @param float $dAmount + * + * @return float - new amount on list","$dNewAmountOnList = 0; + $oWishlist = $this->GetWishlist(true); + $dNewAmountOnList = $oWishlist->AddArticle($sArticleId, $dAmount); + + return $dNewAmountOnList;",- +TShopWishlistDataExtranetUser,RemoveArticleFromWishlist,"* remove an article form the wishlist. + * + * @param string $sPkgShopWishlistArticleId - the id of the item on the list + * + * @return void","$oWishlist = $this->GetWishlist(true); + $oWishlistItem = TdbPkgShopWishlistArticle::GetNewInstance(); + /** @var $oWishlistItem TdbPkgShopWishlistArticle */ + if ($oWishlistItem->LoadFromFields(array('pkg_shop_wishlist_id' => $oWishlist->id, 'id' => $sPkgShopWishlistArticleId))) { + $oWishlistItem->AllowEditByAll(true); + $oWishlistItem->Delete();",- +TShopWishlistDataExtranetUser,GetWishlist,@var $oWishlistItem TdbPkgShopWishlistArticle,"/** @var TdbPkgShopWishlist|null $oWishlist */ + $oWishlist = $this->GetFromInternalCache('oUserWishlist'); + + if (is_null($oWishlist)) { + $oWishlists = $this->GetFieldPkgShopWishlistList(); + if ($oWishlists->Length() > 0) { + /** @var TdbPkgShopWishlist $oWishlist */ + $oWishlist = $oWishlists->Current();",-