Create a new customer for recurring payments

@param        $type
@param array  $payment
@param string $customerId
@param array  $additional

@return CreateCustomerResponse
493010
public function createCustomer($type, $customerId ,$payment = [], $additional = [])
    {
        $request = new CreateCustomer($this->config->getMerchantId());

        $request->setPType($type);
        $request->setPaymentData($payment);
        $request->setCustomerId($customerId);
        $request->setAdditional($additional);

        $this->request = $request->getXml();

        $this->send();

        $result = new CreateCustomerResponse($this->response);

        return $result;
    }
53305
public function createPaymentByOrderId($idOrder)
    {
        $query = $this->getFactory()->createPaymentPayoneQuery();
        $query->findByFkSalesOrder($idOrder);

        return $query;
    }
907976
public static function create(
        int $paymentId,
        int $monetaryAccountId = null,
        string $content = null,
        array $customHeaders = []
    ): BunqResponseInt {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentId]
            ),
            [self::FIELD_CONTENT => $content],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
292007
public function token($paymentType, array $additional = [])
    {
        $this->integrityCheck();

        if ($paymentType !== 'CC') {
            die("The payment type '$paymentType' is not allowed! Currently allowed is only: 'CC'");
        }

        $tokenResult = $this->mpay24Sdk->createTokenPayment($paymentType, $additional);

        $this->recordedLastMessageExchange('CreatePaymentToken');

        return $tokenResult;
    }
47929
public function create($amount, $payment, $options = [])
    {
        $params = [];

        $params['transaction'] = 'fail';

        if ($payment === 'success') {
            $params['transaction'] = 'success';
        }

        return $this->gateway->commit('post', 'charges', $params);
    }
209824
public function addPayment(\Gpupo\CommonSchema\ORM\Entity\Trading\Order\Shipping\Payment\Payment $payment)
    {
        $this->payments[] = $payment;

        return $this;
    }
1025479
public BankAccount create(BankAccount bankAccount, String customerId) throws BaseException {

		logger.debug("Enter BankAccountService::create");
		
		if (StringUtils.isBlank(customerId)) {
			logger.error("IllegalArgumentException {}", customerId);
			throw new IllegalArgumentException("customerId cannot be empty or null");
		}

		// prepare API url
		String apiUrl = requestContext.getBaseUrl().replaceAll("payments", "customers") + "{id}/bank-accounts"
				.replaceAll("\\{format\\}", "json").replaceAll("\\{" + "id" + "\\}", customerId.toString());
		logger.info("apiUrl - " + apiUrl);
		
		// assign TypeReference for deserialization
		TypeReference<BankAccount> typeReference = new TypeReference<BankAccount>() {
		};

		// prepare service request
		Request request = new Request.RequestBuilder(MethodType.POST, apiUrl).requestObject(bankAccount)
				.typeReference(typeReference).context(requestContext).build();

		// make API call
		Response response = sendRequest(request);
		// retrieve response
		BankAccount bankAccountResponse = (BankAccount) response.getResponseObject();

		// set additional attributes
		prepareResponse(request, response, bankAccountResponse);
		return bankAccountResponse;
	}
1372091
public function createPayment($data, $filters = [])
    {
        return $this->client->orderPayments->createFor($this, $data, $filters);
    }
793539
public Customer createCustomer(Customer customer) {
        if(getCustomer(customer.getEmail()) != null){
            return customerRepository.save(customer);
        }
        return null;
    }
377957
public function create($data, $customerId = null)
    {
        if (isset($customerId)) {
            return $this->client()->put($data, 'customers/{customerId}', ['customerId' => $customerId]);
        }

        return $this->client()->post($data, 'customers');
    }
