增加聚合支付托管下单

This commit is contained in:
2024-04-01 17:07:53 +08:00
parent 899d816bc3
commit f8299b36aa
1291 changed files with 220566 additions and 169 deletions

View File

@@ -0,0 +1,333 @@
<?php
/**
* InstallmentPayRequestInstallmentApiInfoResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 无卡交易系统
*
* <p>中台的无卡交易系统(Card Not Present)包含调用统一订单OPR下单及无卡支付服务NCPAY支付的流程</p>
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* InstallmentPayRequestInstallmentApiInfoResult Class Doc Comment
*
* @category Class
* @description
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class InstallmentPayRequestInstallmentApiInfoResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'InstallmentPayRequestInstallmentApiInfoResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'needRedirect' => 'bool',
'installmentRedirectUrl' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'needRedirect' => null,
'installmentRedirectUrl' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'needRedirect' => 'needRedirect',
'installmentRedirectUrl' => 'installmentRedirectUrl'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'needRedirect' => 'setNeedRedirect',
'installmentRedirectUrl' => 'setInstallmentRedirectUrl'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'needRedirect' => 'getNeedRedirect',
'installmentRedirectUrl' => 'getInstallmentRedirectUrl'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['needRedirect'] = isset($data['needRedirect']) ? $data['needRedirect'] : null;
$this->container['installmentRedirectUrl'] = isset($data['installmentRedirectUrl']) ? $data['installmentRedirectUrl'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets needRedirect
*
* @return bool
*/
public function getNeedRedirect()
{
return $this->container['needRedirect'];
}
/**
* Sets needRedirect
*
* @param bool $needRedirect 是否跳转至银行分期页面
*
* @return $this
*/
public function setNeedRedirect($needRedirect)
{
$this->container['needRedirect'] = $needRedirect;
return $this;
}
/**
* Gets installmentRedirectUrl
*
* @return string
*/
public function getInstallmentRedirectUrl()
{
return $this->container['installmentRedirectUrl'];
}
/**
* Sets installmentRedirectUrl
*
* @param string $installmentRedirectUrl 银行分期页面跳转地址
*
* @return $this
*/
public function setInstallmentRedirectUrl($installmentRedirectUrl)
{
$this->container['installmentRedirectUrl'] = $installmentRedirectUrl;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -0,0 +1,482 @@
<?php
/**
* InstallmentPayRequestInstallmentPayResponseDTOResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 无卡交易系统
*
* <p>中台的无卡交易系统(Card Not Present)包含调用统一订单OPR下单及无卡支付服务NCPAY支付的流程</p>
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* InstallmentPayRequestInstallmentPayResponseDTOResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class InstallmentPayRequestInstallmentPayResponseDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'InstallmentPayRequestInstallmentPayResponseDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'merchantNo' => 'string',
'orderId' => 'string',
'status' => 'string',
'uniqueOrderNo' => 'string',
'installmentInfo' => '\Yeepay\Yop\Sdk\Service\Cnppay\Model\InstallmentPayRequestInstallmentApiInfoResult'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'merchantNo' => null,
'orderId' => null,
'status' => null,
'uniqueOrderNo' => null,
'installmentInfo' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'code' => 'code',
'message' => 'message',
'merchantNo' => 'merchantNo',
'orderId' => 'orderId',
'status' => 'status',
'uniqueOrderNo' => 'uniqueOrderNo',
'installmentInfo' => 'installmentInfo'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'merchantNo' => 'setMerchantNo',
'orderId' => 'setOrderId',
'status' => 'setStatus',
'uniqueOrderNo' => 'setUniqueOrderNo',
'installmentInfo' => 'setInstallmentInfo'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'merchantNo' => 'getMerchantNo',
'orderId' => 'getOrderId',
'status' => 'getStatus',
'uniqueOrderNo' => 'getUniqueOrderNo',
'installmentInfo' => 'getInstallmentInfo'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
$this->container['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : null;
$this->container['orderId'] = isset($data['orderId']) ? $data['orderId'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
$this->container['installmentInfo'] = isset($data['installmentInfo']) ? $data['installmentInfo'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets code
*
* @return string
*/
public function getCode()
{
return $this->container['code'];
}
/**
* Sets code
*
* @param string $code 返回码
*
* @return $this
*/
public function setCode($code)
{
$this->container['code'] = $code;
return $this;
}
/**
* Gets message
*
* @return string
*/
public function getMessage()
{
return $this->container['message'];
}
/**
* Sets message
*
* @param string $message 返回信息
*
* @return $this
*/
public function setMessage($message)
{
$this->container['message'] = $message;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->container['merchantNo'];
}
/**
* Sets merchantNo
*
* @param string $merchantNo 收款商户商编
*
* @return $this
*/
public function setMerchantNo($merchantNo)
{
$this->container['merchantNo'] = $merchantNo;
return $this;
}
/**
* Gets orderId
*
* @return string
*/
public function getOrderId()
{
return $this->container['orderId'];
}
/**
* Sets orderId
*
* @param string $orderId 商户收款请求号
*
* @return $this
*/
public function setOrderId($orderId)
{
$this->container['orderId'] = $orderId;
return $this;
}
/**
* Gets status
*
* @return string
*/
public function getStatus()
{
return $this->container['status'];
}
/**
* Sets status
*
* @param string $status 订单状态
*
* @return $this
*/
public function setStatus($status)
{
$this->container['status'] = $status;
return $this;
}
/**
* Gets uniqueOrderNo
*
* @return string
*/
public function getUniqueOrderNo()
{
return $this->container['uniqueOrderNo'];
}
/**
* Sets uniqueOrderNo
*
* @param string $uniqueOrderNo 易宝收款订单号
*
* @return $this
*/
public function setUniqueOrderNo($uniqueOrderNo)
{
$this->container['uniqueOrderNo'] = $uniqueOrderNo;
return $this;
}
/**
* Gets installmentInfo
*
* @return \Yeepay\Yop\Sdk\Service\Cnppay\Model\InstallmentPayRequestInstallmentApiInfoResult
*/
public function getInstallmentInfo()
{
return $this->container['installmentInfo'];
}
/**
* Sets installmentInfo
*
* @param \Yeepay\Yop\Sdk\Service\Cnppay\Model\InstallmentPayRequestInstallmentApiInfoResult $installmentInfo 分期信息
*
* @return $this
*/
public function setInstallmentInfo($installmentInfo)
{
$this->container['installmentInfo'] = $installmentInfo;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -0,0 +1,367 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
class InstallmentPayRequestRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* @var float
*/
private $orderAmount;
/**
* @var string
*/
private $orderId;
/**
* @var string
*/
private $fundProcessType;
/**
* @var string
*/
private $bankId;
/**
* @var string
*/
private $expireTime;
/**
* @var string
*/
private $goodsName;
/**
* @var int
*/
private $numOfInstallment;
/**
* @var string
*/
private $riskInfo;
/**
* @var string
*/
private $redirectUrl;
/**
* @var string
*/
private $notifyUrl;
/**
* @var string
*/
private $csUrl;
/**
* @var string
*/
private $memo;
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return InstallmentPayRequestRequest
*/
public function setParentMerchantNo($parentMerchantNo)
{
$this->parentMerchantNo = $parentMerchantNo;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return InstallmentPayRequestRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets orderAmount
*
* @return float
*/
public function getOrderAmount()
{
return $this->orderAmount;
}
/**
* Sets orderAmount
*
* @param float $orderAmount
* @return InstallmentPayRequestRequest
*/
public function setOrderAmount($orderAmount)
{
$this->orderAmount = $orderAmount;
return $this;
}
/**
* Gets orderId
*
* @return string
*/
public function getOrderId()
{
return $this->orderId;
}
/**
* Sets orderId
*
* @param string $orderId
* @return InstallmentPayRequestRequest
*/
public function setOrderId($orderId)
{
$this->orderId = $orderId;
return $this;
}
/**
* Gets fundProcessType
*
* @return string
*/
public function getFundProcessType()
{
return $this->fundProcessType;
}
/**
* Sets fundProcessType
*
* @param string $fundProcessType
* @return InstallmentPayRequestRequest
*/
public function setFundProcessType($fundProcessType)
{
$this->fundProcessType = $fundProcessType;
return $this;
}
/**
* Gets bankId
*
* @return string
*/
public function getBankId()
{
return $this->bankId;
}
/**
* Sets bankId
*
* @param string $bankId
* @return InstallmentPayRequestRequest
*/
public function setBankId($bankId)
{
$this->bankId = $bankId;
return $this;
}
/**
* Gets expireTime
*
* @return string
*/
public function getExpireTime()
{
return $this->expireTime;
}
/**
* Sets expireTime
*
* @param string $expireTime
* @return InstallmentPayRequestRequest
*/
public function setExpireTime($expireTime)
{
$this->expireTime = $expireTime;
return $this;
}
/**
* Gets goodsName
*
* @return string
*/
public function getGoodsName()
{
return $this->goodsName;
}
/**
* Sets goodsName
*
* @param string $goodsName
* @return InstallmentPayRequestRequest
*/
public function setGoodsName($goodsName)
{
$this->goodsName = $goodsName;
return $this;
}
/**
* Gets numOfInstallment
*
* @return int
*/
public function getNumOfInstallment()
{
return $this->numOfInstallment;
}
/**
* Sets numOfInstallment
*
* @param int $numOfInstallment
* @return InstallmentPayRequestRequest
*/
public function setNumOfInstallment($numOfInstallment)
{
$this->numOfInstallment = $numOfInstallment;
return $this;
}
/**
* Gets riskInfo
*
* @return string
*/
public function getRiskInfo()
{
return $this->riskInfo;
}
/**
* Sets riskInfo
*
* @param string $riskInfo
* @return InstallmentPayRequestRequest
*/
public function setRiskInfo($riskInfo)
{
$this->riskInfo = $riskInfo;
return $this;
}
/**
* Gets redirectUrl
*
* @return string
*/
public function getRedirectUrl()
{
return $this->redirectUrl;
}
/**
* Sets redirectUrl
*
* @param string $redirectUrl
* @return InstallmentPayRequestRequest
*/
public function setRedirectUrl($redirectUrl)
{
$this->redirectUrl = $redirectUrl;
return $this;
}
/**
* Gets notifyUrl
*
* @return string
*/
public function getNotifyUrl()
{
return $this->notifyUrl;
}
/**
* Sets notifyUrl
*
* @param string $notifyUrl
* @return InstallmentPayRequestRequest
*/
public function setNotifyUrl($notifyUrl)
{
$this->notifyUrl = $notifyUrl;
return $this;
}
/**
* Gets csUrl
*
* @return string
*/
public function getCsUrl()
{
return $this->csUrl;
}
/**
* Sets csUrl
*
* @param string $csUrl
* @return InstallmentPayRequestRequest
*/
public function setCsUrl($csUrl)
{
$this->csUrl = $csUrl;
return $this;
}
/**
* Gets memo
*
* @return string
*/
public function getMemo()
{
return $this->memo;
}
/**
* Sets memo
*
* @param string $memo
* @return InstallmentPayRequestRequest
*/
public function setMemo($memo)
{
$this->memo = $memo;
return $this;
}
public static function getOperationId()
{
return 'installmentPayRequest';
}
}

View File

@@ -0,0 +1,119 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
use Yeepay\Yop\Sdk\Http\Headers;
use Yeepay\Yop\Sdk\Internal\DefaultRequest;
use Yeepay\Yop\Sdk\Internal\Request;
use Yeepay\Yop\Sdk\Model\Transform\RequestMarshaller;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
use Yeepay\Yop\Sdk\Utils\UUIDUtils;
class InstallmentPayRequestRequestMarshaller implements RequestMarshaller
{
/**
* @var InstallmentPayRequestRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new InstallmentPayRequestRequestMarshaller();
}
/**
* @return InstallmentPayRequestRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Cnppay';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/cnppay/installment/pay/request';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param InstallmentPayRequestRequest $request
* @return Request
*/
public function marshal($request)
{
$internalRequest = new DefaultRequest($this->serviceName);
$internalRequest->setResourcePath($this->resourcePath);
$internalRequest->setHttpMethod($this->httpMethod);
if (!empty($request->getRequestConfig()) && !empty($request->getRequestConfig()->getCustomRequestHeaders())) {
foreach ($request->getRequestConfig()->getCustomRequestHeaders() as $name => $value) {
$internalRequest->addHeader($name, $value);
}
}
if (!isset($internalRequest->getHeaders()[Headers::YOP_REQUEST_ID])) {
$internalRequest->addHeader(Headers::YOP_REQUEST_ID, UUIDUtils::uuid());
}
if($request->getParentMerchantNo() != null){
$internalRequest->addParameter('parentMerchantNo', ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
}
if($request->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
if($request->getOrderAmount() != null){
$internalRequest->addParameter('orderAmount', ObjectSerializer::sanitizeForSerialization($request->getOrderAmount(), 'float'));
}
if($request->getOrderId() != null){
$internalRequest->addParameter('orderId', ObjectSerializer::sanitizeForSerialization($request->getOrderId(), 'string'));
}
if($request->getFundProcessType() != null){
$internalRequest->addParameter('fundProcessType', ObjectSerializer::sanitizeForSerialization($request->getFundProcessType(), 'string'));
}
if($request->getBankId() != null){
$internalRequest->addParameter('bankId', ObjectSerializer::sanitizeForSerialization($request->getBankId(), 'string'));
}
if($request->getExpireTime() != null){
$internalRequest->addParameter('expireTime', ObjectSerializer::sanitizeForSerialization($request->getExpireTime(), 'string'));
}
if($request->getGoodsName() != null){
$internalRequest->addParameter('goodsName', ObjectSerializer::sanitizeForSerialization($request->getGoodsName(), 'string'));
}
if($request->getNumOfInstallment() != null){
$internalRequest->addParameter('numOfInstallment', ObjectSerializer::sanitizeForSerialization($request->getNumOfInstallment(), 'int', 'int32'));
}
if($request->getRiskInfo() != null){
$internalRequest->addParameter('riskInfo', ObjectSerializer::sanitizeForSerialization($request->getRiskInfo(), 'string'));
}
if($request->getRedirectUrl() != null){
$internalRequest->addParameter('redirectUrl', ObjectSerializer::sanitizeForSerialization($request->getRedirectUrl(), 'string'));
}
if($request->getNotifyUrl() != null){
$internalRequest->addParameter('notifyUrl', ObjectSerializer::sanitizeForSerialization($request->getNotifyUrl(), 'string'));
}
if($request->getCsUrl() != null){
$internalRequest->addParameter('csUrl', ObjectSerializer::sanitizeForSerialization($request->getCsUrl(), 'string'));
}
if($request->getMemo() != null){
$internalRequest->addParameter('memo', ObjectSerializer::sanitizeForSerialization($request->getMemo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
InstallmentPayRequestRequestMarshaller::__init();

View File

@@ -0,0 +1,34 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
class InstallmentPayRequestResponse extends \Yeepay\Yop\Sdk\Model\BaseResponse
{
/**
* @var InstallmentPayRequestInstallmentPayResponseDTOResult
*/
private $result;
function getResultClass()
{
return '\Yeepay\Yop\Sdk\Service\Cnppay\Model\InstallmentPayRequestInstallmentPayResponseDTOResult';
}
/**
* @param InstallmentPayRequestInstallmentPayResponseDTOResult $result
*/
function setResult($result)
{
$this->result = $result;
}
/**
* @return InstallmentPayRequestInstallmentPayResponseDTOResult
*/
function getResult()
{
return $this->result;
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
class InstallmentPayRequestResponseUnMarshaller extends BaseResponseUnMarshaller
{
/**
* @var InstallmentPayRequestResponseUnMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new InstallmentPayRequestResponseUnMarshaller();
}
/**
* @return InstallmentPayRequestResponseUnMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @return InstallmentPayRequestResponse
*/
protected function getResponseInstance()
{
return new InstallmentPayRequestResponse();
}
}
InstallmentPayRequestResponseUnMarshaller::__init();

View File

@@ -0,0 +1,452 @@
<?php
/**
* InstallmentQuerybankcfgInstallmentBankCfgInfoResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 无卡交易系统
*
* <p>中台的无卡交易系统(Card Not Present)包含调用统一订单OPR下单及无卡支付服务NCPAY支付的流程</p>
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* InstallmentQuerybankcfgInstallmentBankCfgInfoResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class InstallmentQuerybankcfgInstallmentBankCfgInfoResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'InstallmentQuerybankcfgInstallmentBankCfgInfoResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'numOfInstallment' => 'int',
'bankId' => 'string',
'maxQuota' => 'float',
'minQuota' => 'float',
'subsidyInterestType' => 'string',
'payerInterestRate' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'numOfInstallment' => 'int32',
'bankId' => null,
'maxQuota' => null,
'minQuota' => null,
'subsidyInterestType' => null,
'payerInterestRate' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'numOfInstallment' => 'numOfInstallment',
'bankId' => 'bankId',
'maxQuota' => 'maxQuota',
'minQuota' => 'minQuota',
'subsidyInterestType' => 'subsidyInterestType',
'payerInterestRate' => 'payerInterestRate'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'numOfInstallment' => 'setNumOfInstallment',
'bankId' => 'setBankId',
'maxQuota' => 'setMaxQuota',
'minQuota' => 'setMinQuota',
'subsidyInterestType' => 'setSubsidyInterestType',
'payerInterestRate' => 'setPayerInterestRate'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'numOfInstallment' => 'getNumOfInstallment',
'bankId' => 'getBankId',
'maxQuota' => 'getMaxQuota',
'minQuota' => 'getMinQuota',
'subsidyInterestType' => 'getSubsidyInterestType',
'payerInterestRate' => 'getPayerInterestRate'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['numOfInstallment'] = isset($data['numOfInstallment']) ? $data['numOfInstallment'] : null;
$this->container['bankId'] = isset($data['bankId']) ? $data['bankId'] : null;
$this->container['maxQuota'] = isset($data['maxQuota']) ? $data['maxQuota'] : null;
$this->container['minQuota'] = isset($data['minQuota']) ? $data['minQuota'] : null;
$this->container['subsidyInterestType'] = isset($data['subsidyInterestType']) ? $data['subsidyInterestType'] : null;
$this->container['payerInterestRate'] = isset($data['payerInterestRate']) ? $data['payerInterestRate'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets numOfInstallment
*
* @return int
*/
public function getNumOfInstallment()
{
return $this->container['numOfInstallment'];
}
/**
* Sets numOfInstallment
*
* @param int $numOfInstallment 银行分期数
*
* @return $this
*/
public function setNumOfInstallment($numOfInstallment)
{
$this->container['numOfInstallment'] = $numOfInstallment;
return $this;
}
/**
* Gets bankId
*
* @return string
*/
public function getBankId()
{
return $this->container['bankId'];
}
/**
* Sets bankId
*
* @param string $bankId 银行编码
*
* @return $this
*/
public function setBankId($bankId)
{
$this->container['bankId'] = $bankId;
return $this;
}
/**
* Gets maxQuota
*
* @return float
*/
public function getMaxQuota()
{
return $this->container['maxQuota'];
}
/**
* Sets maxQuota
*
* @param float $maxQuota 银行最高限额
*
* @return $this
*/
public function setMaxQuota($maxQuota)
{
$this->container['maxQuota'] = $maxQuota;
return $this;
}
/**
* Gets minQuota
*
* @return float
*/
public function getMinQuota()
{
return $this->container['minQuota'];
}
/**
* Sets minQuota
*
* @param float $minQuota 银行最低限额
*
* @return $this
*/
public function setMinQuota($minQuota)
{
$this->container['minQuota'] = $minQuota;
return $this;
}
/**
* Gets subsidyInterestType
*
* @return string
*/
public function getSubsidyInterestType()
{
return $this->container['subsidyInterestType'];
}
/**
* Sets subsidyInterestType
*
* @param string $subsidyInterestType 贴息类型
*
* @return $this
*/
public function setSubsidyInterestType($subsidyInterestType)
{
$this->container['subsidyInterestType'] = $subsidyInterestType;
return $this;
}
/**
* Gets payerInterestRate
*
* @return string
*/
public function getPayerInterestRate()
{
return $this->container['payerInterestRate'];
}
/**
* Sets payerInterestRate
*
* @param string $payerInterestRate 持卡人利率
*
* @return $this
*/
public function setPayerInterestRate($payerInterestRate)
{
$this->container['payerInterestRate'] = $payerInterestRate;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -0,0 +1,362 @@
<?php
/**
* InstallmentQuerybankcfgInstallmentBankCfgResponseDTOResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 无卡交易系统
*
* <p>中台的无卡交易系统(Card Not Present)包含调用统一订单OPR下单及无卡支付服务NCPAY支付的流程</p>
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* InstallmentQuerybankcfgInstallmentBankCfgResponseDTOResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class InstallmentQuerybankcfgInstallmentBankCfgResponseDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'InstallmentQuerybankcfgInstallmentBankCfgResponseDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'bankCfgInfo' => '\Yeepay\Yop\Sdk\Service\Cnppay\Model\InstallmentQuerybankcfgInstallmentBankCfgInfoResult[]'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'bankCfgInfo' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'code' => 'code',
'message' => 'message',
'bankCfgInfo' => 'bankCfgInfo'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'bankCfgInfo' => 'setBankCfgInfo'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'bankCfgInfo' => 'getBankCfgInfo'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
$this->container['bankCfgInfo'] = isset($data['bankCfgInfo']) ? $data['bankCfgInfo'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets code
*
* @return string
*/
public function getCode()
{
return $this->container['code'];
}
/**
* Sets code
*
* @param string $code 返回码
*
* @return $this
*/
public function setCode($code)
{
$this->container['code'] = $code;
return $this;
}
/**
* Gets message
*
* @return string
*/
public function getMessage()
{
return $this->container['message'];
}
/**
* Sets message
*
* @param string $message 返回信息
*
* @return $this
*/
public function setMessage($message)
{
$this->container['message'] = $message;
return $this;
}
/**
* Gets bankCfgInfo
*
* @return \Yeepay\Yop\Sdk\Service\Cnppay\Model\InstallmentQuerybankcfgInstallmentBankCfgInfoResult[]
*/
public function getBankCfgInfo()
{
return $this->container['bankCfgInfo'];
}
/**
* Sets bankCfgInfo
*
* @param \Yeepay\Yop\Sdk\Service\Cnppay\Model\InstallmentQuerybankcfgInstallmentBankCfgInfoResult[] $bankCfgInfo 分期银行配置信息
*
* @return $this
*/
public function setBankCfgInfo($bankCfgInfo)
{
$this->container['bankCfgInfo'] = $bankCfgInfo;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -0,0 +1,67 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
class InstallmentQuerybankcfgRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return InstallmentQuerybankcfgRequest
*/
public function setParentMerchantNo($parentMerchantNo)
{
$this->parentMerchantNo = $parentMerchantNo;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return InstallmentQuerybankcfgRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'installmentQuerybankcfg';
}
}

View File

@@ -0,0 +1,83 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
use Yeepay\Yop\Sdk\Http\Headers;
use Yeepay\Yop\Sdk\Internal\DefaultRequest;
use Yeepay\Yop\Sdk\Internal\Request;
use Yeepay\Yop\Sdk\Model\Transform\RequestMarshaller;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
use Yeepay\Yop\Sdk\Utils\UUIDUtils;
class InstallmentQuerybankcfgRequestMarshaller implements RequestMarshaller
{
/**
* @var InstallmentQuerybankcfgRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new InstallmentQuerybankcfgRequestMarshaller();
}
/**
* @return InstallmentQuerybankcfgRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Cnppay';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/cnppay/installment/querybankcfg';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param InstallmentQuerybankcfgRequest $request
* @return Request
*/
public function marshal($request)
{
$internalRequest = new DefaultRequest($this->serviceName);
$internalRequest->setResourcePath($this->resourcePath);
$internalRequest->setHttpMethod($this->httpMethod);
if (!empty($request->getRequestConfig()) && !empty($request->getRequestConfig()->getCustomRequestHeaders())) {
foreach ($request->getRequestConfig()->getCustomRequestHeaders() as $name => $value) {
$internalRequest->addHeader($name, $value);
}
}
if (!isset($internalRequest->getHeaders()[Headers::YOP_REQUEST_ID])) {
$internalRequest->addHeader(Headers::YOP_REQUEST_ID, UUIDUtils::uuid());
}
if($request->getParentMerchantNo() != null){
$internalRequest->addParameter('parentMerchantNo', ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
}
if($request->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
InstallmentQuerybankcfgRequestMarshaller::__init();

View File

@@ -0,0 +1,34 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
class InstallmentQuerybankcfgResponse extends \Yeepay\Yop\Sdk\Model\BaseResponse
{
/**
* @var InstallmentQuerybankcfgInstallmentBankCfgResponseDTOResult
*/
private $result;
function getResultClass()
{
return '\Yeepay\Yop\Sdk\Service\Cnppay\Model\InstallmentQuerybankcfgInstallmentBankCfgResponseDTOResult';
}
/**
* @param InstallmentQuerybankcfgInstallmentBankCfgResponseDTOResult $result
*/
function setResult($result)
{
$this->result = $result;
}
/**
* @return InstallmentQuerybankcfgInstallmentBankCfgResponseDTOResult
*/
function getResult()
{
return $this->result;
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
class InstallmentQuerybankcfgResponseUnMarshaller extends BaseResponseUnMarshaller
{
/**
* @var InstallmentQuerybankcfgResponseUnMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new InstallmentQuerybankcfgResponseUnMarshaller();
}
/**
* @return InstallmentQuerybankcfgResponseUnMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @return InstallmentQuerybankcfgResponse
*/
protected function getResponseInstance()
{
return new InstallmentQuerybankcfgResponse();
}
}
InstallmentQuerybankcfgResponseUnMarshaller::__init();