Merchant ID and in some request also account ID is prepeneded. Moreover,
SOAP request must not contain DateTime timestamps: They must be cast as
strings.

@throws BadMethodCallException
552711
public function toSoapRequestArray(): array
	{
		$configArray = $this->configArray();
		$data = parent::toArray();
		$withConfig = array_merge($configArray, $data);

		return DateTimeDeflater::processWithPaths(
			$withConfig,
			static::$dateTimePaths
		);
	}
164918
public function send()
    {
        if (!$this->_user->has('email') || !$this->_user->has('name')) {
            throw new BadMethodCallException(__d('user', 'Missing "name" or "email" property when trying to send the email.'));
        }

        if ($this->config('updateToken') === true) {
            $this->loadModel('User.Users');
            $this->_user->updateToken();
        }

        $subject = $this->_parseVariables((string)$this->subject());
        $body = $this->_parseVariables((string)$this->body());

        if (empty($subject) || empty($body)) {
            return false;
        }

        $sender = new Email($this->config('emailConfig'));
        $sent = false;
        try {
            $sent = $sender
                ->to($this->_user->get('email'), $this->_user->get('name'))
                ->subject($subject)
                ->send($body);
        } catch (\Exception $e) {
            return false;
        }

        return $sent;
    }
1089181
public function set($id, $service)
    {
        $id = (string) $id;

        if ($this->isCompiled() && (isset($this->definitions[$id]) && !$this->definitions[$id]->isSynthetic())) {
            // setting a synthetic service on a compiled container is alright
            throw new BadMethodCallException(sprintf('Setting service "%s" for an unknown or non-synthetic service definition on a compiled container is not allowed.', $id));
        }

        unset($this->definitions[$id], $this->aliasDefinitions[$id], $this->removedIds[$id]);

        parent::set($id, $service);
    }
1360144
protected function verifyPayment()
    {
        $fields = array(
            "merchantID" => $this->config->get('gateway.saman.merchant'),
            "RefNum" => $this->refId,
            "password" => $this->config->get('gateway.saman.password'),
        );


        try {
            $soap = new SoapClient($this->serverUrl);
            $response = $soap->VerifyTransaction($fields["RefNum"], $fields["merchantID"]);

        } catch (\SoapFault $e) {
            $this->transactionFailed();
            $this->newLog('SoapFault', $e->getMessage());
            throw $e;
        }

        $response = intval($response);

        if ($response == $this->amount) {
            $this->transactionSucceed();
            return true;
        }

        //Reverse Transaction
        if($response>0){
            try {
                $soap = new SoapClient($this->serverUrl);
                $response = $soap->ReverseTransaction($fields["RefNum"], $fields["merchantID"], $fields["password"], $response);

            } catch (\SoapFault $e) {
                $this->transactionFailed();
                $this->newLog('SoapFault', $e->getMessage());
                throw $e;
            }
        }

        //
        $this->transactionFailed();
        $this->newLog($response, SamanException::$errors[$response]);
        throw new SamanException($response);
        


    }
374098
private void putId() {
        // note: name and info may be null
        super.put("Provider.id name", String.valueOf(name));
        super.put("Provider.id version", String.valueOf(version));
        super.put("Provider.id info", String.valueOf(info));
        super.put("Provider.id className", this.getClass().getName());
    }
148538
public function beginTransaction()
    {
        if ($this->isTransactionEnabled() === false) {
            throw new ServiceException(sprintf(
                'The repository for %s doesn\'t support Transactions',
                $this->getEntityServiceName()
            ));
        }

        $this->getRepository()->beginTransaction();
    }
885590
@Override
	public void removeByUuid(String uuid) {
		for (CommerceSubscriptionEntry commerceSubscriptionEntry : findByUuid(
				uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceSubscriptionEntry);
		}
	}
121024
public static CommerceWarehouse toModel(CommerceWarehouseSoap soapModel) {
		if (soapModel == null) {
			return null;
		}

		CommerceWarehouse model = new CommerceWarehouseImpl();

		model.setCommerceWarehouseId(soapModel.getCommerceWarehouseId());
		model.setGroupId(soapModel.getGroupId());
		model.setCompanyId(soapModel.getCompanyId());
		model.setUserId(soapModel.getUserId());
		model.setUserName(soapModel.getUserName());
		model.setCreateDate(soapModel.getCreateDate());
		model.setModifiedDate(soapModel.getModifiedDate());
		model.setName(soapModel.getName());
		model.setDescription(soapModel.getDescription());
		model.setActive(soapModel.isActive());
		model.setStreet1(soapModel.getStreet1());
		model.setStreet2(soapModel.getStreet2());
		model.setStreet3(soapModel.getStreet3());
		model.setCity(soapModel.getCity());
		model.setZip(soapModel.getZip());
		model.setCommerceRegionId(soapModel.getCommerceRegionId());
		model.setCommerceCountryId(soapModel.getCommerceCountryId());
		model.setLatitude(soapModel.getLatitude());
		model.setLongitude(soapModel.getLongitude());
		model.setPrimary(soapModel.isPrimary());

		return model;
	}
73287
public static CommerceUserSegmentEntry toModel(
		CommerceUserSegmentEntrySoap soapModel) {
		if (soapModel == null) {
			return null;
		}

		CommerceUserSegmentEntry model = new CommerceUserSegmentEntryImpl();

		model.setCommerceUserSegmentEntryId(soapModel.getCommerceUserSegmentEntryId());
		model.setGroupId(soapModel.getGroupId());
		model.setCompanyId(soapModel.getCompanyId());
		model.setUserId(soapModel.getUserId());
		model.setUserName(soapModel.getUserName());
		model.setCreateDate(soapModel.getCreateDate());
		model.setModifiedDate(soapModel.getModifiedDate());
		model.setName(soapModel.getName());
		model.setKey(soapModel.getKey());
		model.setActive(soapModel.isActive());
		model.setSystem(soapModel.isSystem());
		model.setPriority(soapModel.getPriority());

		return model;
	}