1345802
function create(callback, payee, amount, reference) {
  if(!util.isFunction(callback)) {
    throw new Error('callback must be a function');
  }

  var resource = this.coinjar.personal.api_endpoint + '/v1/payments.json',
    query = {
      payment : {}
    };

  if(payee) { query.payment.payee = payee; }
  if(amount) { query.payment.amount = amount; }
  if(reference) { query.payment.reference = reference; }

  request.post(resource)
    .auth(this.coinjar.personal.auth_token)
    .send(query)
    .end(function (response) {
      if(isResponseError(response, callback)) { return; }
      return callback(null, response.body.payment);
    });
}
92461
public function create($amount, $payment, $options = [])
    {
        $params = [
            'type'   => 'charge',
            'amount' => $amount,
            'status' => new Status('pending'),
        ];

        return $this->gateway->commit(null, null, $params);
    }
413521
public function createEmail(int $customerId, Email $email): ?int
    {
        return $this->restClient->createResource(
            $email,
            sprintf(self::CREATE_CUSTOMER_EMAIL, $customerId)
        );
    }
367788
public function customer($customerFid = null, $visitorId = null)
  {
    if($visitorId === null)
    {
      $visitorId = $this->getVisitorIdCookie();
    }

    return Customer::newInstance($this)
      ->setVisitorId($visitorId)
      ->setCustomerFid($customerFid);
  }
782944
public function customerCreate($data) {

		// for API compatibility with version 1.x of this component
		if (isset($data['stripeToken'])) {
			$data['card'] = $data['stripeToken'];
			unset($data['stripeToken']);
		}

		Stripe::setApiKey($this->key);
		$error = null;

		try {
			$customer = Stripe_Customer::create($data);

		} catch(Stripe_CardError $e) {
			$body = $e->getJsonBody();
			$err = $body['error'];
			CakeLog::error(
				'Customer::Stripe_CardError: ' . $err['type'] . ': ' . $err['code'] . ': ' . $err['message'],
				'stripe'
			);
			$error = $err['message'];

		} catch (Stripe_InvalidRequestError $e) {
			$body = $e->getJsonBody();
			$err = $body['error'];
			CakeLog::error(
				'Customer::Stripe_InvalidRequestError: ' . $err['type'] . ': ' . $err['message'],
				'stripe'
			);
			$error = $err['message'];

		} catch (Stripe_AuthenticationError $e) {
			CakeLog::error('Customer::Stripe_AuthenticationError: API key rejected!', 'stripe');
			$error = 'Payment processor API key error.';

		} catch (Stripe_ApiConnectionError $e) {
			CakeLog::error('Customer::Stripe_ApiConnectionError: Stripe could not be reached.', 'stripe');
			$error = 'Network communication with payment processor failed, try again later';

		} catch (Stripe_Error $e) {
			CakeLog::error('Customer::Stripe_Error: Stripe could be down.', 'stripe');
			$error = 'Payment processor error, try again later.';

		} catch (Exception $e) {
			CakeLog::error('Customer::Exception: Unknown error.', 'stripe');
			$error = 'There was an error, try again later.';
		}

		if ($error !== null) {
			// an error is always a string
			return (string)$error;
		}

		CakeLog::info('Customer: customer id ' . $customer->id, 'stripe');

		return $this->_formatResult($customer);
	}
943522
public function create($amount, $payment, $options = [])
    {
        $params = [];

        $params['METHOD'] = $payment;
        $params['PAYMENTREQUEST_0_PAYMENTACTION'] = 'Sale';
        $params['RETURNURL'] = Arr::get($options, 'return_url');
        $params['CANCELURL'] = Arr::get($options, 'cancel_url');

        $params = $this->addOrder($params, $amount, $options);
        $params = $this->addBN($params, $options);

        return $this->gateway->commit('post', $this->gateway->buildUrlFromString(''), $params, [
            'isRedirect' => true,
        ]);
    }
669376
public function create($orderIncrementId, $itemsQty = null, $comment = null, $email = null, $includeComment = null)
    {
        return $this->__createAction('order_shipment.create', func_get_args());
    }