232359
public function handleData(QueryHandlerInterface $queryHandler, FilterInterface $filter, $data): void
    {
        if (!$queryHandler instanceof EAVQueryHandlerInterface) {
            throw new BadQueryHandlerException($queryHandler, EAVQueryHandlerInterface::class);
        }
        if (!$queryHandler->isEAVFilter($filter)) {
            $this->fallbackFilterType->handleData($queryHandler, $filter, $data);

            return;
        }

        $eavQb = new EAVQueryBuilder($queryHandler->getQueryBuilder(), $queryHandler->getAlias());
        $eavQb->setContext($queryHandler->getQueryContext());
        $dqlHandlers = [];
        foreach ($filter->getAttributes() as $attributePath) {
            $attributeDqlHandlers = [];
            $attributeQb = null;
            if (!empty($data[DateRangeType::START_NAME])) {
                $attributeQb = $queryHandler->getEAVAttributeQueryBuilder($eavQb, $attributePath);
                $attributeDqlHandlers[] = $attributeQb->gte($data[DateRangeType::START_NAME]);
            }
            if (!empty($data[DateRangeType::END_NAME])) {
                if ($attributeQb) {
                    $attributeQb = clone $attributeQb;
                } else {
                    $attributeQb = $queryHandler->getEAVAttributeQueryBuilder($eavQb, $attributePath);
                }
                $attributeDqlHandlers[] = $attributeQb->lte($data[DateRangeType::END_NAME]);
            }
            if (0 < \count($attributeDqlHandlers)) {
                $dqlHandlers[] = $eavQb->getAnd($attributeDqlHandlers);
            }
        }

        if (0 < \count($dqlHandlers)) {
            $eavQb->apply($eavQb->getOr($dqlHandlers));
        }
    }
368168
public static CommerceAccount toModel(CommerceAccountSoap soapModel) {
		if (soapModel == null) {
			return null;
		}

		CommerceAccount model = new CommerceAccountImpl();

		model.setExternalReferenceCode(soapModel.getExternalReferenceCode());
		model.setCommerceAccountId(soapModel.getCommerceAccountId());
		model.setCompanyId(soapModel.getCompanyId());
		model.setUserId(soapModel.getUserId());
		model.setUserName(soapModel.getUserName());
		model.setCreateDate(soapModel.getCreateDate());
		model.setModifiedDate(soapModel.getModifiedDate());
		model.setParentCommerceAccountId(soapModel.getParentCommerceAccountId());
		model.setName(soapModel.getName());
		model.setLogoId(soapModel.getLogoId());
		model.setEmail(soapModel.getEmail());
		model.setTaxId(soapModel.getTaxId());
		model.setType(soapModel.getType());
		model.setActive(soapModel.isActive());
		model.setDisplayDate(soapModel.getDisplayDate());
		model.setExpirationDate(soapModel.getExpirationDate());
		model.setLastPublishDate(soapModel.getLastPublishDate());
		model.setStatus(soapModel.getStatus());
		model.setStatusByUserId(soapModel.getStatusByUserId());
		model.setStatusByUserName(soapModel.getStatusByUserName());
		model.setStatusDate(soapModel.getStatusDate());

		return model;
	}
664085
public function processIds()
    {
        $orders = [];
        foreach ($this->scheduledIds as $id) {
            $order = $this->getOrderManager()->findOrderEntityForItemWithId($id);
            if (!in_array($order->getId(), $orders)) {
                $orders[] = $order->getId();
                $order->updateTotalNetPrice();
            }
        }
        unset($this->scheduledIds);
        $this->scheduledIds = [];
        $this->getEntityManager()->flush();
    }
941382
private function merchantPayload()
    {
        $partial = $this->partialPayments();
        if ($this->publicId() !== false && is_array($partial) === true) {
            $payload = array(
                "storeDomain" => getenv('SERVER_NAME')
            );
            return $this->payload($payload);
        }
        return false;
    }
821804
function (data_id) {
		if (mockIndexedDBTestFlags.canDelete === true) {
			mockIndexedDB_storeDeleteTimer = setTimeout(function () {
				mockIndexedDBStoreTransaction.callSuccessHandler();
				mockIndexedDB_deleteSuccess = true;
			}, 20);
		}
		else {
			mockIndexedDB_storeDeleteTimer = setTimeout(function () {
				mockIndexedDBStoreTransaction.callErrorHandler();
				mockIndexedDB_deleteFail = true;
			}, 20);
		}

		return mockIndexedDBStoreTransaction;
	}
659791
public String getTransactionId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getTransactionId");
    
    String tranID = null;
    PersistentTranId pTranID = itemStream.getTransactionId();
    
    if (pTranID != null)
    {
      tranID = pTranID.toTMString(); 
    }
      
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getTransactionId", tranID);
    return tranID;
  }
149702
@Override
	public final void setClientID(String clientID) throws JMSException
    {
        super.setClientID(clientID);
        
        SetClientIDQuery query = new SetClientIDQuery();
        query.setClientID(clientID);
        transportEndpoint.blockingRequest(query);
    }
649144
def register
      response_request = Request.post("transactions/cancels", api_version, params)
      Response.new(response_request, self).serialize
    end