├── .gitignore ├── composer.json ├── example ├── common.php ├── data │ └── token.php └── index.php ├── readme.md └── src ├── AliPayGlobal.php ├── client ├── AcAlipayClient.php └── BaseAlipayClient.php ├── model ├── Address.php ├── Amount.php ├── AmountLimit.php ├── AmountLimitInfo.php ├── Attachment.php ├── AuthenticationChannelType.php ├── AuthenticationType.php ├── Buyer.php ├── CardBrand.php ├── CardPaymentMethodDetail.php ├── ChallengeActionForm.php ├── ChallengeTriggerSourceType.php ├── ChallengeType.php ├── ChinaExtraTransInfo.php ├── CodeDetail.php ├── CodeValueType.php ├── ContactInfo.php ├── CouponPaymentMethodDetail.php ├── CreditPayFeeType.php ├── CreditPayPlan.php ├── CustomerBelongsTo.php ├── CustomerIdType.php ├── DiscountPaymentMethodDetail.php ├── DisplayType.php ├── Endpoint.php ├── Env.php ├── ExtendInfo.php ├── ExternalPaymentMethodDetail.php ├── Goods.php ├── GrantType.php ├── HttpRpcResult.php ├── InStorePaymentScenario.php ├── Logo.php ├── Merchant.php ├── MerchantRegistrationInfo.php ├── MerchantType.php ├── NotifyPaymentRequest.php ├── Order.php ├── OrderCodeForm.php ├── OsType.php ├── PaymentFactor.php ├── PaymentMethod.php ├── PaymentMethodCategoryType.php ├── PaymentMethodDetail.php ├── PaymentMethodDetailType.php ├── PaymentMethodInfo.php ├── PaymentOption.php ├── PaymentVerificationData.php ├── PresentmentMode.php ├── ProductCodeType.php ├── PspCustomerInfo.php ├── Quote.php ├── RedirectActionForm.php ├── RegistrationDetail.php ├── Result.php ├── ResultStatusType.php ├── RiskScoreDetail.php ├── RiskScoreResult.php ├── RiskScoreType.php ├── ScopeType.php ├── SettlementStrategy.php ├── Shipping.php ├── Store.php ├── TerminalType.php ├── Transaction.php ├── TransactionStatusType.php ├── TransactionType.php ├── UserIdentityType.php ├── UserName.php └── WebSite.php ├── request ├── AlipayRequest.php ├── auth │ ├── AlipayAuthApplyTokenRequest.php │ ├── AlipayAuthConsultRequest.php │ ├── AlipayAuthQueryTokenRequest.php │ └── AlipayAuthRevokeTokenRequest.php ├── merchant │ ├── AlipayMerchantRegistrationInfoQueryRequest.php │ ├── AlipayMerchantRegistrationRequest.php │ └── AlipayMerchantRegistrationStatusQueryRequest.php ├── notify │ └── AlipayAcNotify.php ├── order │ └── AlipayCreateOrderRequest.php ├── pay │ ├── AlipayCaptureRequest.php │ ├── AlipayPayCancelRequest.php │ ├── AlipayPayConsultRequest.php │ ├── AlipayPayQueryRequest.php │ ├── AlipayPayRequest.php │ ├── AlipayRefundRequest.php │ ├── EntryCodePaymentRequest.php │ ├── OrderCodePaymentRequest.php │ └── UserPresentedCodePaymentRequest.php ├── risk │ └── AlipayRiskScoreInquiryRequest.php └── users │ ├── AlipayInitAuthenticationRequest.php │ ├── AlipayUserQueryInfoRequest.php │ └── AlipayVerifyAuthenticationRequest.php └── tool ├── IdTool.php └── SignatureTool.php /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | /example/data/config.php -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mantoufan/alipay-global-sdk-php", 3 | "description": "Alipay Global Third Party SDK", 4 | "type": "library", 5 | "license": "MPL-2.0", 6 | "autoload": { 7 | "psr-4": { 8 | "Mantoufan\\": "src" 9 | } 10 | }, 11 | "authors": [ 12 | { 13 | "name": "Xiaoyu Wu", 14 | "email": "mhjlw@126.com" 15 | } 16 | ], 17 | "scripts": { 18 | "deploy": "zip -r dist.zip *; curl -H \"Expect:\" -F \"file=@dist.zip;filename=alipay-global-sdk-php@mantoufan.com;\" https://p.yzhan.co/deploy.php; rm -f dist.zip;" 19 | } 20 | } -------------------------------------------------------------------------------- /example/common.php: -------------------------------------------------------------------------------- 1 | $value) { 25 | $queryParams[$key] = $value; 26 | } 27 | return $urlParams['scheme'] . '://' . $urlParams['host'] . 28 | (empty($urlParams['port']) ? '' : ':' . $urlParams['port']) . $urlParams['path'] . 29 | (empty($queryParams) ? '' : '?' . http_build_query($queryParams)); 30 | } 31 | -------------------------------------------------------------------------------- /example/data/token.php: -------------------------------------------------------------------------------- 1 | '', 4 | 'access_token_expiry_time' => '', 5 | 'refresh_token' => '', 6 | 'refresh_token_expiry_time' => '', 7 | ); 8 | -------------------------------------------------------------------------------- /example/index.php: -------------------------------------------------------------------------------- 1 | $config['client_id'], 11 | 'endpoint_area' => 'ASIA', 12 | 'merchantPrivateKey' => $config['merchantPrivateKey'], 13 | 'alipayPublicKey' => $config['alipayPublicKey'], 14 | 'is_sandbox' => true 15 | )); 16 | /* Webman: $currentUrl = 'http:' . $request->fullUrl(); */ 17 | $currentUrl = getCurrentUrl(); 18 | $type = $_GET['type'] ?? ''; 19 | routeMap($type === 'pay/cashier', function () use (&$alipayGlobal, $currentUrl) { 20 | try { 21 | $result = $alipayGlobal->payCashier(array( 22 | 'customer_belongs_to' => CustomerBelongsTo::ALIPAY_CN, // * 23 | 'notify_url' => setQueryParams($currentUrl, array('type' => 'notify')), 24 | 'return_url' => setQueryParams($currentUrl, array('type' => 'return')), 25 | 'amount' => array( 26 | 'currency' => 'USD', 27 | 'value' => '1', 28 | ), 29 | 'order' => array( 30 | 'id' => null, 31 | 'desc' => 'Order Desc', 32 | 'extend_info' => array( 33 | 'china_extra_trans_info' => array( 34 | 'business_type' => 'MEMBERSHIP', 35 | ), 36 | ), 37 | ), 38 | 'payment_request_id' => null, 39 | 'settlement_strategy' => array( 40 | 'currency' => 'USD', 41 | ), 42 | 'terminal_type' => TerminalType::WEB, // * 43 | 'os_type' => null, 44 | )); 45 | header('Location: ' . $result->normalUrl); 46 | } catch (Exception $e) { 47 | echo $e->getMessage(); 48 | } 49 | }); 50 | 51 | routeMap($type === 'auth/consult', function () use (&$alipayGlobal, $currentUrl) { 52 | $auth_state = IdTool::CreateAuthState(); 53 | try { 54 | $result = $alipayGlobal->authConsult(array( 55 | 'customer_belongs_to' => CustomerBelongsTo::ALIPAY_CN, // * 56 | 'auth_client_id' => null, 57 | 'auth_redirect_url' => setQueryParams($currentUrl, array('type' => 'auth/apply_token/auth_code')), // * 58 | 'scopes' => array(ScopeType::AGREEMENT_PAY), // * 59 | 'auth_state' => $auth_state, // * 60 | 'terminal_type' => TerminalType::WEB, // * 61 | 'os_type' => null, 62 | )); 63 | header('Location: ' . $result->normalUrl); 64 | } catch (Exception $e) { 65 | echo $e->getMessage(); 66 | } 67 | }); 68 | 69 | routeMap($type === 'auth/apply_token/auth_code', function () use (&$alipayGlobal) { 70 | $auth_code = $_GET['authCode'] ?? ''; 71 | try { 72 | $result = $alipayGlobal->authApplyToken(array( 73 | 'grant_type' => GrantType::AUTHORIZATION_CODE, 74 | 'customer_belongs_to' => CustomerBelongsTo::ALIPAY_CN, 75 | 'auth_code' => $auth_code, 76 | 'refresh_token' => null, 77 | )); 78 | 79 | $access_token = $result->accessToken; 80 | $access_token_expiry_time = $result->accessTokenExpiryTime; 81 | $refresh_token = $result->refreshToken; 82 | $refresh_token_expiry_time = $result->refreshTokenExpiryTime; 83 | session_start(); 84 | $_SESSION['access_token'] = $access_token; 85 | 86 | var_dump($result); 87 | } catch (Exception $e) { 88 | echo $e->getMessage(); 89 | } 90 | }); 91 | 92 | routeMap($type === 'auth/apply_token/refresh_token', function () use (&$alipayGlobal) { 93 | $refresh_token = $_GET['refreshToken'] ?? ''; 94 | try { 95 | $result = $alipayGlobal->authApplyToken(array( 96 | 'grant_type' => GrantType::REFRESH_TOKEN, 97 | 'customer_belongs_to' => CustomerBelongsTo::ALIPAY_CN, 98 | 'auth_code' => null, 99 | 'refresh_token' => $refresh_token, 100 | )); 101 | 102 | $access_token = $result->accessToken; 103 | $access_token_expiry_time = $result->accessTokenExpiryTime; 104 | $refresh_token = $result->refreshToken; 105 | $refresh_token_expiry_time = $result->refreshTokenExpiryTime; 106 | session_start(); 107 | $_SESSION['access_token'] = $result->accessToken; 108 | 109 | var_dump($result); 110 | } catch (Exception $e) { 111 | echo $e->getMessage(); 112 | } 113 | }); 114 | 115 | routeMap($type === 'pay/agreement', function () use (&$alipayGlobal, $currentUrl) { 116 | try { 117 | session_start(); 118 | $result = $alipayGlobal->payAgreement(array( 119 | 'notify_url' => setQueryParams($currentUrl, array('type' => 'notify')), 120 | 'return_url' => setQueryParams($currentUrl, array('type' => 'return')), 121 | 'amount' => array( 122 | 'currency' => 'USD', 123 | 'value' => '1', 124 | ), 125 | 'order' => array( 126 | 'id' => null, 127 | 'desc' => 'Order Desc', 128 | 'extend_info' => array( 129 | 'china_extra_trans_info' => array( 130 | 'business_type' => 'MEMBERSHIP', 131 | ), 132 | ), 133 | ), 134 | 'goods' => array( 135 | array( 136 | 'id' => null, 137 | 'name' => 'Goods Name', 138 | 'category' => null, 139 | 'brand' => null, 140 | 'unit_amount' => null, 141 | 'quantity' => null, 142 | 'sku_name' => null, 143 | ), 144 | ), 145 | 'merchant' => array( 146 | 'MCC' => null, 147 | 'name' => null, 148 | 'display_name' => null, 149 | 'address' => null, 150 | 'register_date' => null, 151 | 'store' => null, 152 | 'type' => null, 153 | ), 154 | 'buyer' => array( 155 | 'id' => null, 156 | 'name' => array( 157 | 'first_name' => 'David', // * 158 | 'last_name' => 'Chen', // * 159 | ), 160 | 'phone_no' => null, 161 | 'email' => null, 162 | ), 163 | 'payment_request_id' => null, 164 | 'payment_method' => array( 165 | 'payment_method_type' => CustomerBelongsTo::ALIPAY_CN, // * 166 | 'payment_method_id' => $_SESSION['access_token'], // * 167 | ), 168 | 'settlement_strategy' => array( 169 | 'currency' => 'USD', 170 | ), 171 | 'terminal_type' => TerminalType::WEB, // * 172 | 'os_type' => null, 173 | )); 174 | var_dump($result); 175 | } catch (Exception $e) { 176 | echo $e->getMessage(); 177 | } 178 | }); 179 | 180 | routeMap($type === 'notify', function () use (&$alipayGlobal) { 181 | try { 182 | $notify = $alipayGlobal->getNotify(); 183 | // do something 184 | 185 | $notify->sendNotifyResponseWithRSA(); 186 | } catch (Exception $e) { 187 | echo $e->getMessage(); 188 | } 189 | }); 190 | 191 | routeMap($type === 'return', function () { 192 | echo 'Payment or Authorization completed'; 193 | }); 194 | 195 | routeMap($type === 'notify/auth/auth_code', function () use (&$alipayGlobal) { 196 | try { 197 | $notify = $alipayGlobal->getNotify(); 198 | // do something 199 | $rsqBody = $notify->getRsqBody(); 200 | $authorization_notify_type = $reqBody->authorizationNotifyType; 201 | if ($authorization_notify_type === 'AUTHCODE_CREATED') { 202 | $_SESSION['auth_code'] = $reqBody->authCode; 203 | } 204 | 205 | $notify->sendNotifyResponseWithRSA(); 206 | } catch (Exception $e) { 207 | echo $e->getMessage(); 208 | } 209 | }); 210 | 211 | routeMap($type === 'refund/refund_online', function () use (&$alipayGlobal) { 212 | try { 213 | $result = $alipayGlobal->sendRefund(array( 214 | 'paymentId' => '20181129190741010007000000XXXX', 215 | 'refundRequestId' => 'S7mMoYxQxWjJDWwm2NG4WxmNbM5z3GvSB6PEPvMeYP21PQUtrX9hXlgbQMajt2on', 216 | 'refundAmount' => array( 217 | 'currency' => 'USD', 218 | 'value' => '100', 219 | ) 220 | )); 221 | var_dump($result); 222 | } catch (Exception $e) { 223 | echo $e->getMessage(); 224 | } 225 | }); 226 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Alipay Global SDK PHP 2 | ## Alipay Global A+ SDK 3 | This project is based on [Alipay Global Offical PHP SDK](https://github.com/alipay/global-open-sdk-php) 4 | Since official SDK mainly shows how to access the alipay gateway and does not contain complete functions such as authorization and auto debit, I have added some logic and further realized the standard interface of Alipay Global A+ 5 | 6 | ## Attention! 7 | 0.0.3+: `sendNotifyResponse` `sendNotifyResponseWithRSA` are methods of `$notify`, eg: 8 | ```php 9 | $notify = $alipayGlobal->getNotify(); 10 | $notify->sendNotifyResponse(); // $alipayGlobal->sendNotifyResponse() is desprecated 11 | $notify->sendNotifyResponseWithRSA(); // $alipayGlobal->sendNotifyResponseWithRSA() is desprecated 12 | /* getNotifyResponse and getNotifyResponseWithRSA are added, 13 | so you can process it by yourself in memory frameworks like Webman */ 14 | $notifyResponseWithRSA = $notify->getNotifyResponse(); 15 | $notifyResponseWithRSA = $notify->getNotifyResponseWithRSA(); 16 | ``` 17 | 18 | ## Demo 19 | The use and functionality of the SDK have been shown with **Examples** in the project folder 20 | ## Use 21 | ```Shell 22 | composer require mantoufan/alipay-global-sdk-php 23 | ``` 24 | ## How to use 25 | ### Initialize 26 | ```php 27 | $alipayGlobal = new Mantoufan\AliPayGlobal(array( 28 | 'client_id' => 'SANDBOX_5Y3A2N2YEB3002022', // Client ID 29 | 'endpoint_area' => 'ASIA', // Optional: NORTH_AMERIA / ASIA / EUROPE 30 | 'merchantPrivateKey' => '', // Merchant Private Key 31 | 'alipayPublicKey' => '', // Alipay Public Key 32 | 'is_sandbox' => true, // Whether to use the Sandbox environment 33 | )); 34 | ``` 35 | Required fields will be mark with `*` 36 | ### Online payment - Payment - Pay (Cashier Payment) 37 | API: [ac/ams/payment_cashier](https://global.alipay.com/docs/ac/ams/payment_cashier) 38 | DEMO: [pay/cashier](https://p.yzhan.co/alipay-global-sdk-php/example/?type=pay/cashier) 39 | ```php 40 | use Mantoufan\model\CustomerBelongsTo; 41 | use Mantoufan\model\TerminalType; 42 | try { 43 | $result = $alipayGlobal->payCashier(array( 44 | 'customer_belongs_to' => CustomerBelongsTo::ALIPAY_CN, // * Users pay with Alipay Chinese wallet,Optional: ALIPAY_CN / ALIPAY_HK / TRUEMONEY / TNG / GCASH / DANA / KAKAOPAY / EASYPAISA / BKASH 45 | 'notify_url' => '', // Asynchronous callback Url 46 | 'return_url' => '', // Synchronize callback Url 47 | 'amount' => array( 48 | 'currency' => 'USD', // Currency of payment 49 | 'value' => '1', // Amount of payment 50 | ), 51 | 'order' => array( 52 | 'id' => null, // Order No 53 | 'desc' => 'Order Desc', // Order Description 54 | 'extend_info' => array( 55 | 'china_extra_trans_info' => array( 56 | 'business_type' => 'MEMBERSHIP', // Business Type of Order 57 | ), 58 | ), 59 | ), 60 | 'payment_request_id' => null, // Cash payments could be null 61 | 'settlement_strategy' => array( 62 | 'currency' => 'USD', // Currency used for settlement 63 | ), 64 | 'terminal_type' => TerminalType::WEB, // * Optional: WEB / WAP / APP 65 | 'os_type' => null, // OS System Type 66 | )); 67 | header('Location: ' . $result->normalUrl); // Return URL of the alipay cashier 68 | } catch (Exception $e) { 69 | echo $e->getMessage(); // Output Error 70 | } 71 | ``` 72 | ### Online Payment - Authorization - Consult 73 | API: [ac/ams/authconsult](https://global.alipay.com/docs/ac/ams/authconsult) 74 | DEMO: [auth/consult](https://p.yzhan.co/alipay-global-sdk-php/example/?type=auth/consult) 75 | ```php 76 | use Mantoufan\tool\IdTool; 77 | use Mantoufan\model\ScopeType; 78 | use Mantoufan\model\TerminalType; 79 | $auth_state = IdTool::CreateAuthState(); 80 | try { 81 | $result = $alipayGlobal->authConsult(array( 82 | 'customer_belongs_to' => CustomerBelongsTo::ALIPAY_CN, // * Users pay with Alipay Chinese wallet,Optional: ALIPAY_CN / ALIPAY_HK / TRUEMONEY / TNG / GCASH / DANA / KAKAOPAY / EASYPAISA / BKASH 83 | 'auth_client_id' => null, // Unique ID of the secondary merchant 84 | 'auth_redirect_url' => '', // * URL that User is redirected to after User agrees to authorize 85 | 'scopes' => array(ScopeType::AGREEMENT_PAY), // * Optional AGREEMENT_PAY / BASE_USER_INFO / USER_INFO / USER_LOGIN_ID / HASH_LOGIN_ID / SEND_OTP 86 | 'auth_state' => $auth_state, // * It will be returned when User agrees to authorize needs to be guaranteed 87 | 'terminal_type' => TerminalType::WEB, // * Optional: WEB / WAP / APP 88 | 'os_type' => null, // OS System Type 89 | )); 90 | header('Location: ' . $result->normalUrl); // Return URL of User Authorization page With authCode 91 | } catch (Exception $e) { 92 | echo $e->getMessage(); // Output Error 93 | } 94 | ``` 95 | ### Online Payment - Authorization - ApplyToken - Using AuthCode 96 | API: [ac/ams/accesstokenapp](https://global.alipay.com/docs/ac/ams/accesstokenapp) 97 | DEMO: [auth/apply_token/auth_code](https://p.yzhan.co/alipay-global-sdk-php/example/?type=auth/apply_token/auth_code) 98 | ```php 99 | use Mantoufan\model\CustomerBelongsTo; 100 | use Mantoufan\model\GrantType; 101 | $auth_code = $_GET['authCode'] ?? ''; 102 | try { 103 | $result = $alipayGlobal->authApplyToken(array( 104 | 'grant_type' => GrantType::AUTHORIZATION_CODE, // * Value should be AUTHORIZATION_CODE 105 | 'customer_belongs_to' => CustomerBelongsTo::ALIPAY_CN, // * Users pay with Alipay Chinese wallet,Optional: ALIPAY_CN / ALIPAY_HK / TRUEMONEY / TNG / GCASH / DANA / KAKAOPAY / EASYPAISA / BKASH 106 | 'auth_code' => $auth_code, // * AuthCode get from return URL of User Authorization page 107 | 'refresh_token' => null, // Just leave null 108 | )); 109 | 110 | $access_token = $result->accessToken; // Access token is used for Aduto Debit 111 | $access_token_expiry_time = $result->accessTokenExpiryTime; // Access token expiry time 112 | $refresh_token = $result->refreshToken; // Refresh token is used for update access token 113 | $refresh_token_expiry_time = $result->refreshTokenExpiryTime; // Refresh token expiry time 114 | session_start(); // Start Session 115 | $_SESSION['access_token'] = $access_token; // Store Accesstoken in session 116 | } catch (Exception $e) { 117 | echo $e->getMessage(); // Output Error 118 | } 119 | ``` 120 | ### Online Payment - Authorization - ApplyToken - Using RefreshToken 121 | API: [ac/ams/accesstokenapp](https://global.alipay.com/docs/ac/ams/accesstokenapp) 122 | DEMO: [auth/apply_token/refresh_token](https://p.yzhan.co/alipay-global-sdk-php/example/?type=auth/apply_token/refresh_token) 123 | ```php 124 | use Mantoufan\model\CustomerBelongsTo; 125 | use Mantoufan\model\GrantType; 126 | $refresh_token = $_GET['refreshToken'] ?? ''; 127 | try { 128 | $result = $alipayGlobal->authApplyToken(array( 129 | 'grant_type' => GrantType::REFRESH_TOKEN, // * Value should be REFRESH_TOKEN 130 | 'customer_belongs_to' => CustomerBelongsTo::ALIPAY_CN, // * Users pay with Alipay Chinese wallet,Optional: ALIPAY_CN / ALIPAY_HK / TRUEMONEY / TNG / GCASH / DANA / KAKAOPAY / EASYPAISA / BKASH 131 | 'auth_code' => null, // Just leave null 132 | 'refresh_token' => $refresh_token, // * RefreshToken get from authApplyToken Using AuthCode 133 | )); 134 | 135 | $access_token = $result->accessToken; // Access token is used for Aduto Debit 136 | $access_token_expiry_time = $result->accessTokenExpiryTime; // Access token expiry time 137 | $refresh_token = $result->refreshToken; // Refresh token is used for update access token 138 | $refresh_token_expiry_time = $result->refreshTokenExpiryTime; // Refresh token expiry time 139 | session_start(); // Start Session 140 | $_SESSION['access_token'] = $result->accessToken; // Store Accesstoken in session 141 | } catch (Exception $e) { 142 | echo $e->getMessage(); // Output Error 143 | } 144 | ``` 145 | ### Online payment - Payment - Pay (Auto Debit) 146 | API: [ac/ams/payment_agreement](https://global.alipay.com/docs/ac/ams/payment_agreement) 147 | DEMO: [pay/agreement](https://p.yzhan.co/alipay-global-sdk-php/example/?type=pay/agreement) 148 | ```php 149 | try { 150 | session_start(); 151 | $result = $alipayGlobal->payAgreement(array( 152 | 'notify_url' => '', // Asynchronous callback Url 153 | 'return_url' => '', // Synchronous callback Url 154 | 'amount' => array( 155 | 'currency' => 'USD', // Currency of payment 156 | 'value' => '1', // Amount of payment 157 | ), 158 | 'order' => array( 159 | 'id' => null, // Order No 160 | 'desc' => 'Order Desc', // Order Description 161 | 'extend_info' => array( 162 | 'china_extra_trans_info' => array( 163 | 'business_type' => 'MEMBERSHIP', // Business Type of Order 164 | ), 165 | ), 166 | ), 167 | 'goods' => array( 168 | array( 169 | 'id' => null, // Goods ID 170 | 'name' => 'Goods Name', // Goods Name 171 | 'category' => null, // Goods Category 172 | 'brand' => null, // Goods Brand 173 | 'unit_amount' => null, // Goods Charge Unit 174 | 'quantity' => null, // Goods Quantity 175 | 'sku_name' => null, // Goods SKU Name 176 | ), 177 | ), 178 | 'merchant' => array( // Secondary merchant Info 179 | 'MCC' => null, 180 | 'name' => null, 181 | 'display_name' => null, 182 | 'address' => null, 183 | 'register_date' => null, 184 | 'store' => null, 185 | 'type' => null, 186 | ), 187 | 'buyer' => array( // Buyer Info 188 | 'id' => null, // Buyer ID 189 | 'name' => array( 190 | 'first_name' => 'David', // * Buyer First Name 191 | 'last_name' => 'Chen', // * Buyer Last Name 192 | ), 193 | 'phone_no' => null, // Buyer Phone Number 194 | 'email' => null, // Buyer Email 195 | ), 196 | 'payment_request_id' => null, // Auto Debit payments could be null 197 | 'payment_method' => array( 198 | 'payment_method_type' => CustomerBelongsTo::ALIPAY_CN, // * Users pay with Alipay Chinese wallet,Optional: ALIPAY_CN / ALIPAY_HK / TRUEMONEY / TNG / GCASH / DANA / KAKAOPAY / EASYPAISA / BKASH 199 | 'payment_method_id' => $_SESSION['access_token'], // * AccessToken returned by applyToken 200 | ), 201 | 'settlement_strategy' => array( 202 | 'currency' => 'USD', // Currency used for settlement 203 | ), 204 | 'terminal_type' => TerminalType::WEB, // * Optional: WEB / WAP / APP 205 | 'os_type' => null, // OS Type 206 | )); 207 | var_dump($result); // Output Result 208 | } catch (Exception $e) { 209 | echo $e->getMessage(); // Output Error 210 | } 211 | ``` 212 | ### Online payment - Payment - NotifyPayment 213 | API: [ac/ams/paymentrn_online](https://global.alipay.com/docs/ac/ams/paymentrn_online) 214 | DEMO: [notify](https://p.yzhan.co/alipay-global-sdk-php/example/?type=notify) 215 | ```php 216 | try { 217 | /* Get Asynchronous Payment Notifications */ 218 | $notify = $alipayGlobal->getNotify(); 219 | /* Default Value same as: 220 | $notify = $alipayGlobal->getNotify(array( 221 | 'httpMethod' => $_SERVER['REQUEST_METHOD'], 222 | 'path' => $_SERVER['REQUEST_URI'], 223 | 'clientId' => $_SERVER['HTTP_CLIENT_ID'], 224 | 'rsqTime' => $_SERVER['HTTP_REQUEST_TIME'], 225 | 'rsqBody' => file_get_contents('php://input'), 226 | 'signature' => $_SERVER['HTTP_SIGNATURE'] 227 | ));*/ 228 | /* Webman Example: 229 | $notify = $alipayGlobal->getNotify(array( 230 | 'httpMethod' => $request->method(), 231 | 'path' => $request->uri(), 232 | 'clientId' => $request->header('client-id'), 233 | 'rsqTime' => $request->header('request-time'), 234 | 'rsqBody' => $request->rawBody(), 235 | 'signature' => $request->header('signature') 236 | ));*/ 237 | 238 | // Do something 239 | 240 | // Method 1: use header () and echo response 241 | $notify->sendNotifyResponseWithRSA(); // Tell Alipay Global the notice has been received and there is no need to send it again 242 | 243 | // Method 2: Or Get headers and body, process it by yourself 244 | $notifyResponseWithRSA = $notify->getNotifyResponseWithRSA(); 245 | // Webman Example: 246 | // response($notifyResponseWithRSA['body'], 200, $notifyResponseWithRSA['headers']); 247 | } catch (Exception $e) { 248 | echo $e->getMessage(); // Output Error 249 | } 250 | ``` 251 | ### Online Payment - Authorization - NotifyAuthorization 252 | API: [ac/ams/notifyauth](https://global.alipay.com/docs/ac/ams/notifyauth) 253 | DEMO: [notify/auth/auth_code](https://p.yzhan.co/alipay-global-sdk-php/example/?type=notify/auth/auth_code) 254 | ```php 255 | try { 256 | /* Get Asynchronous Payment Notifications */ 257 | $notify = $alipayGlobal->getNotify(); 258 | /* Default Value same as: 259 | $notify = $alipayGlobal->getNotify(array( 260 | 'httpMethod' => $_SERVER['REQUEST_METHOD'], 261 | 'path' => $_SERVER['REQUEST_URI'], 262 | 'clientId' => $_SERVER['HTTP_CLIENT_ID'], 263 | 'rsqTime' => $_SERVER['HTTP_REQUEST_TIME'], 264 | 'rsqBody' => file_get_contents('php://input'), 265 | 'signature' => $_SERVER['HTTP_SIGNATURE'] 266 | ));*/ 267 | /* Webman Example: 268 | $notify = $alipayGlobal->getNotify(array( 269 | 'httpMethod' => $request->method(), 270 | 'path' => $request->uri(), 271 | 'clientId' => $request->header('client-id'), 272 | 'rsqTime' => $request->header('request-time'), 273 | 'rsqBody' => $request->rawBody(), 274 | 'signature' => $request->header('signature') 275 | ));*/ 276 | 277 | // Do something 278 | 279 | $rsqBody = $notify->getRsqBody(); // Get Response Body of Notification 280 | $authorization_notify_type = $reqBody->authorizationNotifyType; // Determine Notification Type 281 | if ($authorization_notify_type === 'AUTHCODE_CREATED') { // If Notification Type is sent AuthCode 282 | $_SESSION['auth_code'] = $reqBody->authCode; // Get AuthCode 283 | } 284 | 285 | // Method 1: use header () and echo response 286 | $notify->sendNotifyResponseWithRSA(); // Tell Alipay Global the notice has been received and there is no need to send it again 287 | 288 | // Method 2: Or Get headers and body, process it by yourself 289 | $notifyResponseWithRSA = $notify->getNotifyResponseWithRSA(); 290 | // Webman Example: 291 | // response($notifyResponseWithRSA['body'], 200, $notifyResponseWithRSA['headers']); 292 | } catch (Exception $e) { 293 | echo $e->getMessage(); // Output Error 294 | } 295 | ``` 296 | ### Online Payment - Refund - Refund 297 | API: [ac/ams/refund_online](https://global.alipay.com/docs/ac/ams/refund_online) 298 | DEMO: [refund/refund_online](https://p.yzhan.co/alipay-global-sdk-php/example/?type=refund/refund_online) 299 | ```php 300 | try { 301 | $result = $alipayGlobal->sendRefund(array( 302 | 'paymentId' => '20181129190741010007000000XXXX', // Unique ID assigned by Alipay for the original payment to be refunded. 303 | 'refundRequestId' => 'S7mMoYxQxWjJDWwm2NG4WxmNbM5z3GvSB6PEPvMeYP21PQUtrX9hXlgbQMajt2on', // Unique ID assigned by the merchant to identify a refund request. 304 | 'refundAmount' => array( 305 | 'currency' => 'USD', // Currency of refund 306 | 'value' => '100', // Amount of refund 307 | ) 308 | )); 309 | var_dump($result); 310 | } catch (Exception $e) { 311 | echo $e->getMessage(); 312 | } 313 | ``` 314 | ### Return Url 315 | DEMO: [return](https://p.yzhan.co/alipay-global-sdk-php/example/?type=return) 316 | ```php 317 | /** Return immediately after payment or authorization 318 | * After Payment, user will be redirected only 319 | * After Authorization, user will be redirected with authCode 320 | * Suggestion: The Return URL is only used as a reminder 321 | * It's beter to process business in asynchronous payment notification and asynchronous authorization notification 322 | **/ 323 | echo 'Payment Or Authorization completed'; 324 | ``` -------------------------------------------------------------------------------- /src/AliPayGlobal.php: -------------------------------------------------------------------------------- 1 | '', 40 | 'endpoint_area' => 'ASIA', 41 | 'merchantPrivateKey' => '', 42 | 'alipayPublicKey' => '', 43 | 'is_sandbox' => false, 44 | ), $params); 45 | $this->alipayPublicKey = $params['alipayPublicKey']; 46 | $this->merchantPrivateKey = $params['merchantPrivateKey']; 47 | $this->client_id = $params['client_id']; 48 | $this->is_sandbox = $params['is_sandbox']; 49 | $this->alipayClient = new AcAlipayClient( 50 | constant(Endpoint::class . '::' . $params['endpoint_area']), 51 | $this->merchantPrivateKey, 52 | $this->alipayPublicKey 53 | ); 54 | } 55 | 56 | public function getPath($key) 57 | { 58 | return str_replace('{sandbox}', $this->is_sandbox ? 'sandbox/' : '', self::PATH_PREFIX . $key); 59 | } 60 | 61 | public function payCashier($params) 62 | { 63 | $params = array_merge(array( 64 | 'notify_url' => null, 65 | 'return_url' => null, 66 | 'amount' => array( 67 | 'currency' => null, 68 | 'value' => null, 69 | ), 70 | 'order' => array( 71 | 'id' => null, 72 | 'desc' => null, 73 | 'extend_info' => array( 74 | 'china_extra_trans_info' => array( 75 | 'business_type' => null, 76 | ), 77 | ), 78 | ), 79 | 'payment_request_id' => null, 80 | 'settlement_strategy' => array( 81 | 'currency' => null, 82 | ), 83 | 'terminal_type' => null, 84 | 'os_type' => null, 85 | 'os_version' => null, 86 | ), $params); 87 | 88 | $alipayPayRequest = new AlipayPayRequest(); 89 | $alipayPayRequest->setPath($this->getPath('payments/pay')); 90 | $alipayPayRequest->setClientId($this->client_id); 91 | 92 | $alipayPayRequest->setProductCode(ProductCodeType::CASHIER_PAYMENT); 93 | $alipayPayRequest->setPaymentNotifyUrl($params['notify_url']); 94 | $alipayPayRequest->setPaymentRedirectUrl($params['return_url']); 95 | $alipayPayRequest->setPaymentRequestId($params['payment_request_id'] ?? IdTool::CreatePaymentRequestId()); 96 | 97 | $paymentMethod = new PaymentMethod(); 98 | $paymentMethod->setPaymentMethodType($params['customer_belongs_to']); 99 | $alipayPayRequest->setPaymentMethod($paymentMethod); 100 | 101 | $amount = new Amount(); 102 | $amount->setCurrency($params['amount']['currency']); 103 | $amount->setValue($params['amount']['value']); 104 | 105 | $order = new Order(); 106 | $order->setOrderDescription($params['order']['desc']); 107 | $order->setReferenceOrderId($params['order']['id'] ?? IdTool::CreateReferenceOrderId()); 108 | $order->setOrderAmount($amount); 109 | 110 | $chinaExtraTransInfo = new ChinaExtraTransInfo(); 111 | $chinaExtraTransInfo->setBusinessType($params['order']['extend_info']['china_extra_trans_info']['business_type']); 112 | $extendInfo = $chinaExtraTransInfo; 113 | 114 | $extendInfo = new ExtendInfo(); 115 | $extendInfo->setChinaExtraTransInfo($chinaExtraTransInfo); 116 | $order->setExtendInfo($extendInfo . ''); 117 | 118 | $env = new Env(); 119 | $env->setTerminalType($params['terminal_type']); 120 | $env->setOsType($params['os_type']); 121 | $order->setEnv($env); 122 | 123 | $alipayPayRequest->setPaymentAmount($amount); 124 | $alipayPayRequest->setOrder($order); 125 | 126 | $settlementStrategy = new SettlementStrategy(); 127 | $settlementStrategy->setSettlementCurrency($params['settlement_strategy']['currency']); 128 | $alipayPayRequest->setSettlementStrategy($settlementStrategy); 129 | 130 | try { 131 | return $this->alipayClient->execute($alipayPayRequest); 132 | } catch (Exception $e) { 133 | throw $e; 134 | } 135 | } 136 | 137 | public function getNotify($params = array()) 138 | { 139 | if (empty($params) && isset($_SERVER['REQUEST_METHOD']) && isset($_SERVER['REQUEST_URI']) && isset($_SERVER['HTTP_CLIENT_ID']) && isset($_SERVER['HTTP_REQUEST_TIME']) && isset($_SERVER['HTTP_SIGNATURE'])) { 140 | $params = array_merge(array( 141 | 'httpMethod' => $_SERVER['REQUEST_METHOD'], 142 | 'path' => $_SERVER['REQUEST_URI'], 143 | 'clientId' => $_SERVER['HTTP_CLIENT_ID'], 144 | 'rsqTime' => $_SERVER['HTTP_REQUEST_TIME'], 145 | 'rsqBody' => file_get_contents('php://input'), 146 | 'signature' => $_SERVER['HTTP_SIGNATURE'] 147 | ), $params); 148 | } 149 | 150 | if (empty($params['merchantPrivateKey'])) $params['merchantPrivateKey'] = $this->merchantPrivateKey; 151 | if (empty($params['httpMethod'])) throw new Exception('Http Method cannot be empty'); 152 | if (empty($params['path'])) throw new Exception('Path cannot be empty'); 153 | if (empty($params['clientId'])) throw new Exception('Client Id cannot be empty'); 154 | if (empty($params['rsqTime'])) throw new Exception('RsqTime cannot be empty'); 155 | if (isset($params['rsqBody']) === false) throw new Exception('RsqBody is undefined'); 156 | if (empty($params['signature'])) throw new Exception('Signature cannot be empty'); 157 | 158 | $alipayAcNotify = new AlipayAcNotify($params); 159 | $notifyPaymentRequest = $alipayAcNotify->getNotifyPaymentRequest(); 160 | $result = SignatureTool::verify( 161 | $notifyPaymentRequest->getHttpMethod(), 162 | $notifyPaymentRequest->getPath(), 163 | $notifyPaymentRequest->getClientId(), 164 | $notifyPaymentRequest->getRsqTime(), 165 | $notifyPaymentRequest->getRsqBody(), 166 | $notifyPaymentRequest->getSignature(), 167 | $this->alipayPublicKey 168 | ); 169 | if ($result === 0) { 170 | throw new Exception('Invalid Signature'); 171 | } 172 | return $alipayAcNotify; 173 | } 174 | 175 | public function authConsult($params) 176 | { 177 | $params = array_merge(array( 178 | 'customer_belongs_to' => null, // * 179 | 'auth_client_id' => null, 180 | 'auth_redirect_url' => null, // * 181 | 'scopes' => null, // * 182 | 'auth_state' => null, // * 183 | 'terminal_type' => null, // * 184 | 'os_type' => null, 185 | 'os_version' => null, 186 | ), $params); 187 | $alipayAuthConsultRequest = new AlipayAuthConsultRequest(); 188 | $alipayAuthConsultRequest->setPath($this->getPath('authorizations/consult')); 189 | $alipayAuthConsultRequest->setClientId($this->client_id); 190 | 191 | $alipayAuthConsultRequest->setCustomerBelongsTo($params['customer_belongs_to']); 192 | $alipayAuthConsultRequest->setAuthClientId($params['auth_client_id']); 193 | $alipayAuthConsultRequest->setAuthRedirectUrl($params['auth_redirect_url']); 194 | $alipayAuthConsultRequest->setScopes($params['scopes']); 195 | $alipayAuthConsultRequest->setAuthState($params['auth_state'] ?? IdTool::CreateAuthState()); 196 | $alipayAuthConsultRequest->setTerminalType($params['terminal_type']); 197 | $alipayAuthConsultRequest->setOsType($params['os_type']); 198 | $alipayAuthConsultRequest->setOsVersion($params['os_version']); 199 | 200 | try { 201 | return $this->alipayClient->execute($alipayAuthConsultRequest); 202 | } catch (Exception $e) { 203 | throw $e; 204 | } 205 | } 206 | 207 | public function authApplyToken($params) 208 | { 209 | $params = array_merge(array( 210 | 'grant_type' => null, // * 211 | 'customer_belongs_to' => null, 212 | 'auth_code' => null, // * 213 | 'refresh_token' => null, // * 214 | ), $params); 215 | 216 | $AlipayAuthApplyTokenRequest = new AlipayAuthApplyTokenRequest(); 217 | $AlipayAuthApplyTokenRequest->setPath($this->getPath('authorizations/applyToken')); 218 | $AlipayAuthApplyTokenRequest->setClientId($this->client_id); 219 | 220 | $AlipayAuthApplyTokenRequest->setGrantType($params['grant_type']); 221 | $AlipayAuthApplyTokenRequest->setCustomerBelongsTo($params['customer_belongs_to']); 222 | $AlipayAuthApplyTokenRequest->setAuthCode($params['auth_code']); 223 | $AlipayAuthApplyTokenRequest->setRefreshToken($params['refresh_token']); 224 | 225 | try { 226 | return $this->alipayClient->execute($AlipayAuthApplyTokenRequest); 227 | } catch (Exception $e) { 228 | throw $e; 229 | } 230 | } 231 | 232 | public function payAgreement($params) 233 | { 234 | $params = array_merge(array( 235 | 'notify_url' => null, 236 | 'return_url' => null, 237 | 'amount' => array( 238 | 'currency' => null, 239 | 'value' => null, 240 | ), 241 | 'order' => array( 242 | 'id' => null, 243 | 'desc' => null, 244 | 'extend_info' => array( 245 | 'china_extra_trans_info' => array( 246 | 'business_type' => null, 247 | ), 248 | ), 249 | ), 250 | 'goods' => array( 251 | array( 252 | 'id' => null, 253 | 'name' => null, 254 | 'category' => null, 255 | 'brand' => null, 256 | 'unit_amount' => null, 257 | 'quantity' => null, 258 | 'sku_name' => null, 259 | ), 260 | ), 261 | 'merchant' => array( 262 | 'MCC' => null, 263 | 'name' => null, 264 | 'display_name' => null, 265 | 'address' => null, 266 | 'register_date' => null, 267 | 'store' => null, 268 | 'type' => null, 269 | ), 270 | 'buyer' => array( 271 | 'id' => null, 272 | 'name' => array( 273 | 'first_name' => null, 274 | 'last_name' => null, 275 | ), 276 | 'phone_no' => null, 277 | 'email' => null, 278 | ), 279 | 'payment_request_id' => null, 280 | 'payment_method' => array( 281 | 'payment_method_type' => null, 282 | 'payment_method_id' => null, 283 | ), 284 | 'settlement_strategy' => array( 285 | 'currency' => null, 286 | ), 287 | ), $params); 288 | 289 | $alipayPayRequest = new AlipayPayRequest(); 290 | $alipayPayRequest->setPath($this->getPath('payments/pay')); 291 | $alipayPayRequest->setClientId($this->client_id); 292 | 293 | $alipayPayRequest->setProductCode(ProductCodeType::AGREEMENT_PAYMENT); 294 | $alipayPayRequest->setPaymentNotifyUrl($params['notify_url']); 295 | $alipayPayRequest->setPaymentRedirectUrl($params['return_url']); 296 | $alipayPayRequest->setPaymentRequestId($params['payment_request_id'] ?? IdTool::CreatePaymentRequestId()); 297 | 298 | $paymentMethod = new PaymentMethod(); 299 | $paymentMethod->setPaymentMethodType($params['payment_method']['payment_method_type']); 300 | $paymentMethod->setPaymentMethodId($params['payment_method']['payment_method_id']); 301 | $alipayPayRequest->setPaymentMethod($paymentMethod); 302 | 303 | $amount = new Amount(); 304 | $amount->setCurrency($params['amount']['currency']); 305 | $amount->setValue($params['amount']['value']); 306 | $alipayPayRequest->setPaymentAmount($amount); 307 | 308 | $order = new Order(); 309 | $order->setOrderDescription($params['order']['desc']); 310 | $order->setReferenceOrderId($params['order']['id'] ?? IdTool::CreateReferenceOrderId()); 311 | $order->setOrderAmount($amount); 312 | 313 | $chinaExtraTransInfo = new ChinaExtraTransInfo(); 314 | $chinaExtraTransInfo->setBusinessType($params['order']['extend_info']['china_extra_trans_info']['business_type']); 315 | $extendInfo = $chinaExtraTransInfo; 316 | 317 | $extendInfo = new ExtendInfo(); 318 | $extendInfo->setChinaExtraTransInfo($chinaExtraTransInfo); 319 | $order->setExtendInfo($extendInfo . ''); 320 | 321 | $env = new Env(); 322 | $env->setTerminalType($params['terminal_type']); 323 | $env->setOsType($params['os_type']); 324 | $order->setEnv($env); 325 | 326 | $goodsArr = array(); 327 | if (!empty($params['goods'])) { 328 | foreach ($params['goods'] as $good) { 329 | $goods = new Goods(); 330 | $goods->setReferenceGoodsId($good['id'] ?? IdTool::CreateReferenceGoodsId()); 331 | $goods->setGoodsName($good['name']); 332 | $goods->setGoodsCategory($good['category']); 333 | $goods->setGoodsBrand($good['brand']); 334 | $goods->setGoodsUnitAmount($good['unit_amount']); 335 | $goods->setGoodsQuantity($good['quantity']); 336 | $goods->setGoodsSkuName($good['sku_name']); 337 | $goodsArr[] = $goods; 338 | } 339 | $order->setGoods($goodsArr); 340 | } 341 | if (!empty($params['merchant'])) { 342 | $merchant = new Merchant(); 343 | $merchant->setReferenceMerchantId($params['merchant']['id'] ?? IdTool::CreateReferenceMerchantId()); 344 | $merchant->setMerchantMCC($params['merchant']['MCC']); 345 | $merchant->setMerchantName($params['merchant']['name']); 346 | $merchant->setMerchantDisplayName($params['merchant']['display_name']); 347 | $merchant->setMerchantAddress($params['merchant']['address']); 348 | $merchant->setMerchantRegisterDate($params['merchant']['register_date']); 349 | $merchant->setStore($params['merchant']['store']); 350 | $merchant->setMerchantType($params['merchant']['type']); 351 | $order->setMerchant($merchant); 352 | } 353 | 354 | if (!empty($params['buyer'])) { 355 | $buyer = new Buyer(); 356 | $buyer->setReferenceBuyerId($params['buyer']['id'] ?? IdTool::CreateBuyerId()); 357 | $buyer->setBuyerName($params['buyer']['name']); 358 | $buyer->setBuyerPhoneNo($params['buyer']['phone_no']); 359 | $buyer->setBuyerEmail($params['buyer']['email']); 360 | $order->setBuyer($buyer); 361 | } 362 | 363 | $alipayPayRequest->setOrder($order); 364 | 365 | $settlementStrategy = new SettlementStrategy(); 366 | $settlementStrategy->setSettlementCurrency($params['settlement_strategy']['currency']); 367 | $alipayPayRequest->setSettlementStrategy($settlementStrategy); 368 | 369 | $alipayPayRequest->setIsAuthorization(true); 370 | 371 | try { 372 | return $this->alipayClient->execute($alipayPayRequest); 373 | } catch (Exception $e) { 374 | throw $e; 375 | } 376 | } 377 | 378 | public function sendRefund($params) 379 | { 380 | $params = array_merge(array( 381 | 'paymentId' => null, 382 | 'refundRequestId' => null, 383 | 'refundAmount' => array( 384 | 'currency' => null, 385 | 'value' => null, 386 | ) 387 | ), $params); 388 | 389 | $alipayRefundRequest = new AlipayRefundRequest(); 390 | $alipayRefundRequest->setPath($this->getPath('payments/refund')); 391 | $alipayRefundRequest->setClientId($this->client_id); 392 | 393 | $alipayRefundRequest->setRefundRequestId($params['refundRequestId']); 394 | $alipayRefundRequest->setPaymentId($params['paymentId']); 395 | $alipayRefundRequest->setRefundAmount($params['refundAmount']); 396 | 397 | try { 398 | return $this->alipayClient->execute($alipayRefundRequest); 399 | } catch (Exception $e) { 400 | throw $e; 401 | } 402 | } 403 | } 404 | -------------------------------------------------------------------------------- /src/client/AcAlipayClient.php: -------------------------------------------------------------------------------- 1 | setRspBody($rspBody); 42 | 43 | $headArr = explode("\r\n", $headerContent); 44 | foreach ($headArr as $headerItem) { 45 | if (strstr($headerItem, "response-time") || strstr($headerItem, "signature")) { 46 | $responseTime = $this->getResponseTime($headerItem); 47 | if (isset($responseTime) && $responseTime != null) { 48 | $httpRpcResult->setRspTime(trim($responseTime)); 49 | } else { 50 | $signatureValue = $this->getResponseSignature($headerItem); 51 | if (isset($signatureValue) && $signatureValue != null) { 52 | $httpRpcResult->setRspSign($signatureValue); 53 | } 54 | } 55 | } 56 | } 57 | 58 | curl_close($curl); 59 | 60 | return $httpRpcResult; 61 | } 62 | 63 | private function getResponseTime($headerItem) 64 | { 65 | if (strstr($headerItem, "response-time")) { 66 | $startIndex = strpos($headerItem, ":") + 1; 67 | $responseTime = substr($headerItem, $startIndex); 68 | return $responseTime; 69 | } 70 | return null; 71 | } 72 | 73 | private function getResponseSignature($headerItem) 74 | { 75 | if (strstr($headerItem, "signature")) { 76 | $startIndex = strrpos($headerItem, "=") + 1; 77 | $signatureValue = substr($headerItem, $startIndex); 78 | return $signatureValue; 79 | } 80 | return null; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/client/BaseAlipayClient.php: -------------------------------------------------------------------------------- 1 | gatewayUrl = $gatewayUrl; 17 | $this->merchantPrivateKey = $merchantPrivateKey; 18 | $this->alipayPublicKey = $alipayPublicKey; 19 | } 20 | 21 | public function execute($request) 22 | { 23 | 24 | $this->checkRequestParam($request); 25 | 26 | $clientId = $request->getClientId(); 27 | $httpMethod = $request->getHttpMethod(); 28 | $path = $request->getPath(); 29 | $keyVersion = $request->getKeyVersion(); 30 | $reqTime = date(DATE_ISO8601); 31 | $reqBody = json_encode($request); 32 | 33 | $signValue = $this->genSignValue($httpMethod, $path, $clientId, $reqTime, $reqBody); 34 | $baseHeaders = $this->buildBaseHeader($reqTime, $clientId, $keyVersion, $signValue); 35 | $customHeaders = $this->buildCustomHeader(); 36 | if (isset($customHeaders) && count($customHeaders) > 0) { 37 | $headers = array_merge($baseHeaders, $customHeaders); 38 | } else { 39 | $headers = $baseHeaders; 40 | } 41 | 42 | $requestUrl = $this->genRequestUrl($path); 43 | // print_r($requestUrl); 44 | // echo '
'; 45 | // print_r($httpMethod); 46 | // echo '
'; 47 | // print_r($headers); 48 | // echo '
'; 49 | // print_r($reqBody); 50 | // echo '
'; 51 | $rsp = $this->sendRequest($requestUrl, $httpMethod, $headers, $reqBody); 52 | if (!isset($rsp) || $rsp == null) { 53 | throw new Exception("HttpRpcResult is null."); 54 | } 55 | 56 | $rspBody = $rsp->getRspBody(); 57 | $rspSignValue = $rsp->getRspSign(); 58 | $rspTime = $rsp->getRspTime(); 59 | 60 | $alipayRsp = json_decode($rspBody); 61 | 62 | $result = $alipayRsp->result; 63 | if (!isset($result)) { 64 | throw new Exception("Response data error,result field is null,rspBody:" . $rspBody); 65 | } 66 | 67 | if (!isset($rspSignValue) || trim($rspSignValue) === "" || !isset($rspTime) || trim($rspTime) === "") { 68 | return $alipayRsp; 69 | } 70 | 71 | $isVerifyPass = $this->checkRspSign($httpMethod, $path, $clientId, $rspTime, $rspBody, $rspSignValue); 72 | 73 | if (!$isVerifyPass) { 74 | throw new Exception("Response signature verify fail."); 75 | } 76 | return $alipayRsp; 77 | } 78 | 79 | private function checkRequestParam($request) 80 | { 81 | 82 | if (!isset($request)) { 83 | throw new Exception("alipayRequest can't null"); 84 | } 85 | 86 | $clientId = $request->getClientId(); 87 | $httpMehod = $request->getHttpMethod(); 88 | $path = $request->getPath(); 89 | $keyVersion = $request->getKeyVersion(); 90 | 91 | if (!isset($this->gatewayUrl) || trim($this->gatewayUrl) === "") { 92 | throw new Exception("clientId can't null"); 93 | } 94 | 95 | if (!isset($clientId) || trim($clientId) === "") { 96 | throw new Exception("clientId can't null"); 97 | } 98 | 99 | if (!isset($httpMehod) || trim($httpMehod) === "") { 100 | throw new Exception("httpMehod can't null"); 101 | } 102 | 103 | if (!isset($path) || trim($path) === "") { 104 | throw new Exception("path can't null"); 105 | } 106 | 107 | if (strpos($path, '/') != 0) { 108 | throw new Exception("path must start with /"); 109 | } 110 | 111 | if (isset($keyVersion) && !is_numeric($keyVersion)) { 112 | throw new Exception("keyVersion must be numeric"); 113 | } 114 | 115 | } 116 | 117 | private function genSignValue($httpMethod, $path, $clientId, $reqTime, $reqBody) 118 | { 119 | try { 120 | $signValue = SignatureTool::sign($httpMethod, $path, $clientId, $reqTime, $reqBody, $this->merchantPrivateKey); 121 | } catch (Exception $e) { 122 | throw new Exception($e); 123 | } 124 | return $signValue; 125 | } 126 | 127 | private function checkRspSign($httpMethod, $path, $clientId, $rspTime, $rspBody, $rspSignValue) 128 | { 129 | try { 130 | $isVerify = SignatureTool::verify($httpMethod, $path, $clientId, $rspTime, $rspBody, $rspSignValue, $this->alipayPublicKey); 131 | } catch (Exception $e) { 132 | throw new Exception($e); 133 | } 134 | return $isVerify; 135 | } 136 | 137 | private function buildBaseHeader($requestTime, $clientId, $keyVersion, $signValue) 138 | { 139 | $baseHeader = array(); 140 | $baseHeader[] = "Content-Type:application/json; charset=UTF-8"; 141 | $baseHeader[] = "User-Agent:global-alipay-sdk-php"; 142 | $baseHeader[] = "Request-Time:" . $requestTime; 143 | $baseHeader[] = "client-id:" . $clientId; 144 | 145 | if (!isset($keyVersion)) { 146 | $keyVersion = self::DEFULT_KEY_VERSION; 147 | } 148 | $signatureHeader = "algorithm=RSA256,keyVersion=" . $keyVersion . ",signature=" . $signValue; 149 | $baseHeader[] = "Signature:" . $signatureHeader; 150 | return $baseHeader; 151 | } 152 | 153 | private function genRequestUrl($path) 154 | { 155 | if (strpos($this->gatewayUrl, "https://") != 0) { 156 | $this->gatewayUrl = "https://" . $this->gatewayUrl; 157 | } 158 | 159 | if (substr_compare($this->gatewayUrl, '/', -strlen('/')) === 0) { 160 | $len = strlen($this->gatewayUrl); 161 | $this->gatewayUrl = substr($this->gatewayUrl, 0, $len - 1); 162 | } 163 | 164 | $requestUrl = $this->gatewayUrl . $path; 165 | return $requestUrl; 166 | 167 | } 168 | 169 | abstract protected function buildCustomHeader(); 170 | 171 | abstract protected function sendRequest($requestUrl, $httpMethod, $headers, $reqBody); 172 | } 173 | -------------------------------------------------------------------------------- /src/model/Address.php: -------------------------------------------------------------------------------- 1 | region; 19 | } 20 | 21 | /** 22 | * @param String $region 23 | */ 24 | public function setRegion($region) 25 | { 26 | $this->region = $region; 27 | } 28 | 29 | /** 30 | * @return String 31 | */ 32 | public function getState() 33 | { 34 | return $this->state; 35 | } 36 | 37 | /** 38 | * @param String $state 39 | */ 40 | public function setState($state) 41 | { 42 | $this->state = $state; 43 | } 44 | 45 | /** 46 | * @return String 47 | */ 48 | public function getCity() 49 | { 50 | return $this->city; 51 | } 52 | 53 | /** 54 | * @param mixed $city 55 | */ 56 | public function setCity($city) 57 | { 58 | $this->city = $city; 59 | } 60 | 61 | /** 62 | * @return Address 63 | */ 64 | public function getAddress1() 65 | { 66 | return $this->address1; 67 | } 68 | 69 | /** 70 | * @param Address $address1 71 | */ 72 | public function setAddress1($address1) 73 | { 74 | $this->address1 = $address1; 75 | } 76 | 77 | /** 78 | * @return Address 79 | */ 80 | public function getAddress2() 81 | { 82 | return $this->address2; 83 | } 84 | 85 | /** 86 | * @param Address $address2 87 | */ 88 | public function setAddress2($address2) 89 | { 90 | $this->address2 = $address2; 91 | } 92 | 93 | /** 94 | * @return String 95 | */ 96 | public function getZipCode() 97 | { 98 | return $this->zipCode; 99 | } 100 | 101 | /** 102 | * @param String $zipCode 103 | */ 104 | public function setZipCode($zipCode) 105 | { 106 | $this->zipCode = $zipCode; 107 | } 108 | 109 | /** 110 | * @return mixed 111 | */ 112 | public function getLabel() 113 | { 114 | return $this->label; 115 | } 116 | 117 | /** 118 | * @param mixed $label 119 | */ 120 | public function setLabel($label) 121 | { 122 | $this->label = $label; 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /src/model/Amount.php: -------------------------------------------------------------------------------- 1 | currency; 15 | } 16 | 17 | /** 18 | * @param String $currency 19 | */ 20 | public function setCurrency($currency) 21 | { 22 | $this->currency = $currency; 23 | } 24 | 25 | /** 26 | * @return String 27 | */ 28 | public function getValue() 29 | { 30 | return $this->value; 31 | } 32 | 33 | /** 34 | * @param String $value 35 | */ 36 | public function setValue($value) 37 | { 38 | $this->value = $value; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/model/AmountLimit.php: -------------------------------------------------------------------------------- 1 | maxAmount; 16 | } 17 | 18 | /** 19 | * @param mixed $maxAmount 20 | */ 21 | public function setMaxAmount($maxAmount) 22 | { 23 | $this->maxAmount = $maxAmount; 24 | } 25 | 26 | /** 27 | * @return mixed 28 | */ 29 | public function getMinAmount() 30 | { 31 | return $this->minAmount; 32 | } 33 | 34 | /** 35 | * @param mixed $minAmount 36 | */ 37 | public function setMinAmount($minAmount) 38 | { 39 | $this->minAmount = $minAmount; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getRemainAmount() 46 | { 47 | return $this->remainAmount; 48 | } 49 | 50 | /** 51 | * @param mixed $remainAmount 52 | */ 53 | public function setRemainAmount($remainAmount) 54 | { 55 | $this->remainAmount = $remainAmount; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/model/AmountLimitInfo.php: -------------------------------------------------------------------------------- 1 | singleLimit; 16 | } 17 | 18 | /** 19 | * @param mixed $singleLimit 20 | */ 21 | public function setSingleLimit($singleLimit) 22 | { 23 | $this->singleLimit = $singleLimit; 24 | } 25 | 26 | /** 27 | * @return mixed 28 | */ 29 | public function getDayLimit() 30 | { 31 | return $this->dayLimit; 32 | } 33 | 34 | /** 35 | * @param mixed $dayLimit 36 | */ 37 | public function setDayLimit($dayLimit) 38 | { 39 | $this->dayLimit = $dayLimit; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getMonthLimit() 46 | { 47 | return $this->monthLimit; 48 | } 49 | 50 | /** 51 | * @param mixed $monthLimit 52 | */ 53 | public function setMonthLimit($monthLimit) 54 | { 55 | $this->monthLimit = $monthLimit; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/model/Attachment.php: -------------------------------------------------------------------------------- 1 | attachmentType; 16 | } 17 | 18 | /** 19 | * @param mixed $attachmentType 20 | */ 21 | public function setAttachmentType($attachmentType) 22 | { 23 | $this->attachmentType = $attachmentType; 24 | } 25 | 26 | /** 27 | * @return mixed 28 | */ 29 | public function getFile() 30 | { 31 | return $this->file; 32 | } 33 | 34 | /** 35 | * @param mixed $file 36 | */ 37 | public function setFile($file) 38 | { 39 | $this->file = $file; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getAttachmentName() 46 | { 47 | return $this->attachmentName; 48 | } 49 | 50 | /** 51 | * @param mixed $attachmentName 52 | */ 53 | public function setAttachmentName($attachmentName) 54 | { 55 | $this->attachmentName = $attachmentName; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/model/AuthenticationChannelType.php: -------------------------------------------------------------------------------- 1 | referenceBuyerId; 17 | } 18 | 19 | /** 20 | * @param String $referenceBuyerId 21 | */ 22 | public function setReferenceBuyerId($referenceBuyerId) 23 | { 24 | $this->referenceBuyerId = $referenceBuyerId; 25 | } 26 | 27 | /** 28 | * @return UserName 29 | */ 30 | public function getBuyerName() 31 | { 32 | return $this->buyerName; 33 | } 34 | 35 | /** 36 | * @param UserName $buyerName 37 | */ 38 | public function setBuyerName($buyerName) 39 | { 40 | $this->buyerName = $buyerName; 41 | } 42 | 43 | /** 44 | * @return String 45 | */ 46 | public function getBuyerPhoneNo() 47 | { 48 | return $this->buyerPhoneNo; 49 | } 50 | 51 | /** 52 | * @param String $buyerPhoneNo 53 | */ 54 | public function setBuyerPhoneNo($buyerPhoneNo) 55 | { 56 | $this->buyerPhoneNo = $buyerPhoneNo; 57 | } 58 | 59 | /** 60 | * @return String 61 | */ 62 | public function getBuyerEmail() 63 | { 64 | return $this->buyerEmail; 65 | } 66 | 67 | /** 68 | * @param String $buyerEmail 69 | */ 70 | public function setBuyerEmail($buyerEmail) 71 | { 72 | $this->buyerEmail = $buyerEmail; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/model/CardBrand.php: -------------------------------------------------------------------------------- 1 | cardToken; 25 | } 26 | 27 | /** 28 | * @param mixed $cardToken 29 | */ 30 | public function setCardToken($cardToken) 31 | { 32 | $this->cardToken = $cardToken; 33 | } 34 | 35 | /** 36 | * @return mixed 37 | */ 38 | public function getCardNo() 39 | { 40 | return $this->cardNo; 41 | } 42 | 43 | /** 44 | * @param mixed $cardNo 45 | */ 46 | public function setCardNo($cardNo) 47 | { 48 | $this->cardNo = $cardNo; 49 | } 50 | 51 | /** 52 | * @return mixed 53 | */ 54 | public function getBrand() 55 | { 56 | return $this->brand; 57 | } 58 | 59 | /** 60 | * @param mixed $brand 61 | */ 62 | public function setBrand($brand) 63 | { 64 | $this->brand = $brand; 65 | } 66 | 67 | /** 68 | * @return mixed 69 | */ 70 | public function getCardIssuer() 71 | { 72 | return $this->cardIssuer; 73 | } 74 | 75 | /** 76 | * @param mixed $cardIssuer 77 | */ 78 | public function setCardIssuer($cardIssuer) 79 | { 80 | $this->cardIssuer = $cardIssuer; 81 | } 82 | 83 | /** 84 | * @return mixed 85 | */ 86 | public function getCountryIssue() 87 | { 88 | return $this->countryIssue; 89 | } 90 | 91 | /** 92 | * @param mixed $countryIssue 93 | */ 94 | public function setCountryIssue($countryIssue) 95 | { 96 | $this->countryIssue = $countryIssue; 97 | } 98 | 99 | /** 100 | * @return mixed 101 | */ 102 | public function getInstUserName() 103 | { 104 | return $this->instUserName; 105 | } 106 | 107 | /** 108 | * @param mixed $instUserName 109 | */ 110 | public function setInstUserName($instUserName) 111 | { 112 | $this->instUserName = $instUserName; 113 | } 114 | 115 | /** 116 | * @return mixed 117 | */ 118 | public function getExpiryYear() 119 | { 120 | return $this->expiryYear; 121 | } 122 | 123 | /** 124 | * @param mixed $expiryYear 125 | */ 126 | public function setExpiryYear($expiryYear) 127 | { 128 | $this->expiryYear = $expiryYear; 129 | } 130 | 131 | /** 132 | * @return mixed 133 | */ 134 | public function getExpiryMonth() 135 | { 136 | return $this->expiryMonth; 137 | } 138 | 139 | /** 140 | * @param mixed $expiryMonth 141 | */ 142 | public function setExpiryMonth($expiryMonth) 143 | { 144 | $this->expiryMonth = $expiryMonth; 145 | } 146 | 147 | /** 148 | * @return mixed 149 | */ 150 | public function getBillingAddress() 151 | { 152 | return $this->billingAddress; 153 | } 154 | 155 | /** 156 | * @param mixed $billingAddress 157 | */ 158 | public function setBillingAddress($billingAddress) 159 | { 160 | $this->billingAddress = $billingAddress; 161 | } 162 | 163 | /** 164 | * @return mixed 165 | */ 166 | public function getMask() 167 | { 168 | return $this->mask; 169 | } 170 | 171 | /** 172 | * @param mixed $mask 173 | */ 174 | public function setMask($mask) 175 | { 176 | $this->mask = $mask; 177 | } 178 | 179 | /** 180 | * @return mixed 181 | */ 182 | public function getLast4() 183 | { 184 | return $this->last4; 185 | } 186 | 187 | /** 188 | * @param mixed $last4 189 | */ 190 | public function setLast4($last4) 191 | { 192 | $this->last4 = $last4; 193 | } 194 | 195 | /** 196 | * @return mixed 197 | */ 198 | public function getPaymentMethodDetailMetadata() 199 | { 200 | return $this->paymentMethodDetailMetadata; 201 | } 202 | 203 | /** 204 | * @param mixed $paymentMethodDetailMetadata 205 | */ 206 | public function setPaymentMethodDetailMetadata($paymentMethodDetailMetadata) 207 | { 208 | $this->paymentMethodDetailMetadata = $paymentMethodDetailMetadata; 209 | } 210 | } 211 | -------------------------------------------------------------------------------- /src/model/ChallengeActionForm.php: -------------------------------------------------------------------------------- 1 | challengeType; 17 | } 18 | 19 | /** 20 | * @param mixed $challengeType 21 | */ 22 | public function setChallengeType($challengeType) 23 | { 24 | $this->challengeType = $challengeType; 25 | } 26 | 27 | /** 28 | * @return mixed 29 | */ 30 | public function getChallengeRenderValue() 31 | { 32 | return $this->challengeRenderValue; 33 | } 34 | 35 | /** 36 | * @param mixed $challengeRenderValue 37 | */ 38 | public function setChallengeRenderValue($challengeRenderValue) 39 | { 40 | $this->challengeRenderValue = $challengeRenderValue; 41 | } 42 | 43 | /** 44 | * @return mixed 45 | */ 46 | public function getTriggerSource() 47 | { 48 | return $this->triggerSource; 49 | } 50 | 51 | /** 52 | * @param mixed $triggerSource 53 | */ 54 | public function setTriggerSource($triggerSource) 55 | { 56 | $this->triggerSource = $triggerSource; 57 | } 58 | 59 | /** 60 | * @return mixed 61 | */ 62 | public function getExtendInfo() 63 | { 64 | return $this->extendInfo; 65 | } 66 | 67 | /** 68 | * @param mixed $extendInfo 69 | */ 70 | public function setExtendInfo($extendInfo) 71 | { 72 | $this->extendInfo = $extendInfo; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/model/ChallengeTriggerSourceType.php: -------------------------------------------------------------------------------- 1 | businessType; 20 | } 21 | 22 | public function setBusinessType(String $businessType) 23 | { 24 | $this->businessType = $businessType; 25 | } 26 | 27 | public function getFlightNumber() 28 | { 29 | return $this->flightNumber; 30 | } 31 | 32 | public function setFlightNumber(String $flightNumber) 33 | { 34 | $this->flightNumber = $flightNumber; 35 | } 36 | 37 | public function getDepartureTime() 38 | { 39 | return $this->departureTime; 40 | } 41 | 42 | public function setDepartureTime(String $departureTime) 43 | { 44 | $this->departureTime = $departureTime; 45 | } 46 | 47 | public function getHotelName() 48 | { 49 | return $this->hotelName; 50 | } 51 | 52 | public function setHotelName(String $hotelName) 53 | { 54 | $this->hotelName = $hotelName; 55 | } 56 | 57 | public function getCheckinTime() 58 | { 59 | return $this->checkinTime; 60 | } 61 | 62 | public function setCheckinTime(String $checkinTime) 63 | { 64 | $this->checkinTime = $checkinTime; 65 | } 66 | 67 | public function getCheckoutTime() 68 | { 69 | return $this->checkoutTime; 70 | } 71 | 72 | public function setCheckoutTime(String $checkoutTime) 73 | { 74 | $this->checkoutTime = $checkoutTime; 75 | } 76 | 77 | public function getAdmissionNoticeUrl() 78 | { 79 | return $this->admissionNoticeUrl; 80 | } 81 | 82 | public function setAdmissionNoticeUrl(String $admissionNoticeUrl) 83 | { 84 | $this->admissionNoticeUrl = $admissionNoticeUrl; 85 | } 86 | 87 | public function getTotalQuantity() 88 | { 89 | return $this->totalQuantity; 90 | } 91 | 92 | public function setTotalQuantity(String $totalQuantity) 93 | { 94 | $this->totalQuantity = $totalQuantity; 95 | } 96 | 97 | public function getGoodsInfo() 98 | { 99 | return $this->goodsInfo; 100 | } 101 | 102 | public function setGoodsInfo(String $goodsInfo) 103 | { 104 | $this->goodsInfo = $goodsInfo; 105 | } 106 | 107 | public function getOtherBusinessType() 108 | { 109 | return $this->otherBusinessType; 110 | } 111 | 112 | public function setOtherBusinessType(String $otherBusinessType) 113 | { 114 | $this->otherBusinessType = $otherBusinessType; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/model/CodeDetail.php: -------------------------------------------------------------------------------- 1 | codeValueType; 16 | } 17 | 18 | /** 19 | * @param mixed $codeValueType 20 | */ 21 | public function setCodeValueType($codeValueType) 22 | { 23 | $this->codeValueType = $codeValueType; 24 | } 25 | 26 | /** 27 | * @return mixed 28 | */ 29 | public function getCodeValue() 30 | { 31 | return $this->codeValue; 32 | } 33 | 34 | /** 35 | * @param mixed $codeValue 36 | */ 37 | public function setCodeValue($codeValue) 38 | { 39 | $this->codeValue = $codeValue; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getDisplayType() 46 | { 47 | return $this->displayType; 48 | } 49 | 50 | /** 51 | * @param mixed $displayType 52 | */ 53 | public function setDisplayType($displayType) 54 | { 55 | $this->displayType = $displayType; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/model/CodeValueType.php: -------------------------------------------------------------------------------- 1 | contactNo; 15 | } 16 | 17 | /** 18 | * @param mixed $contactNo 19 | */ 20 | public function setContactNo($contactNo) 21 | { 22 | $this->contactNo = $contactNo; 23 | } 24 | 25 | /** 26 | * @return mixed 27 | */ 28 | public function getContactType() 29 | { 30 | return $this->contactType; 31 | } 32 | 33 | /** 34 | * @param mixed $contactType 35 | */ 36 | public function setContactType($contactType) 37 | { 38 | $this->contactType = $contactType; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/model/CouponPaymentMethodDetail.php: -------------------------------------------------------------------------------- 1 | couponId; 19 | } 20 | 21 | /** 22 | * @param mixed $couponId 23 | */ 24 | public function setCouponId($couponId) 25 | { 26 | $this->couponId = $couponId; 27 | } 28 | 29 | /** 30 | * @return mixed 31 | */ 32 | public function getAvailableAmount() 33 | { 34 | return $this->availableAmount; 35 | } 36 | 37 | /** 38 | * @param mixed $availableAmount 39 | */ 40 | public function setAvailableAmount($availableAmount) 41 | { 42 | $this->availableAmount = $availableAmount; 43 | } 44 | 45 | /** 46 | * @return mixed 47 | */ 48 | public function getCouponName() 49 | { 50 | return $this->couponName; 51 | } 52 | 53 | /** 54 | * @param mixed $couponName 55 | */ 56 | public function setCouponName($couponName) 57 | { 58 | $this->couponName = $couponName; 59 | } 60 | 61 | /** 62 | * @return mixed 63 | */ 64 | public function getCouponDescription() 65 | { 66 | return $this->couponDescription; 67 | } 68 | 69 | /** 70 | * @param mixed $couponDescription 71 | */ 72 | public function setCouponDescription($couponDescription) 73 | { 74 | $this->couponDescription = $couponDescription; 75 | } 76 | 77 | /** 78 | * @return mixed 79 | */ 80 | public function getCouponExpireTime() 81 | { 82 | return $this->couponExpireTime; 83 | } 84 | 85 | /** 86 | * @param mixed $couponExpireTime 87 | */ 88 | public function setCouponExpireTime($couponExpireTime) 89 | { 90 | $this->couponExpireTime = $couponExpireTime; 91 | } 92 | 93 | /** 94 | * @return mixed 95 | */ 96 | public function getPaymentMethodDetailMetadatal() 97 | { 98 | return $this->paymentMethodDetailMetadatal; 99 | } 100 | 101 | /** 102 | * @param mixed $paymentMethodDetailMetadatal 103 | */ 104 | public function setPaymentMethodDetailMetadatal($paymentMethodDetailMetadatal) 105 | { 106 | $this->paymentMethodDetailMetadatal = $paymentMethodDetailMetadatal; 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /src/model/CreditPayFeeType.php: -------------------------------------------------------------------------------- 1 | installmentNum; 16 | } 17 | 18 | /** 19 | * @param mixed $installmentNum 20 | */ 21 | public function setInstallmentNum($installmentNum) 22 | { 23 | $this->installmentNum = $installmentNum; 24 | } 25 | 26 | /** 27 | * @return mixed 28 | */ 29 | public function getCreditPayFeeType() 30 | { 31 | return $this->creditPayFeeType; 32 | } 33 | 34 | /** 35 | * @param mixed $creditPayFeeType 36 | */ 37 | public function setCreditPayFeeType($creditPayFeeType) 38 | { 39 | $this->creditPayFeeType = $creditPayFeeType; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getFeePercentage() 46 | { 47 | return $this->feePercentage; 48 | } 49 | 50 | /** 51 | * @param mixed $feePercentage 52 | */ 53 | public function setFeePercentage($feePercentage) 54 | { 55 | $this->feePercentage = $feePercentage; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/model/CustomerBelongsTo.php: -------------------------------------------------------------------------------- 1 | discountId; 18 | } 19 | 20 | /** 21 | * @param mixed $discountId 22 | */ 23 | public function setDiscountId($discountId) 24 | { 25 | $this->discountId = $discountId; 26 | } 27 | 28 | /** 29 | * @return mixed 30 | */ 31 | public function getAvailableAmount() 32 | { 33 | return $this->availableAmount; 34 | } 35 | 36 | /** 37 | * @param mixed $availableAmount 38 | */ 39 | public function setAvailableAmount($availableAmount) 40 | { 41 | $this->availableAmount = $availableAmount; 42 | } 43 | 44 | /** 45 | * @return mixed 46 | */ 47 | public function getDiscountName() 48 | { 49 | return $this->discountName; 50 | } 51 | 52 | /** 53 | * @param mixed $discountName 54 | */ 55 | public function setDiscountName($discountName) 56 | { 57 | $this->discountName = $discountName; 58 | } 59 | 60 | /** 61 | * @return mixed 62 | */ 63 | public function getDiscountDescription() 64 | { 65 | return $this->discountDescription; 66 | } 67 | 68 | /** 69 | * @param mixed $discountDescription 70 | */ 71 | public function setDiscountDescription($discountDescription) 72 | { 73 | $this->discountDescription = $discountDescription; 74 | } 75 | 76 | /** 77 | * @return mixed 78 | */ 79 | public function getPaymentMethodDetailMetadata() 80 | { 81 | return $this->paymentMethodDetailMetadata; 82 | } 83 | 84 | /** 85 | * @param mixed $paymentMethodDetailMetadata 86 | */ 87 | public function setPaymentMethodDetailMetadata($paymentMethodDetailMetadata) 88 | { 89 | $this->paymentMethodDetailMetadata = $paymentMethodDetailMetadata; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/model/DisplayType.php: -------------------------------------------------------------------------------- 1 | terminalType; 22 | } 23 | 24 | /** 25 | * @param String $terminalType 26 | */ 27 | public function setTerminalType($terminalType) 28 | { 29 | $this->terminalType = $terminalType; 30 | } 31 | 32 | /** 33 | * @return OsType 34 | */ 35 | public function getOsType() 36 | { 37 | return $this->osType; 38 | } 39 | 40 | /** 41 | * @param OsType $osType 42 | */ 43 | public function setOsType($osType) 44 | { 45 | $this->osType = $osType; 46 | } 47 | 48 | /** 49 | * @return String 50 | */ 51 | public function getUserAgent() 52 | { 53 | return $this->userAgent; 54 | } 55 | 56 | /** 57 | * @param String $userAgent 58 | */ 59 | public function setUserAgent($userAgent) 60 | { 61 | $this->userAgent = $userAgent; 62 | } 63 | 64 | /** 65 | * @return String 66 | */ 67 | public function getDeviceTokenId() 68 | { 69 | return $this->deviceTokenId; 70 | } 71 | 72 | /** 73 | * @param String $deviceTokenId 74 | */ 75 | public function setDeviceTokenId($deviceTokenId) 76 | { 77 | $this->deviceTokenId = $deviceTokenId; 78 | } 79 | 80 | /** 81 | * @return String 82 | */ 83 | public function getClientIp() 84 | { 85 | return $this->clientIp; 86 | } 87 | 88 | /** 89 | * @param String $clientIp 90 | */ 91 | public function setClientIp($clientIp) 92 | { 93 | $this->clientIp = $clientIp; 94 | } 95 | 96 | /** 97 | * @return String 98 | */ 99 | public function getCookieId() 100 | { 101 | return $this->cookieId; 102 | } 103 | 104 | /** 105 | * @param String $cookieId 106 | */ 107 | public function setCookieId($cookieId) 108 | { 109 | $this->cookieId = $cookieId; 110 | } 111 | 112 | /** 113 | * @return String 114 | */ 115 | public function getStoreTerminalId() 116 | { 117 | return $this->storeTerminalId; 118 | } 119 | 120 | /** 121 | * @param String $storeTerminalId 122 | */ 123 | public function setStoreTerminalId($storeTerminalId) 124 | { 125 | $this->storeTerminalId = $storeTerminalId; 126 | } 127 | 128 | /** 129 | * @return String 130 | */ 131 | public function getStoreTerminalRequestTime() 132 | { 133 | return $this->storeTerminalRequestTime; 134 | } 135 | 136 | /** 137 | * @param String $storeTerminalRequestTime 138 | */ 139 | public function setStoreTerminalRequestTime($storeTerminalRequestTime) 140 | { 141 | $this->storeTerminalRequestTime = $storeTerminalRequestTime; 142 | } 143 | 144 | /** 145 | * @return String 146 | */ 147 | public function getExtendInfo() 148 | { 149 | return $this->extendInfo; 150 | } 151 | 152 | /** 153 | * @param String $extendInfo 154 | */ 155 | public function setExtendInfo($extendInfo) 156 | { 157 | $this->extendInfo = $extendInfo; 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /src/model/ExtendInfo.php: -------------------------------------------------------------------------------- 1 | chinaExtraTransInfo = $chinaExtraTransInfo; 11 | } 12 | 13 | public function __toString() 14 | { 15 | return json_encode($this); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/model/ExternalPaymentMethodDetail.php: -------------------------------------------------------------------------------- 1 | assetToken; 17 | } 18 | 19 | /** 20 | * @param mixed $assetToken 21 | */ 22 | public function setAssetToken($assetToken) 23 | { 24 | $this->assetToken = $assetToken; 25 | } 26 | 27 | /** 28 | * @return mixed 29 | */ 30 | public function getAccountDisplayName() 31 | { 32 | return $this->accountDisplayName; 33 | } 34 | 35 | /** 36 | * @param mixed $accountDisplayName 37 | */ 38 | public function setAccountDisplayName($accountDisplayName) 39 | { 40 | $this->accountDisplayName = $accountDisplayName; 41 | } 42 | 43 | /** 44 | * @return mixed 45 | */ 46 | public function getDisableReason() 47 | { 48 | return $this->disableReason; 49 | } 50 | 51 | /** 52 | * @param mixed $disableReason 53 | */ 54 | public function setDisableReason($disableReason) 55 | { 56 | $this->disableReason = $disableReason; 57 | } 58 | 59 | /** 60 | * @return mixed 61 | */ 62 | public function getPaymentMethodDetailMetadata() 63 | { 64 | return $this->paymentMethodDetailMetadata; 65 | } 66 | 67 | /** 68 | * @param mixed $paymentMethodDetailMetadata 69 | */ 70 | public function setPaymentMethodDetailMetadata($paymentMethodDetailMetadata) 71 | { 72 | $this->paymentMethodDetailMetadata = $paymentMethodDetailMetadata; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/model/Goods.php: -------------------------------------------------------------------------------- 1 | referenceGoodsId; 20 | } 21 | 22 | /** 23 | * @param String $referenceGoodsId 24 | */ 25 | public function setReferenceGoodsId($referenceGoodsId) 26 | { 27 | $this->referenceGoodsId = $referenceGoodsId; 28 | } 29 | 30 | /** 31 | * @return String 32 | */ 33 | public function getGoodsName() 34 | { 35 | return $this->goodsName; 36 | } 37 | 38 | /** 39 | * @param String $goodsName 40 | */ 41 | public function setGoodsName($goodsName) 42 | { 43 | $this->goodsName = $goodsName; 44 | } 45 | 46 | /** 47 | * @return String 48 | */ 49 | public function getGoodsCategory() 50 | { 51 | return $this->goodsCategory; 52 | } 53 | 54 | /** 55 | * @param String $goodsCategory 56 | */ 57 | public function setGoodsCategory($goodsCategory) 58 | { 59 | $this->goodsCategory = $goodsCategory; 60 | } 61 | 62 | /** 63 | * @return String 64 | */ 65 | public function getGoodsBrand() 66 | { 67 | return $this->goodsBrand; 68 | } 69 | 70 | /** 71 | * @param String $goodsBrand 72 | */ 73 | public function setGoodsBrand($goodsBrand) 74 | { 75 | $this->goodsBrand = $goodsBrand; 76 | } 77 | 78 | /** 79 | * @return Amount 80 | */ 81 | public function getGoodsUnitAmount() 82 | { 83 | return $this->goodsUnitAmount; 84 | } 85 | 86 | /** 87 | * @param Amount $goodsUnitAmount 88 | */ 89 | public function setGoodsUnitAmount($goodsUnitAmount) 90 | { 91 | $this->goodsUnitAmount = $goodsUnitAmount; 92 | } 93 | 94 | /** 95 | * @return String 96 | */ 97 | public function getGoodsQuantity() 98 | { 99 | return $this->goodsQuantity; 100 | } 101 | 102 | /** 103 | * @param String $goodsQuantity 104 | */ 105 | public function setGoodsQuantity($goodsQuantity) 106 | { 107 | $this->goodsQuantity = $goodsQuantity; 108 | } 109 | 110 | /** 111 | * @return String 112 | */ 113 | public function getGoodsSkuName() 114 | { 115 | return $this->goodsSkuName; 116 | } 117 | 118 | /** 119 | * @param String $goodsSkuName 120 | */ 121 | public function setGoodsSkuName($goodsSkuName) 122 | { 123 | $this->goodsSkuName = $goodsSkuName; 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /src/model/GrantType.php: -------------------------------------------------------------------------------- 1 | rspBody; 16 | } 17 | 18 | /** 19 | * @param mixed $rspBody 20 | */ 21 | public function setRspBody($rspBody) 22 | { 23 | $this->rspBody = $rspBody; 24 | } 25 | 26 | /** 27 | * @return mixed 28 | */ 29 | public function getRspSign() 30 | { 31 | return $this->rspSign; 32 | } 33 | 34 | /** 35 | * @param mixed $rspSign 36 | */ 37 | public function setRspSign($rspSign) 38 | { 39 | $this->rspSign = $rspSign; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getRspTime() 46 | { 47 | return $this->rspTime; 48 | } 49 | 50 | /** 51 | * @param mixed $repTime 52 | */ 53 | public function setRspTime($rspTime) 54 | { 55 | $this->rspTime = $rspTime; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/model/InStorePaymentScenario.php: -------------------------------------------------------------------------------- 1 | logoName; 15 | } 16 | 17 | /** 18 | * @param mixed $logoName 19 | */ 20 | public function setLogoName($logoName) 21 | { 22 | $this->logoName = $logoName; 23 | } 24 | 25 | /** 26 | * @return mixed 27 | */ 28 | public function getLogoUrl() 29 | { 30 | return $this->logoUrl; 31 | } 32 | 33 | /** 34 | * @param mixed $logoUrl 35 | */ 36 | public function setLogoUrl($logoUrl) 37 | { 38 | $this->logoUrl = $logoUrl; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/model/Merchant.php: -------------------------------------------------------------------------------- 1 | referenceMerchantId; 21 | } 22 | 23 | /** 24 | * @param String $referenceMerchantId 25 | */ 26 | public function setReferenceMerchantId($referenceMerchantId) 27 | { 28 | $this->referenceMerchantId = $referenceMerchantId; 29 | } 30 | 31 | /** 32 | * @return String 33 | */ 34 | public function getMerchantMCC() 35 | { 36 | return $this->merchantMCC; 37 | } 38 | 39 | /** 40 | * @param String $merchantMCC 41 | */ 42 | public function setMerchantMCC($merchantMCC) 43 | { 44 | $this->merchantMCC = $merchantMCC; 45 | } 46 | 47 | /** 48 | * @return String 49 | */ 50 | public function getMerchantName() 51 | { 52 | return $this->merchantName; 53 | } 54 | 55 | /** 56 | * @param String $merchantName 57 | */ 58 | public function setMerchantName($merchantName) 59 | { 60 | $this->merchantName = $merchantName; 61 | } 62 | 63 | /** 64 | * @return String 65 | */ 66 | public function getMerchantDisplayName() 67 | { 68 | return $this->merchantDisplayName; 69 | } 70 | 71 | /** 72 | * @param String $merchantDisplayName 73 | */ 74 | public function setMerchantDisplayName($merchantDisplayName) 75 | { 76 | $this->merchantDisplayName = $merchantDisplayName; 77 | } 78 | 79 | /** 80 | * @return Address 81 | */ 82 | public function getMerchantAddress() 83 | { 84 | return $this->merchantAddress; 85 | } 86 | 87 | /** 88 | * @param Address $merchantAddress 89 | */ 90 | public function setMerchantAddress($merchantAddress) 91 | { 92 | $this->merchantAddress = $merchantAddress; 93 | } 94 | 95 | /** 96 | * @return String 97 | */ 98 | public function getMerchantRegisterDate() 99 | { 100 | return $this->merchantRegisterDate; 101 | } 102 | 103 | /** 104 | * @param String $merchantRegisterDate 105 | */ 106 | public function setMerchantRegisterDate($merchantRegisterDate) 107 | { 108 | $this->merchantRegisterDate = $merchantRegisterDate; 109 | } 110 | 111 | /** 112 | * @return Store 113 | */ 114 | public function getStore() 115 | { 116 | return $this->store; 117 | } 118 | 119 | /** 120 | * @param Store $store 121 | */ 122 | public function setStore($store) 123 | { 124 | $this->store = $store; 125 | } 126 | 127 | /** 128 | * @return mixed 129 | */ 130 | public function getMerchantType() 131 | { 132 | return $this->merchantType; 133 | } 134 | 135 | /** 136 | * @param mixed $merchantType 137 | */ 138 | public function setMerchantType($merchantType) 139 | { 140 | $this->merchantType = $merchantType; 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /src/model/MerchantRegistrationInfo.php: -------------------------------------------------------------------------------- 1 | referenceMerchantId; 20 | } 21 | 22 | /** 23 | * @param mixed $referenceMerchantId 24 | */ 25 | public function setReferenceMerchantId($referenceMerchantId) 26 | { 27 | $this->referenceMerchantId = $referenceMerchantId; 28 | } 29 | 30 | /** 31 | * @return mixed 32 | */ 33 | public function getMerchantDisplayName() 34 | { 35 | return $this->merchantDisplayName; 36 | } 37 | 38 | /** 39 | * @param mixed $merchantDisplayName 40 | */ 41 | public function setMerchantDisplayName($merchantDisplayName) 42 | { 43 | $this->merchantDisplayName = $merchantDisplayName; 44 | } 45 | 46 | /** 47 | * @return mixed 48 | */ 49 | public function getMerchantMCC() 50 | { 51 | return $this->merchantMCC; 52 | } 53 | 54 | /** 55 | * @param mixed $merchantMCC 56 | */ 57 | public function setMerchantMCC($merchantMCC) 58 | { 59 | $this->merchantMCC = $merchantMCC; 60 | } 61 | 62 | /** 63 | * @return mixed 64 | */ 65 | public function getLogo() 66 | { 67 | return $this->logo; 68 | } 69 | 70 | /** 71 | * @param mixed $logo 72 | */ 73 | public function setLogo($logo) 74 | { 75 | $this->logo = $logo; 76 | } 77 | 78 | /** 79 | * @return mixed 80 | */ 81 | public function getWebsites() 82 | { 83 | return $this->websites; 84 | } 85 | 86 | /** 87 | * @param mixed $websites 88 | */ 89 | public function setWebsites($websites) 90 | { 91 | $this->websites = $websites; 92 | } 93 | 94 | /** 95 | * @return mixed 96 | */ 97 | public function getMerchantAddress() 98 | { 99 | return $this->merchantAddress; 100 | } 101 | 102 | /** 103 | * @param mixed $merchantAddress 104 | */ 105 | public function setMerchantAddress($merchantAddress) 106 | { 107 | $this->merchantAddress = $merchantAddress; 108 | } 109 | 110 | /** 111 | * @return mixed 112 | */ 113 | public function getRegistrationDetail() 114 | { 115 | return $this->registrationDetail; 116 | } 117 | 118 | /** 119 | * @param mixed $registrationDetail 120 | */ 121 | public function setRegistrationDetail($registrationDetail) 122 | { 123 | $this->registrationDetail = $registrationDetail; 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /src/model/MerchantType.php: -------------------------------------------------------------------------------- 1 | httpMethod; 16 | } 17 | 18 | public function setHttpMethod($httpMethod) 19 | { 20 | $this->httpMethod = $httpMethod; 21 | } 22 | 23 | public function getPath() 24 | { 25 | return $this->path; 26 | } 27 | 28 | public function setPath($path) 29 | { 30 | $this->path = $path; 31 | } 32 | 33 | public function getClientId() 34 | { 35 | return $this->clientId; 36 | } 37 | 38 | public function setClientId($clientId) 39 | { 40 | $this->clientId = $clientId; 41 | } 42 | 43 | public function getRsqTime() 44 | { 45 | return $this->rsqTime; 46 | } 47 | 48 | public function setRsqTime($rsqTime) 49 | { 50 | $this->rsqTime = $rsqTime; 51 | } 52 | 53 | public function getRsqBody() 54 | { 55 | return $this->rsqBody; 56 | } 57 | 58 | public function setRsqBody($rsqBody) 59 | { 60 | $this->rsqBody = $rsqBody; 61 | } 62 | 63 | public function getSignature() 64 | { 65 | return $this->signature; 66 | } 67 | 68 | public function setSignature($signature) 69 | { 70 | $this->signature = $signature; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/model/Order.php: -------------------------------------------------------------------------------- 1 | referenceOrderId; 22 | } 23 | 24 | /** 25 | * @param String $referenceOrderId 26 | */ 27 | public function setReferenceOrderId($referenceOrderId) 28 | { 29 | $this->referenceOrderId = $referenceOrderId; 30 | } 31 | 32 | /** 33 | * @return String 34 | */ 35 | public function getOrderDescription() 36 | { 37 | return $this->orderDescription; 38 | } 39 | 40 | /** 41 | * @param String $orderDescription 42 | */ 43 | public function setOrderDescription($orderDescription) 44 | { 45 | $this->orderDescription = $orderDescription; 46 | } 47 | 48 | /** 49 | * @return Amount 50 | */ 51 | public function getOrderAmount() 52 | { 53 | return $this->orderAmount; 54 | } 55 | 56 | /** 57 | * @param Amount $orderAmount 58 | */ 59 | public function setOrderAmount($orderAmount) 60 | { 61 | $this->orderAmount = $orderAmount; 62 | } 63 | 64 | /** 65 | * @return Merchant 66 | */ 67 | public function getMerchant() 68 | { 69 | return $this->merchant; 70 | } 71 | 72 | /** 73 | * @param Merchant $merchant 74 | */ 75 | public function setMerchant($merchant) 76 | { 77 | $this->merchant = $merchant; 78 | } 79 | 80 | /** 81 | * @return Goods 82 | */ 83 | public function getGoods() 84 | { 85 | return $this->goods; 86 | } 87 | 88 | /** 89 | * @param Goods $goods 90 | */ 91 | public function setGoods($goods) 92 | { 93 | $this->goods = $goods; 94 | } 95 | 96 | /** 97 | * @return Shipping 98 | */ 99 | public function getShipping() 100 | { 101 | return $this->shipping; 102 | } 103 | 104 | /** 105 | * @param Shipping $shipping 106 | */ 107 | public function setShipping($shipping) 108 | { 109 | $this->shipping = $shipping; 110 | } 111 | 112 | /** 113 | * @return Buyer 114 | */ 115 | public function getBuyer() 116 | { 117 | return $this->buyer; 118 | } 119 | 120 | /** 121 | * @param Buyer $buyer 122 | */ 123 | public function setBuyer($buyer) 124 | { 125 | $this->buyer = $buyer; 126 | } 127 | 128 | /** 129 | * @return Env 130 | */ 131 | public function getEnv() 132 | { 133 | return $this->env; 134 | } 135 | 136 | /** 137 | * @param Env $env 138 | */ 139 | public function setEnv($env) 140 | { 141 | $this->env = $env; 142 | } 143 | 144 | /** 145 | * @return mixed 146 | */ 147 | public function getExtendInfo() 148 | { 149 | return $this->extendInfo; 150 | } 151 | 152 | /** 153 | * @param mixed $extendInfo 154 | */ 155 | public function setExtendInfo($extendInfo) 156 | { 157 | $this->extendInfo = $extendInfo; 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /src/model/OrderCodeForm.php: -------------------------------------------------------------------------------- 1 | paymentMethodType; 17 | } 18 | 19 | /** 20 | * @param mixed $paymentMethodType 21 | */ 22 | public function setPaymentMethodType($paymentMethodType) 23 | { 24 | $this->paymentMethodType = $paymentMethodType; 25 | } 26 | 27 | /** 28 | * @return mixed 29 | */ 30 | public function getExpireTime() 31 | { 32 | return $this->expireTime; 33 | } 34 | 35 | /** 36 | * @param mixed $expireTime 37 | */ 38 | public function setExpireTime($expireTime) 39 | { 40 | $this->expireTime = $expireTime; 41 | } 42 | 43 | /** 44 | * @return mixed 45 | */ 46 | public function getCodeDetails() 47 | { 48 | return $this->codeDetails; 49 | } 50 | 51 | /** 52 | * @param mixed $codeDetails 53 | */ 54 | public function setCodeDetails($codeDetails) 55 | { 56 | $this->codeDetails = $codeDetails; 57 | } 58 | 59 | /** 60 | * @return mixed 61 | */ 62 | public function getExtendInfo() 63 | { 64 | return $this->extendInfo; 65 | } 66 | 67 | /** 68 | * @param mixed $extendInfo 69 | */ 70 | public function setExtendInfo($extendInfo) 71 | { 72 | $this->extendInfo = $extendInfo; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/model/OsType.php: -------------------------------------------------------------------------------- 1 | isPaymentEvaluation; 16 | } 17 | 18 | /** 19 | * @param mixed $isPaymentEvaluation 20 | */ 21 | public function setIsPaymentEvaluation($isPaymentEvaluation) 22 | { 23 | $this->isPaymentEvaluation = $isPaymentEvaluation; 24 | } 25 | 26 | /** 27 | * @return mixed 28 | */ 29 | public function getInStorePaymentScenario() 30 | { 31 | return $this->inStorePaymentScenario; 32 | } 33 | 34 | /** 35 | * @param mixed $inStorePaymentScenario 36 | */ 37 | public function setInStorePaymentScenario($inStorePaymentScenario) 38 | { 39 | $this->inStorePaymentScenario = $inStorePaymentScenario; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getPresentmentMode() 46 | { 47 | return $this->presentmentMode; 48 | } 49 | 50 | /** 51 | * @param mixed $presentmentMode 52 | */ 53 | public function setPresentmentMode($presentmentMode) 54 | { 55 | $this->presentmentMode = $presentmentMode; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/model/PaymentMethod.php: -------------------------------------------------------------------------------- 1 | paymentMethodType; 18 | } 19 | 20 | /** 21 | * @param mixed $paymentMethodType 22 | */ 23 | public function setPaymentMethodType($paymentMethodType) 24 | { 25 | $this->paymentMethodType = $paymentMethodType; 26 | } 27 | 28 | /** 29 | * @return mixed 30 | */ 31 | public function getPaymentMethodId() 32 | { 33 | return $this->paymentMethodId; 34 | } 35 | 36 | /** 37 | * @param mixed $paymentMethodId 38 | */ 39 | public function setPaymentMethodId($paymentMethodId) 40 | { 41 | $this->paymentMethodId = $paymentMethodId; 42 | } 43 | 44 | /** 45 | * @return mixed 46 | */ 47 | public function getPaymentMethodMetaData() 48 | { 49 | return $this->paymentMethodMetaData; 50 | } 51 | 52 | /** 53 | * @param mixed $paymentMethodMetaData 54 | */ 55 | public function setPaymentMethodMetaData($paymentMethodMetaData) 56 | { 57 | $this->paymentMethodMetaData = $paymentMethodMetaData; 58 | } 59 | 60 | /** 61 | * @return mixed 62 | */ 63 | public function getCustomerId() 64 | { 65 | return $this->customerId; 66 | } 67 | 68 | /** 69 | * @param mixed $customerId 70 | */ 71 | public function setCustomerId($customerId) 72 | { 73 | $this->customerId = $customerId; 74 | } 75 | 76 | /** 77 | * @return mixed 78 | */ 79 | public function getExtendInfo() 80 | { 81 | return $this->extendInfo; 82 | } 83 | 84 | /** 85 | * @param mixed $extendInfo 86 | */ 87 | public function setExtendInfo($extendInfo) 88 | { 89 | $this->extendInfo = $extendInfo; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/model/PaymentMethodCategoryType.php: -------------------------------------------------------------------------------- 1 | paymentMethodDetailType; 19 | } 20 | 21 | /** 22 | * @param mixed $paymentMethodDetailType 23 | */ 24 | public function setPaymentMethodDetailType($paymentMethodDetailType) 25 | { 26 | $this->paymentMethodDetailType = $paymentMethodDetailType; 27 | } 28 | 29 | /** 30 | * @return mixed 31 | */ 32 | public function getCard() 33 | { 34 | return $this->card; 35 | } 36 | 37 | /** 38 | * @param mixed $card 39 | */ 40 | public function setCard($card) 41 | { 42 | $this->card = $card; 43 | } 44 | 45 | /** 46 | * @return mixed 47 | */ 48 | public function getExternalAccount() 49 | { 50 | return $this->externalAccount; 51 | } 52 | 53 | /** 54 | * @param mixed $externalAccount 55 | */ 56 | public function setExternalAccount($externalAccount) 57 | { 58 | $this->externalAccount = $externalAccount; 59 | } 60 | 61 | /** 62 | * @return mixed 63 | */ 64 | public function getDiscount() 65 | { 66 | return $this->discount; 67 | } 68 | 69 | /** 70 | * @param mixed $discount 71 | */ 72 | public function setDiscount($discount) 73 | { 74 | $this->discount = $discount; 75 | } 76 | 77 | /** 78 | * @return mixed 79 | */ 80 | public function getCoupon() 81 | { 82 | return $this->coupon; 83 | } 84 | 85 | /** 86 | * @param mixed $coupon 87 | */ 88 | public function setCoupon($coupon) 89 | { 90 | $this->coupon = $coupon; 91 | } 92 | 93 | /** 94 | * @return mixed 95 | */ 96 | public function getExtendInfo() 97 | { 98 | return $this->extendInfo; 99 | } 100 | 101 | /** 102 | * @param mixed $extendInfo 103 | */ 104 | public function setExtendInfo($extendInfo) 105 | { 106 | $this->extendInfo = $extendInfo; 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /src/model/PaymentMethodDetailType.php: -------------------------------------------------------------------------------- 1 | paymentMethodType; 18 | } 19 | 20 | /** 21 | * @param mixed $paymentMethodType 22 | */ 23 | public function setPaymentMethodType($paymentMethodType) 24 | { 25 | $this->paymentMethodType = $paymentMethodType; 26 | } 27 | 28 | /** 29 | * @return mixed 30 | */ 31 | public function getPaymentMethodDetail() 32 | { 33 | return $this->paymentMethodDetail; 34 | } 35 | 36 | /** 37 | * @param mixed $paymentMethodDetail 38 | */ 39 | public function setPaymentMethodDetail($paymentMethodDetail) 40 | { 41 | $this->paymentMethodDetail = $paymentMethodDetail; 42 | } 43 | 44 | /** 45 | * @return mixed 46 | */ 47 | public function getEnabled() 48 | { 49 | return $this->enabled; 50 | } 51 | 52 | /** 53 | * @param mixed $enabled 54 | */ 55 | public function setEnabled($enabled) 56 | { 57 | $this->enabled = $enabled; 58 | } 59 | 60 | /** 61 | * @return mixed 62 | */ 63 | public function getPreferred() 64 | { 65 | return $this->preferred; 66 | } 67 | 68 | /** 69 | * @param mixed $preferred 70 | */ 71 | public function setPreferred($preferred) 72 | { 73 | $this->preferred = $preferred; 74 | } 75 | 76 | /** 77 | * @return mixed 78 | */ 79 | public function getExtendInfo() 80 | { 81 | return $this->extendInfo; 82 | } 83 | 84 | /** 85 | * @param mixed $extendInfo 86 | */ 87 | public function setExtendInfo($extendInfo) 88 | { 89 | $this->extendInfo = $extendInfo; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/model/PaymentOption.php: -------------------------------------------------------------------------------- 1 | paymentMethodType; 22 | } 23 | 24 | /** 25 | * @param mixed $paymentMethodType 26 | */ 27 | public function setPaymentMethodType($paymentMethodType) 28 | { 29 | $this->paymentMethodType = $paymentMethodType; 30 | } 31 | 32 | /** 33 | * @return mixed 34 | */ 35 | public function getPaymentMethodCategory() 36 | { 37 | return $this->paymentMethodCategory; 38 | } 39 | 40 | /** 41 | * @param mixed $paymentMethodCategory 42 | */ 43 | public function setPaymentMethodCategory($paymentMethodCategory) 44 | { 45 | $this->paymentMethodCategory = $paymentMethodCategory; 46 | } 47 | 48 | /** 49 | * @return mixed 50 | */ 51 | public function getEnabled() 52 | { 53 | return $this->enabled; 54 | } 55 | 56 | /** 57 | * @param mixed $enabled 58 | */ 59 | public function setEnabled($enabled) 60 | { 61 | $this->enabled = $enabled; 62 | } 63 | 64 | /** 65 | * @return mixed 66 | */ 67 | public function getPreferred() 68 | { 69 | return $this->preferred; 70 | } 71 | 72 | /** 73 | * @param mixed $preferred 74 | */ 75 | public function setPreferred($preferred) 76 | { 77 | $this->preferred = $preferred; 78 | } 79 | 80 | /** 81 | * @return mixed 82 | */ 83 | public function getDisableReason() 84 | { 85 | return $this->disableReason; 86 | } 87 | 88 | /** 89 | * @param mixed $disableReason 90 | */ 91 | public function setDisableReason($disableReason) 92 | { 93 | $this->disableReason = $disableReason; 94 | } 95 | 96 | /** 97 | * @return mixed 98 | */ 99 | public function getAmountLimitInfoMap() 100 | { 101 | return $this->amountLimitInfoMap; 102 | } 103 | 104 | /** 105 | * @param mixed $amountLimitInfoMap 106 | */ 107 | public function setAmountLimitInfoMap($amountLimitInfoMap) 108 | { 109 | $this->amountLimitInfoMap = $amountLimitInfoMap; 110 | } 111 | 112 | /** 113 | * @return mixed 114 | */ 115 | public function getSupportedCurrencies() 116 | { 117 | return $this->supportedCurrencies; 118 | } 119 | 120 | /** 121 | * @param mixed $supportedCurrencies 122 | */ 123 | public function setSupportedCurrencies($supportedCurrencies) 124 | { 125 | $this->supportedCurrencies = $supportedCurrencies; 126 | } 127 | 128 | /** 129 | * @return mixed 130 | */ 131 | public function getPaymentOptionDetail() 132 | { 133 | return $this->paymentOptionDetail; 134 | } 135 | 136 | /** 137 | * @param mixed $paymentOptionDetail 138 | */ 139 | public function setPaymentOptionDetail($paymentOptionDetail) 140 | { 141 | $this->paymentOptionDetail = $paymentOptionDetail; 142 | } 143 | 144 | /** 145 | * @return mixed 146 | */ 147 | public function getExtendInfo() 148 | { 149 | return $this->extendInfo; 150 | } 151 | 152 | /** 153 | * @param mixed $extendInfo 154 | */ 155 | public function setExtendInfo($extendInfo) 156 | { 157 | $this->extendInfo = $extendInfo; 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /src/model/PaymentVerificationData.php: -------------------------------------------------------------------------------- 1 | verifyRequestId; 15 | } 16 | 17 | /** 18 | * @param mixed $verifyRequestId 19 | */ 20 | public function setVerifyRequestId($verifyRequestId) 21 | { 22 | $this->verifyRequestId = $verifyRequestId; 23 | } 24 | 25 | /** 26 | * @return mixed 27 | */ 28 | public function getAuthenticationCode() 29 | { 30 | return $this->authenticationCode; 31 | } 32 | 33 | /** 34 | * @param mixed $authenticationCode 35 | */ 36 | public function setAuthenticationCode($authenticationCode) 37 | { 38 | $this->authenticationCode = $authenticationCode; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/model/PresentmentMode.php: -------------------------------------------------------------------------------- 1 | pspName; 16 | } 17 | 18 | /** 19 | * @param mixed $pspName 20 | */ 21 | public function setPspName($pspName) 22 | { 23 | $this->pspName = $pspName; 24 | } 25 | 26 | /** 27 | * @return mixed 28 | */ 29 | public function getPspCustomerId() 30 | { 31 | return $this->pspCustomerId; 32 | } 33 | 34 | /** 35 | * @param mixed $pspCustomerId 36 | */ 37 | public function setPspCustomerId($pspCustomerId) 38 | { 39 | $this->pspCustomerId = $pspCustomerId; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getDisplayCustomerId() 46 | { 47 | return $this->displayCustomerId; 48 | } 49 | 50 | /** 51 | * @param mixed $displayCustomerId 52 | */ 53 | public function setDisplayCustomerId($displayCustomerId) 54 | { 55 | $this->displayCustomerId = $displayCustomerId; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/model/Quote.php: -------------------------------------------------------------------------------- 1 | quoteId; 19 | } 20 | 21 | /** 22 | * @param mixed $quoteId 23 | */ 24 | public function setQuoteId($quoteId) 25 | { 26 | $this->quoteId = $quoteId; 27 | } 28 | 29 | /** 30 | * @return mixed 31 | */ 32 | public function getQuoteCurrencyPair() 33 | { 34 | return $this->quoteCurrencyPair; 35 | } 36 | 37 | /** 38 | * @param mixed $quoteCurrencyPair 39 | */ 40 | public function setQuoteCurrencyPair($quoteCurrencyPair) 41 | { 42 | $this->quoteCurrencyPair = $quoteCurrencyPair; 43 | } 44 | 45 | /** 46 | * @return mixed 47 | */ 48 | public function getQuotePrice() 49 | { 50 | return $this->quotePrice; 51 | } 52 | 53 | /** 54 | * @param mixed $quotePrice 55 | */ 56 | public function setQuotePrice($quotePrice) 57 | { 58 | $this->quotePrice = $quotePrice; 59 | } 60 | 61 | /** 62 | * @return mixed 63 | */ 64 | public function getQuoteStartTime() 65 | { 66 | return $this->quoteStartTime; 67 | } 68 | 69 | /** 70 | * @param mixed $quoteStartTime 71 | */ 72 | public function setQuoteStartTime($quoteStartTime) 73 | { 74 | $this->quoteStartTime = $quoteStartTime; 75 | } 76 | 77 | /** 78 | * @return mixed 79 | */ 80 | public function getQuoteExpiryTime() 81 | { 82 | return $this->quoteExpiryTime; 83 | } 84 | 85 | /** 86 | * @param mixed $quoteExpiryTime 87 | */ 88 | public function setQuoteExpiryTime($quoteExpiryTime) 89 | { 90 | $this->quoteExpiryTime = $quoteExpiryTime; 91 | } 92 | 93 | /** 94 | * @return mixed 95 | */ 96 | public function getGuaranteed() 97 | { 98 | return $this->guaranteed; 99 | } 100 | 101 | /** 102 | * @param mixed $guaranteed 103 | */ 104 | public function setGuaranteed($guaranteed) 105 | { 106 | $this->guaranteed = $guaranteed; 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /src/model/RedirectActionForm.php: -------------------------------------------------------------------------------- 1 | method; 16 | } 17 | 18 | /** 19 | * @param mixed $method 20 | */ 21 | public function setMethod($method) 22 | { 23 | $this->method = $method; 24 | } 25 | 26 | /** 27 | * @return mixed 28 | */ 29 | public function getParameters() 30 | { 31 | return $this->parameters; 32 | } 33 | 34 | /** 35 | * @param mixed $parameters 36 | */ 37 | public function setParameters($parameters) 38 | { 39 | $this->parameters = $parameters; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getRedirectUrl() 46 | { 47 | return $this->redirectUrl; 48 | } 49 | 50 | /** 51 | * @param mixed $redirectUrl 52 | */ 53 | public function setRedirectUrl($redirectUrl) 54 | { 55 | $this->redirectUrl = $redirectUrl; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/model/RegistrationDetail.php: -------------------------------------------------------------------------------- 1 | legalName; 22 | } 23 | 24 | /** 25 | * @param mixed $legalName 26 | */ 27 | public function setLegalName($legalName) 28 | { 29 | $this->legalName = $legalName; 30 | } 31 | 32 | /** 33 | * @return mixed 34 | */ 35 | public function getAttachments() 36 | { 37 | return $this->attachments; 38 | } 39 | 40 | /** 41 | * @param mixed $attachments 42 | */ 43 | public function setAttachments($attachments) 44 | { 45 | $this->attachments = $attachments; 46 | } 47 | 48 | /** 49 | * @return mixed 50 | */ 51 | public function getContactInfo() 52 | { 53 | return $this->contactInfo; 54 | } 55 | 56 | /** 57 | * @param mixed $contactInfo 58 | */ 59 | public function setContactInfo($contactInfo) 60 | { 61 | $this->contactInfo = $contactInfo; 62 | } 63 | 64 | /** 65 | * @return mixed 66 | */ 67 | public function getRegistrationType() 68 | { 69 | return $this->registrationType; 70 | } 71 | 72 | /** 73 | * @param mixed $registrationType 74 | */ 75 | public function setRegistrationType($registrationType) 76 | { 77 | $this->registrationType = $registrationType; 78 | } 79 | 80 | /** 81 | * @return mixed 82 | */ 83 | public function getRegistrationNo() 84 | { 85 | return $this->registrationNo; 86 | } 87 | 88 | /** 89 | * @param mixed $registrationNo 90 | */ 91 | public function setRegistrationNo($registrationNo) 92 | { 93 | $this->registrationNo = $registrationNo; 94 | } 95 | 96 | /** 97 | * @return mixed 98 | */ 99 | public function getRegistrationAddress() 100 | { 101 | return $this->registrationAddress; 102 | } 103 | 104 | /** 105 | * @param mixed $registrationAddress 106 | */ 107 | public function setRegistrationAddress($registrationAddress) 108 | { 109 | $this->registrationAddress = $registrationAddress; 110 | } 111 | 112 | /** 113 | * @return mixed 114 | */ 115 | public function getBusinessType() 116 | { 117 | return $this->businessType; 118 | } 119 | 120 | /** 121 | * @param mixed $businessType 122 | */ 123 | public function setBusinessType($businessType) 124 | { 125 | $this->businessType = $businessType; 126 | } 127 | 128 | /** 129 | * @return mixed 130 | */ 131 | public function getRegistrationEffectiveDate() 132 | { 133 | return $this->registrationEffectiveDate; 134 | } 135 | 136 | /** 137 | * @param mixed $registrationEffectiveDate 138 | */ 139 | public function setRegistrationEffectiveDate($registrationEffectiveDate) 140 | { 141 | $this->registrationEffectiveDate = $registrationEffectiveDate; 142 | } 143 | 144 | /** 145 | * @return mixed 146 | */ 147 | public function getRegistrationExpireDate() 148 | { 149 | return $this->registrationExpireDate; 150 | } 151 | 152 | /** 153 | * @param mixed $registrationExpireDate 154 | */ 155 | public function setRegistrationExpireDate($registrationExpireDate) 156 | { 157 | $this->registrationExpireDate = $registrationExpireDate; 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /src/model/Result.php: -------------------------------------------------------------------------------- 1 | resultCode; 16 | } 17 | 18 | /** 19 | * @param mixed $resultCode 20 | */ 21 | public function setResultCode($resultCode) 22 | { 23 | $this->resultCode = $resultCode; 24 | } 25 | 26 | /** 27 | * @return mixed 28 | */ 29 | public function getResultStatus() 30 | { 31 | return $this->resultStatus; 32 | } 33 | 34 | /** 35 | * @param mixed $resultStatus 36 | */ 37 | public function setResultStatus($resultStatus) 38 | { 39 | $this->resultStatus = $resultStatus; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getResultMessage() 46 | { 47 | return $this->resultMessage; 48 | } 49 | 50 | /** 51 | * @param mixed $resultMessage 52 | */ 53 | public function setResultMessage($resultMessage) 54 | { 55 | $this->resultMessage = $resultMessage; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/model/ResultStatusType.php: -------------------------------------------------------------------------------- 1 | riskInfoCode; 15 | } 16 | 17 | /** 18 | * @param mixed $riskInfoCode 19 | */ 20 | public function setRiskInfoCode($riskInfoCode) 21 | { 22 | $this->riskInfoCode = $riskInfoCode; 23 | } 24 | 25 | /** 26 | * @return mixed 27 | */ 28 | public function getRiskInfoCodeResult() 29 | { 30 | return $this->riskInfoCodeResult; 31 | } 32 | 33 | /** 34 | * @param mixed $riskInfoCodeResult 35 | */ 36 | public function setRiskInfoCodeResult($riskInfoCodeResult) 37 | { 38 | $this->riskInfoCodeResult = $riskInfoCodeResult; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/model/RiskScoreResult.php: -------------------------------------------------------------------------------- 1 | riskScoreType; 16 | } 17 | 18 | /** 19 | * @param mixed $riskScoreType 20 | */ 21 | public function setRiskScoreType($riskScoreType) 22 | { 23 | $this->riskScoreType = $riskScoreType; 24 | } 25 | 26 | /** 27 | * @return mixed 28 | */ 29 | public function getRiskScore() 30 | { 31 | return $this->riskScore; 32 | } 33 | 34 | /** 35 | * @param mixed $riskScore 36 | */ 37 | public function setRiskScore($riskScore) 38 | { 39 | $this->riskScore = $riskScore; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getRiskScoreDetails() 46 | { 47 | return $this->riskScoreDetails; 48 | } 49 | 50 | /** 51 | * @param mixed $riskScoreDetails 52 | */ 53 | public function setRiskScoreDetails($riskScoreDetails) 54 | { 55 | $this->riskScoreDetails = $riskScoreDetails; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/model/RiskScoreType.php: -------------------------------------------------------------------------------- 1 | settlementCurrency; 11 | } 12 | 13 | public function setSettlementCurrency(String $settlementCurrency) 14 | { 15 | $this->settlementCurrency = $settlementCurrency; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/model/Shipping.php: -------------------------------------------------------------------------------- 1 | shippingName; 17 | } 18 | 19 | /** 20 | * @param String $shippingName 21 | */ 22 | public function setShippingName($shippingName) 23 | { 24 | $this->shippingName = $shippingName; 25 | } 26 | 27 | /** 28 | * @return Address 29 | */ 30 | public function getShippingAddress() 31 | { 32 | return $this->shippingAddress; 33 | } 34 | 35 | /** 36 | * @param Address $shippingAddress 37 | */ 38 | public function setShippingAddress($shippingAddress) 39 | { 40 | $this->shippingAddress = $shippingAddress; 41 | } 42 | 43 | /** 44 | * @return String 45 | */ 46 | public function getShippingCarrier() 47 | { 48 | return $this->shippingCarrier; 49 | } 50 | 51 | /** 52 | * @param String $shippingCarrier 53 | */ 54 | public function setShippingCarrier($shippingCarrier) 55 | { 56 | $this->shippingCarrier = $shippingCarrier; 57 | } 58 | 59 | /** 60 | * @return String 61 | */ 62 | public function getShippingPhoneNo() 63 | { 64 | return $this->shippingPhoneNo; 65 | } 66 | 67 | /** 68 | * @param String $shippingPhoneNo 69 | */ 70 | public function setShippingPhoneNo($shippingPhoneNo) 71 | { 72 | $this->shippingPhoneNo = $shippingPhoneNo; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/model/Store.php: -------------------------------------------------------------------------------- 1 | referenceStoreId; 21 | } 22 | 23 | /** 24 | * @param String $referenceStoreId 25 | */ 26 | public function setReferenceStoreId($referenceStoreId) 27 | { 28 | $this->referenceStoreId = $referenceStoreId; 29 | } 30 | 31 | /** 32 | * @return String 33 | */ 34 | public function getStoreName() 35 | { 36 | return $this->storeName; 37 | } 38 | 39 | /** 40 | * @param String $storeName 41 | */ 42 | public function setStoreName($storeName) 43 | { 44 | $this->storeName = $storeName; 45 | } 46 | 47 | /** 48 | * @return String 49 | */ 50 | public function getStoreMCC() 51 | { 52 | return $this->storeMCC; 53 | } 54 | 55 | /** 56 | * @param String $storeMCC 57 | */ 58 | public function setStoreMCC($storeMCC) 59 | { 60 | $this->storeMCC = $storeMCC; 61 | } 62 | 63 | /** 64 | * @return String 65 | */ 66 | public function getStoreDisplayName() 67 | { 68 | return $this->storeDisplayName; 69 | } 70 | 71 | /** 72 | * @param String $storeDisplayName 73 | */ 74 | public function setStoreDisplayName($storeDisplayName) 75 | { 76 | $this->storeDisplayName = $storeDisplayName; 77 | } 78 | 79 | /** 80 | * @return String 81 | */ 82 | public function getStoreTerminalId() 83 | { 84 | return $this->storeTerminalId; 85 | } 86 | 87 | /** 88 | * @param String $storeTerminalId 89 | */ 90 | public function setStoreTerminalId($storeTerminalId) 91 | { 92 | $this->storeTerminalId = $storeTerminalId; 93 | } 94 | 95 | /** 96 | * @return String 97 | */ 98 | public function getStoreOperatorId() 99 | { 100 | return $this->storeOperatorId; 101 | } 102 | 103 | /** 104 | * @param String $storeOperatorId 105 | */ 106 | public function setStoreOperatorId($storeOperatorId) 107 | { 108 | $this->storeOperatorId = $storeOperatorId; 109 | } 110 | 111 | /** 112 | * @return Address 113 | */ 114 | public function getStoreAddress() 115 | { 116 | return $this->storeAddress; 117 | } 118 | 119 | /** 120 | * @param Address $storeAddress 121 | */ 122 | public function setStoreAddress($storeAddress) 123 | { 124 | $this->storeAddress = $storeAddress; 125 | } 126 | 127 | /** 128 | * @return String 129 | */ 130 | public function getStorePhoneNo() 131 | { 132 | return $this->storePhoneNo; 133 | } 134 | 135 | /** 136 | * @param String $storePhoneNo 137 | */ 138 | public function setStorePhoneNo($storePhoneNo) 139 | { 140 | $this->storePhoneNo = $storePhoneNo; 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /src/model/TerminalType.php: -------------------------------------------------------------------------------- 1 | transactionResult; 20 | } 21 | 22 | /** 23 | * @param mixed $transactionResult 24 | */ 25 | public function setTransactionResult($transactionResult) 26 | { 27 | $this->transactionResult = $transactionResult; 28 | } 29 | 30 | /** 31 | * @return mixed 32 | */ 33 | public function getTransactionId() 34 | { 35 | return $this->transactionId; 36 | } 37 | 38 | /** 39 | * @param mixed $transactionId 40 | */ 41 | public function setTransactionId($transactionId) 42 | { 43 | $this->transactionId = $transactionId; 44 | } 45 | 46 | /** 47 | * @return mixed 48 | */ 49 | public function getTransactionType() 50 | { 51 | return $this->transactionType; 52 | } 53 | 54 | /** 55 | * @param mixed $transactionType 56 | */ 57 | public function setTransactionType($transactionType) 58 | { 59 | $this->transactionType = $transactionType; 60 | } 61 | 62 | /** 63 | * @return mixed 64 | */ 65 | public function getTransactionStatus() 66 | { 67 | return $this->transactionStatus; 68 | } 69 | 70 | /** 71 | * @param mixed $transactionStatus 72 | */ 73 | public function setTransactionStatus($transactionStatus) 74 | { 75 | $this->transactionStatus = $transactionStatus; 76 | } 77 | 78 | /** 79 | * @return mixed 80 | */ 81 | public function getTransactionAmount() 82 | { 83 | return $this->transactionAmount; 84 | } 85 | 86 | /** 87 | * @param mixed $transactionAmount 88 | */ 89 | public function setTransactionAmount($transactionAmount) 90 | { 91 | $this->transactionAmount = $transactionAmount; 92 | } 93 | 94 | /** 95 | * @return mixed 96 | */ 97 | public function getTransactionRequestId() 98 | { 99 | return $this->transactionRequestId; 100 | } 101 | 102 | /** 103 | * @param mixed $transactionRequestId 104 | */ 105 | public function setTransactionRequestId($transactionRequestId) 106 | { 107 | $this->transactionRequestId = $transactionRequestId; 108 | } 109 | 110 | /** 111 | * @return mixed 112 | */ 113 | public function getTransactionTime() 114 | { 115 | return $this->transactionTime; 116 | } 117 | 118 | /** 119 | * @param mixed $transactionTime 120 | */ 121 | public function setTransactionTime($transactionTime) 122 | { 123 | $this->transactionTime = $transactionTime; 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /src/model/TransactionStatusType.php: -------------------------------------------------------------------------------- 1 | firstName; 17 | } 18 | 19 | /** 20 | * @param String $firstName 21 | */ 22 | public function setFirstName($firstName) 23 | { 24 | $this->firstName = $firstName; 25 | } 26 | 27 | /** 28 | * @return String 29 | */ 30 | public function getMiddleName() 31 | { 32 | return $this->middleName; 33 | } 34 | 35 | /** 36 | * @param String $middleName 37 | */ 38 | public function setMiddleName($middleName) 39 | { 40 | $this->middleName = $middleName; 41 | } 42 | 43 | /** 44 | * @return String 45 | */ 46 | public function getLastName() 47 | { 48 | return $this->lastName; 49 | } 50 | 51 | /** 52 | * @param String $lastName 53 | */ 54 | public function setLastName($lastName) 55 | { 56 | $this->lastName = $lastName; 57 | } 58 | 59 | /** 60 | * @return String 61 | */ 62 | public function getFullName() 63 | { 64 | return $this->fullName; 65 | } 66 | 67 | /** 68 | * @param String $fullName 69 | */ 70 | public function setFullName($fullName) 71 | { 72 | $this->fullName = $fullName; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/model/WebSite.php: -------------------------------------------------------------------------------- 1 | name; 16 | } 17 | 18 | /** 19 | * @param mixed $name 20 | */ 21 | public function setName($name) 22 | { 23 | $this->name = $name; 24 | } 25 | 26 | /** 27 | * @return mixed 28 | */ 29 | public function getUrl() 30 | { 31 | return $this->url; 32 | } 33 | 34 | /** 35 | * @param mixed $url 36 | */ 37 | public function setUrl($url) 38 | { 39 | $this->url = $url; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getDesc() 46 | { 47 | return $this->desc; 48 | } 49 | 50 | /** 51 | * @param mixed $desc 52 | */ 53 | public function setDesc($desc) 54 | { 55 | $this->desc = $desc; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/request/AlipayRequest.php: -------------------------------------------------------------------------------- 1 | path; 17 | } 18 | 19 | /** 20 | * @param mixed $path 21 | */ 22 | public function setPath($path) 23 | { 24 | $this->path = $path; 25 | } 26 | 27 | /** 28 | * @return mixed 29 | */ 30 | public function getClientId() 31 | { 32 | return $this->clientId; 33 | } 34 | 35 | /** 36 | * @param mixed $clientId 37 | */ 38 | public function setClientId($clientId) 39 | { 40 | $this->clientId = $clientId; 41 | } 42 | 43 | /** 44 | * @return mixed 45 | */ 46 | public function getKeyVersion() 47 | { 48 | return $this->keyVersion; 49 | } 50 | 51 | /** 52 | * @param mixed $keyVersion 53 | */ 54 | public function setKeyVersion($keyVersion) 55 | { 56 | $this->keyVersion = $keyVersion; 57 | } 58 | 59 | /** 60 | * @return string 61 | */ 62 | public function getHttpMethod() 63 | { 64 | return $this->httpMethod; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/request/auth/AlipayAuthApplyTokenRequest.php: -------------------------------------------------------------------------------- 1 | grantType; 20 | } 21 | 22 | /** 23 | * @param mixed $grantType 24 | */ 25 | public function setGrantType($grantType) 26 | { 27 | $this->grantType = $grantType; 28 | } 29 | 30 | /** 31 | * @return mixed 32 | */ 33 | public function getCustomerBelongsTo() 34 | { 35 | return $this->customerBelongsTo; 36 | } 37 | 38 | /** 39 | * @param mixed $customerBelongsTo 40 | */ 41 | public function setCustomerBelongsTo($customerBelongsTo) 42 | { 43 | $this->customerBelongsTo = $customerBelongsTo; 44 | } 45 | 46 | /** 47 | * @return mixed 48 | */ 49 | public function getAuthCode() 50 | { 51 | return $this->authCode; 52 | } 53 | 54 | /** 55 | * @param mixed $authCode 56 | */ 57 | public function setAuthCode($authCode) 58 | { 59 | $this->authCode = $authCode; 60 | } 61 | 62 | /** 63 | * @return mixed 64 | */ 65 | public function getRefreshToken() 66 | { 67 | return $this->refreshToken; 68 | } 69 | 70 | /** 71 | * @param mixed $refreshToken 72 | */ 73 | public function setRefreshToken($refreshToken) 74 | { 75 | $this->refreshToken = $refreshToken; 76 | } 77 | 78 | /** 79 | * @return mixed 80 | */ 81 | public function getExtendInfo() 82 | { 83 | return $this->extendInfo; 84 | } 85 | 86 | /** 87 | * @param mixed $extendInfo 88 | */ 89 | public function setExtendInfo($extendInfo) 90 | { 91 | $this->extendInfo = $extendInfo; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/request/auth/AlipayAuthConsultRequest.php: -------------------------------------------------------------------------------- 1 | customerBelongsTo; 24 | } 25 | 26 | /** 27 | * @param mixed $customerBelongsTo 28 | */ 29 | public function setCustomerBelongsTo($customerBelongsTo) 30 | { 31 | $this->customerBelongsTo = $customerBelongsTo; 32 | } 33 | 34 | /** 35 | * @return mixed 36 | */ 37 | public function getAuthClientId() 38 | { 39 | return $this->authClientId; 40 | } 41 | 42 | /** 43 | * @param mixed $authClientId 44 | */ 45 | public function setAuthClientId($authClientId) 46 | { 47 | $this->authClientId = $authClientId; 48 | } 49 | 50 | /** 51 | * @return mixed 52 | */ 53 | public function getAuthRedirectUrl() 54 | { 55 | return $this->authRedirectUrl; 56 | } 57 | 58 | /** 59 | * @param mixed $authRedirectUrl 60 | */ 61 | public function setAuthRedirectUrl($authRedirectUrl) 62 | { 63 | $this->authRedirectUrl = $authRedirectUrl; 64 | } 65 | 66 | /** 67 | * @return mixed 68 | */ 69 | public function getScopes() 70 | { 71 | return $this->scopes; 72 | } 73 | 74 | /** 75 | * @param mixed $scopes 76 | */ 77 | public function setScopes($scopes) 78 | { 79 | $this->scopes = $scopes; 80 | } 81 | 82 | /** 83 | * @return mixed 84 | */ 85 | public function getAuthState() 86 | { 87 | return $this->authState; 88 | } 89 | 90 | /** 91 | * @param mixed $authState 92 | */ 93 | public function setAuthState($authState) 94 | { 95 | $this->authState = $authState; 96 | } 97 | 98 | /** 99 | * @return mixed 100 | */ 101 | public function getTerminalType() 102 | { 103 | return $this->terminalType; 104 | } 105 | 106 | /** 107 | * @param mixed $terminalType 108 | */ 109 | public function setTerminalType($terminalType) 110 | { 111 | $this->terminalType = $terminalType; 112 | } 113 | 114 | /** 115 | * @return mixed 116 | */ 117 | public function getOsType() 118 | { 119 | return $this->osType; 120 | } 121 | 122 | /** 123 | * @param mixed $osType 124 | */ 125 | public function setOsType($osType) 126 | { 127 | $this->osType = $osType; 128 | } 129 | 130 | /** 131 | * @return mixed 132 | */ 133 | public function getOsVersion() 134 | { 135 | return $this->osVersion; 136 | } 137 | 138 | /** 139 | * @param mixed $osVersion 140 | */ 141 | public function setOsVersion($osVersion) 142 | { 143 | $this->osVersion = $osVersion; 144 | } 145 | 146 | /** 147 | * @return mixed 148 | */ 149 | public function getExtendInfo() 150 | { 151 | return $this->extendInfo; 152 | } 153 | 154 | /** 155 | * @param mixed $extendInfo 156 | */ 157 | public function setExtendInfo($extendInfo) 158 | { 159 | $this->extendInfo = $extendInfo; 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /src/request/auth/AlipayAuthQueryTokenRequest.php: -------------------------------------------------------------------------------- 1 | accessToken; 16 | } 17 | 18 | /** 19 | * @param mixed $accessToken 20 | */ 21 | public function setAccessToken($accessToken) 22 | { 23 | $this->accessToken = $accessToken; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/request/auth/AlipayAuthRevokeTokenRequest.php: -------------------------------------------------------------------------------- 1 | accessToken; 17 | } 18 | 19 | /** 20 | * @param mixed $accessToken 21 | */ 22 | public function setAccessToken($accessToken) 23 | { 24 | $this->accessToken = $accessToken; 25 | } 26 | 27 | /** 28 | * @return mixed 29 | */ 30 | public function getExtendInfo() 31 | { 32 | return $this->extendInfo; 33 | } 34 | 35 | /** 36 | * @param mixed $extendInfo 37 | */ 38 | public function setExtendInfo($extendInfo) 39 | { 40 | $this->extendInfo = $extendInfo; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/request/merchant/AlipayMerchantRegistrationInfoQueryRequest.php: -------------------------------------------------------------------------------- 1 | referenceMerchantId; 16 | } 17 | 18 | /** 19 | * @param mixed $referenceMerchantId 20 | */ 21 | public function setReferenceMerchantId($referenceMerchantId) 22 | { 23 | $this->referenceMerchantId = $referenceMerchantId; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/request/merchant/AlipayMerchantRegistrationRequest.php: -------------------------------------------------------------------------------- 1 | productCodes; 20 | } 21 | 22 | /** 23 | * @param mixed $productCodes 24 | */ 25 | public function setProductCodes($productCodes) 26 | { 27 | $this->productCodes = $productCodes; 28 | } 29 | 30 | /** 31 | * @return mixed 32 | */ 33 | public function getRegistrationRequestId() 34 | { 35 | return $this->registrationRequestId; 36 | } 37 | 38 | /** 39 | * @param mixed $registrationRequestId 40 | */ 41 | public function setRegistrationRequestId($registrationRequestId) 42 | { 43 | $this->registrationRequestId = $registrationRequestId; 44 | } 45 | 46 | /** 47 | * @return mixed 48 | */ 49 | public function getRegistrationNotifyURL() 50 | { 51 | return $this->registrationNotifyURL; 52 | } 53 | 54 | /** 55 | * @param mixed $registrationNotifyURL 56 | */ 57 | public function setRegistrationNotifyURL($registrationNotifyURL) 58 | { 59 | $this->registrationNotifyURL = $registrationNotifyURL; 60 | } 61 | 62 | /** 63 | * @return mixed 64 | */ 65 | public function getMerchantInfo() 66 | { 67 | return $this->merchantInfo; 68 | } 69 | 70 | /** 71 | * @param mixed $merchantInfo 72 | */ 73 | public function setMerchantInfo($merchantInfo) 74 | { 75 | $this->merchantInfo = $merchantInfo; 76 | } 77 | 78 | /** 79 | * @return mixed 80 | */ 81 | public function getPassThroughInfo() 82 | { 83 | return $this->passThroughInfo; 84 | } 85 | 86 | /** 87 | * @param mixed $passThroughInfo 88 | */ 89 | public function setPassThroughInfo($passThroughInfo) 90 | { 91 | $this->passThroughInfo = $passThroughInfo; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/request/merchant/AlipayMerchantRegistrationStatusQueryRequest.php: -------------------------------------------------------------------------------- 1 | registrationRequestId; 17 | } 18 | 19 | /** 20 | * @param mixed $registrationRequestId 21 | */ 22 | public function setRegistrationRequestId($registrationRequestId) 23 | { 24 | $this->registrationRequestId = $registrationRequestId; 25 | } 26 | 27 | /** 28 | * @return mixed 29 | */ 30 | public function getReferenceMerchantId() 31 | { 32 | return $this->referenceMerchantId; 33 | } 34 | 35 | /** 36 | * @param mixed $referenceMerchantId 37 | */ 38 | public function setReferenceMerchantId($referenceMerchantId) 39 | { 40 | $this->referenceMerchantId = $referenceMerchantId; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/request/notify/AlipayAcNotify.php: -------------------------------------------------------------------------------- 1 | merchantPrivateKey = $params['merchantPrivateKey']; 12 | $this->httpMethod = $params['httpMethod']; 13 | $this->path = $params['path']; 14 | $this->clientId = $params['clientId']; 15 | $this->rsqTime = $params['rsqTime']; 16 | $this->rsqBody = $params['rsqBody']; 17 | $this->signature = $params['signature']; 18 | $this->notifyPaymentRequest = new NotifyPaymentRequest(); 19 | } 20 | 21 | public function getNotifyPaymentRequest() 22 | { 23 | $this->notifyPaymentRequest->setHttpMethod($this->httpMethod); 24 | $this->notifyPaymentRequest->setPath($this->path); 25 | $this->notifyPaymentRequest->setClientId($this->clientId); 26 | $this->notifyPaymentRequest->setRsqTime($this->rsqTime); 27 | $this->notifyPaymentRequest->setRsqBody($this->rsqBody); 28 | if (preg_match('/signature=(?.*?)(?:$|,)/', $this->signature, $matches)) { 29 | $this->notifyPaymentRequest ->setSignature($matches['signature']); 30 | } 31 | return $this->notifyPaymentRequest ; 32 | } 33 | 34 | public function getNotifyResponse() 35 | { 36 | return '{"result":{"resultCode":"SUCCESS","resultMessage":"success","resultStatus":"S"}}'; 37 | } 38 | 39 | public function sendNotifyResponse() 40 | { 41 | echo $this->getNotifyResponse(); 42 | } 43 | 44 | public function getNotifyResponseWithRSA() { 45 | $reqTime = date('c', time()); 46 | $reqBody = $this->getNotifyResponse(); 47 | return array( 48 | 'headers' => array( 49 | 'content-type' => 'application/json; charset=UTF-8', 50 | 'response-time' => $reqTime, 51 | 'client-id' => $this->notifyPaymentRequest->getClientId(), 52 | 'signature' => 'algorithm=RSA256,keyVersion=1,signature=' . SignatureTool::sign( 53 | $this->notifyPaymentRequest->getHttpMethod(), 54 | $this->notifyPaymentRequest->getPath(), 55 | $this->notifyPaymentRequest->getClientId(), 56 | $reqTime, 57 | $reqBody, 58 | $this->merchantPrivateKey 59 | ) 60 | ), 61 | 'body' => $reqBody 62 | ); 63 | } 64 | 65 | public function sendNotifyResponseWithRSA() { 66 | $notifyResponseWithRSA = $this->getNotifyResponseWithRSA(); 67 | foreach ($notifyResponseWithRSA['headers'] as $header => $value) { 68 | header($header . ':' . $value); 69 | } 70 | echo $notifyResponseWithRSA['body']; 71 | } 72 | 73 | public function getHttpMethod() 74 | { 75 | return $this->notifyPaymentRequest->getHttpMethod(); 76 | } 77 | 78 | public function getPath() 79 | { 80 | return $this->notifyPaymentRequest->getPath(); 81 | } 82 | 83 | public function getClientId() 84 | { 85 | return $this->notifyPaymentRequest->getClientId(); 86 | } 87 | 88 | public function getRsqTime() 89 | { 90 | return $this->notifyPaymentRequest->getRsqTime(); 91 | } 92 | 93 | public function getRsqBody() 94 | { 95 | return $this->notifyPaymentRequest->getRsqBody(); 96 | } 97 | 98 | public function getSignature() 99 | { 100 | return $this->notifyPaymentRequest->getSignature(); 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /src/request/order/AlipayCreateOrderRequest.php: -------------------------------------------------------------------------------- 1 | productCode; 21 | } 22 | 23 | /** 24 | * @param mixed $productCode 25 | */ 26 | public function setProductCode($productCode) 27 | { 28 | $this->productCode = $productCode; 29 | } 30 | 31 | /** 32 | * @return mixed 33 | */ 34 | public function getPaymentRequestId() 35 | { 36 | return $this->paymentRequestId; 37 | } 38 | 39 | /** 40 | * @param mixed $paymentRequestId 41 | */ 42 | public function setPaymentRequestId($paymentRequestId) 43 | { 44 | $this->paymentRequestId = $paymentRequestId; 45 | } 46 | 47 | /** 48 | * @return mixed 49 | */ 50 | public function getOrder() 51 | { 52 | return $this->order; 53 | } 54 | 55 | /** 56 | * @param mixed $order 57 | */ 58 | public function setOrder($order) 59 | { 60 | $this->order = $order; 61 | } 62 | 63 | /** 64 | * @return mixed 65 | */ 66 | public function getPaymentAmount() 67 | { 68 | return $this->paymentAmount; 69 | } 70 | 71 | /** 72 | * @param mixed $paymentAmount 73 | */ 74 | public function setPaymentAmount($paymentAmount) 75 | { 76 | $this->paymentAmount = $paymentAmount; 77 | } 78 | 79 | /** 80 | * @return mixed 81 | */ 82 | public function getPaymentRedirectUrl() 83 | { 84 | return $this->paymentRedirectUrl; 85 | } 86 | 87 | /** 88 | * @param mixed $paymentRedirectUrl 89 | */ 90 | public function setPaymentRedirectUrl($paymentRedirectUrl) 91 | { 92 | $this->paymentRedirectUrl = $paymentRedirectUrl; 93 | } 94 | 95 | /** 96 | * @return mixed 97 | */ 98 | public function getPaymentNotifyUrl() 99 | { 100 | return $this->paymentNotifyUrl; 101 | } 102 | 103 | /** 104 | * @param mixed $paymentNotifyUrl 105 | */ 106 | public function setPaymentNotifyUrl($paymentNotifyUrl) 107 | { 108 | $this->paymentNotifyUrl = $paymentNotifyUrl; 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/request/pay/AlipayCaptureRequest.php: -------------------------------------------------------------------------------- 1 | captureRequestId; 19 | } 20 | 21 | /** 22 | * @param mixed $captureRequestId 23 | */ 24 | public function setCaptureRequestId($captureRequestId) 25 | { 26 | $this->captureRequestId = $captureRequestId; 27 | } 28 | 29 | /** 30 | * @return mixed 31 | */ 32 | public function getPaymentId() 33 | { 34 | return $this->paymentId; 35 | } 36 | 37 | /** 38 | * @param mixed $paymentId 39 | */ 40 | public function setPaymentId($paymentId) 41 | { 42 | $this->paymentId = $paymentId; 43 | } 44 | 45 | /** 46 | * @return mixed 47 | */ 48 | public function getCaptureAmount() 49 | { 50 | return $this->captureAmount; 51 | } 52 | 53 | /** 54 | * @param mixed $captureAmount 55 | */ 56 | public function setCaptureAmount($captureAmount) 57 | { 58 | $this->captureAmount = $captureAmount; 59 | } 60 | 61 | /** 62 | * @return mixed 63 | */ 64 | public function getIsLastCapture() 65 | { 66 | return $this->isLastCapture; 67 | } 68 | 69 | /** 70 | * @param mixed $isLastCapture 71 | */ 72 | public function setIsLastCapture($isLastCapture) 73 | { 74 | $this->isLastCapture = $isLastCapture; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/request/pay/AlipayPayCancelRequest.php: -------------------------------------------------------------------------------- 1 | paymentId; 17 | } 18 | 19 | /** 20 | * @param mixed $paymentId 21 | */ 22 | public function setPaymentId($paymentId) 23 | { 24 | $this->paymentId = $paymentId; 25 | } 26 | 27 | /** 28 | * @return mixed 29 | */ 30 | public function getPaymentRequestId() 31 | { 32 | return $this->paymentRequestId; 33 | } 34 | 35 | /** 36 | * @param mixed $paymentRequestId 37 | */ 38 | public function setPaymentRequestId($paymentRequestId) 39 | { 40 | $this->paymentRequestId = $paymentRequestId; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/request/pay/AlipayPayConsultRequest.php: -------------------------------------------------------------------------------- 1 | productCode; 29 | } 30 | 31 | /** 32 | * @param mixed $productCode 33 | */ 34 | public function setProductCode($productCode) 35 | { 36 | $this->productCode = $productCode; 37 | } 38 | 39 | /** 40 | * @return mixed 41 | */ 42 | public function getPaymentAmount() 43 | { 44 | return $this->paymentAmount; 45 | } 46 | 47 | /** 48 | * @param mixed $paymentAmount 49 | */ 50 | public function setPaymentAmount($paymentAmount) 51 | { 52 | $this->paymentAmount = $paymentAmount; 53 | } 54 | 55 | /** 56 | * @return mixed 57 | */ 58 | public function getAllowedPaymentMethods() 59 | { 60 | return $this->allowedPaymentMethods; 61 | } 62 | 63 | /** 64 | * @param mixed $allowedPaymentMethods 65 | */ 66 | public function setAllowedPaymentMethods($allowedPaymentMethods) 67 | { 68 | $this->allowedPaymentMethods = $allowedPaymentMethods; 69 | } 70 | 71 | /** 72 | * @return mixed 73 | */ 74 | public function getBlockedPaymentMethods() 75 | { 76 | return $this->blockedPaymentMethods; 77 | } 78 | 79 | /** 80 | * @param mixed $blockedPaymentMethods 81 | */ 82 | public function setBlockedPaymentMethods($blockedPaymentMethods) 83 | { 84 | $this->blockedPaymentMethods = $blockedPaymentMethods; 85 | } 86 | 87 | /** 88 | * @return mixed 89 | */ 90 | public function getRegion() 91 | { 92 | return $this->region; 93 | } 94 | 95 | /** 96 | * @param mixed $region 97 | */ 98 | public function setRegion($region) 99 | { 100 | $this->region = $region; 101 | } 102 | 103 | /** 104 | * @return mixed 105 | */ 106 | public function getCustomerId() 107 | { 108 | return $this->customerId; 109 | } 110 | 111 | /** 112 | * @param mixed $customerId 113 | */ 114 | public function setCustomerId($customerId) 115 | { 116 | $this->customerId = $customerId; 117 | } 118 | 119 | /** 120 | * @return mixed 121 | */ 122 | public function getReferenceUserId() 123 | { 124 | return $this->referenceUserId; 125 | } 126 | 127 | /** 128 | * @param mixed $referenceUserId 129 | */ 130 | public function setReferenceUserId($referenceUserId) 131 | { 132 | $this->referenceUserId = $referenceUserId; 133 | } 134 | 135 | /** 136 | * @return mixed 137 | */ 138 | public function getEnv() 139 | { 140 | return $this->env; 141 | } 142 | 143 | /** 144 | * @param mixed $env 145 | */ 146 | public function setEnv($env) 147 | { 148 | $this->env = $env; 149 | } 150 | 151 | /** 152 | * @return mixed 153 | */ 154 | public function getExtendInfo() 155 | { 156 | return $this->extendInfo; 157 | } 158 | 159 | /** 160 | * @param mixed $extendInfo 161 | */ 162 | public function setExtendInfo($extendInfo) 163 | { 164 | $this->extendInfo = $extendInfo; 165 | } 166 | 167 | /** 168 | * @return mixed 169 | */ 170 | public function getUserRegion() 171 | { 172 | return $this->userRegion; 173 | } 174 | 175 | /** 176 | * @param mixed $userRegion 177 | */ 178 | public function setUserRegion($userRegion) 179 | { 180 | $this->userRegion = $userRegion; 181 | } 182 | 183 | /** 184 | * @return mixed 185 | */ 186 | public function getPaymentFactor() 187 | { 188 | return $this->paymentFactor; 189 | } 190 | 191 | /** 192 | * @param mixed $paymentFactor 193 | */ 194 | public function setPaymentFactor($paymentFactor) 195 | { 196 | $this->paymentFactor = $paymentFactor; 197 | } 198 | 199 | /** 200 | * @return mixed 201 | */ 202 | public function getSettlementStrategy() 203 | { 204 | return $this->settlementStrategy; 205 | } 206 | 207 | /** 208 | * @param mixed $settlementStrategy 209 | */ 210 | public function setSettlementStrategy($settlementStrategy) 211 | { 212 | $this->settlementStrategy = $settlementStrategy; 213 | } 214 | 215 | /** 216 | * @return mixed 217 | */ 218 | public function getMerchant() 219 | { 220 | return $this->merchant; 221 | } 222 | 223 | /** 224 | * @param mixed $merchant 225 | */ 226 | public function setMerchant($merchant) 227 | { 228 | $this->merchant = $merchant; 229 | } 230 | 231 | /** 232 | * @return mixed 233 | */ 234 | public function getAllowedPspRegions() 235 | { 236 | return $this->allowedPspRegions; 237 | } 238 | 239 | /** 240 | * @param mixed $allowedPspRegions 241 | */ 242 | public function setAllowedPspRegions($allowedPspRegions) 243 | { 244 | $this->allowedPspRegions = $allowedPspRegions; 245 | } 246 | } 247 | -------------------------------------------------------------------------------- /src/request/pay/AlipayPayQueryRequest.php: -------------------------------------------------------------------------------- 1 | paymentRequestId; 17 | } 18 | 19 | /** 20 | * @param mixed $paymentRequestId 21 | */ 22 | public function setPaymentRequestId($paymentRequestId) 23 | { 24 | $this->paymentRequestId = $paymentRequestId; 25 | } 26 | 27 | /** 28 | * @return mixed 29 | */ 30 | public function getPaymentId() 31 | { 32 | return $this->paymentId; 33 | } 34 | 35 | /** 36 | * @param mixed $paymentId 37 | */ 38 | public function setPaymentId($paymentId) 39 | { 40 | $this->paymentId = $paymentId; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/request/pay/AlipayPayRequest.php: -------------------------------------------------------------------------------- 1 | productCode; 32 | } 33 | 34 | /** 35 | * @param mixed $productCode 36 | */ 37 | public function setProductCode($productCode) 38 | { 39 | $this->productCode = $productCode; 40 | } 41 | 42 | /** 43 | * @return mixed 44 | */ 45 | public function getPaymentRequestId() 46 | { 47 | return $this->paymentRequestId; 48 | } 49 | 50 | /** 51 | * @param mixed $paymentRequestId 52 | */ 53 | public function setPaymentRequestId($paymentRequestId) 54 | { 55 | $this->paymentRequestId = $paymentRequestId; 56 | } 57 | 58 | /** 59 | * @return mixed 60 | */ 61 | public function getOrder() 62 | { 63 | return $this->order; 64 | } 65 | 66 | /** 67 | * @param mixed $order 68 | */ 69 | public function setOrder($order) 70 | { 71 | $this->order = $order; 72 | } 73 | 74 | /** 75 | * @return mixed 76 | */ 77 | public function getPaymentAmount() 78 | { 79 | return $this->paymentAmount; 80 | } 81 | 82 | /** 83 | * @param mixed $paymentAmount 84 | */ 85 | public function setPaymentAmount($paymentAmount) 86 | { 87 | $this->paymentAmount = $paymentAmount; 88 | } 89 | 90 | /** 91 | * @return mixed 92 | */ 93 | public function getPayToMethod() 94 | { 95 | return $this->payToMethod; 96 | } 97 | 98 | /** 99 | * @param mixed $payToMethod 100 | */ 101 | public function setPayToMethod($payToMethod) 102 | { 103 | $this->payToMethod = $payToMethod; 104 | } 105 | 106 | /** 107 | * @return mixed 108 | */ 109 | public function getPaymentMethod() 110 | { 111 | return $this->paymentMethod; 112 | } 113 | 114 | /** 115 | * @param mixed $paymentMethod 116 | */ 117 | public function setPaymentMethod($paymentMethod) 118 | { 119 | $this->paymentMethod = $paymentMethod; 120 | } 121 | 122 | /** 123 | * @return mixed 124 | */ 125 | public function getPaymentExpiryTime() 126 | { 127 | return $this->paymentExpiryTime; 128 | } 129 | 130 | /** 131 | * @param mixed $paymentExpiryTime 132 | */ 133 | public function setPaymentExpiryTime($paymentExpiryTime) 134 | { 135 | $this->paymentExpiryTime = $paymentExpiryTime; 136 | } 137 | 138 | /** 139 | * @return mixed 140 | */ 141 | public function getPaymentRedirectUrl() 142 | { 143 | return $this->paymentRedirectUrl; 144 | } 145 | 146 | /** 147 | * @param mixed $paymentRedirectUrl 148 | */ 149 | public function setPaymentRedirectUrl($paymentRedirectUrl) 150 | { 151 | $this->paymentRedirectUrl = $paymentRedirectUrl; 152 | } 153 | 154 | /** 155 | * @return mixed 156 | */ 157 | public function getPaymentNotifyUrl() 158 | { 159 | return $this->paymentNotifyUrl; 160 | } 161 | 162 | /** 163 | * @param mixed $paymentNotifyUrl 164 | */ 165 | public function setPaymentNotifyUrl($paymentNotifyUrl) 166 | { 167 | $this->paymentNotifyUrl = $paymentNotifyUrl; 168 | } 169 | 170 | /** 171 | * @return mixed 172 | */ 173 | public function getIsAuthorization() 174 | { 175 | return $this->isAuthorization; 176 | } 177 | 178 | /** 179 | * @param mixed $isAuthorization 180 | */ 181 | public function setIsAuthorization($isAuthorization) 182 | { 183 | $this->isAuthorization = $isAuthorization; 184 | } 185 | 186 | /** 187 | * @return mixed 188 | */ 189 | public function getPaymentVerificationData() 190 | { 191 | return $this->paymentVerificationData; 192 | } 193 | 194 | /** 195 | * @param mixed $paymentVerificationData 196 | */ 197 | public function setPaymentVerificationData($paymentVerificationData) 198 | { 199 | $this->paymentVerificationData = $paymentVerificationData; 200 | } 201 | 202 | /** 203 | * @return mixed 204 | */ 205 | public function getPaymentFactor() 206 | { 207 | return $this->paymentFactor; 208 | } 209 | 210 | /** 211 | * @param mixed $paymentFactor 212 | */ 213 | public function setPaymentFactor($paymentFactor) 214 | { 215 | $this->paymentFactor = $paymentFactor; 216 | } 217 | 218 | /** 219 | * @return mixed 220 | */ 221 | public function getMerchant() 222 | { 223 | return $this->merchant; 224 | } 225 | 226 | /** 227 | * @param mixed $merchant 228 | */ 229 | public function setMerchant($merchant) 230 | { 231 | $this->merchant = $merchant; 232 | } 233 | 234 | /** 235 | * @return mixed 236 | */ 237 | public function getExtendInfo() 238 | { 239 | return $this->extendInfo; 240 | } 241 | 242 | /** 243 | * @param mixed $extendInfo 244 | */ 245 | public function setExtendInfo($extendInfo) 246 | { 247 | $this->extendInfo = $extendInfo; 248 | } 249 | 250 | /** 251 | * @return mixed 252 | */ 253 | public function getCreditPayPlan() 254 | { 255 | return $this->creditPayPlan; 256 | } 257 | 258 | /** 259 | * @param mixed $creditPayPlan 260 | */ 261 | public function setCreditPayPlan($creditPayPlan) 262 | { 263 | $this->creditPayPlan = $creditPayPlan; 264 | } 265 | 266 | /** 267 | * @return mixed 268 | */ 269 | public function getSettlementStrategy() 270 | { 271 | return $this->settlementStrategy; 272 | } 273 | 274 | /** 275 | * @param mixed $settlementStrategy 276 | */ 277 | public function setSettlementStrategy($settlementStrategy) 278 | { 279 | $this->settlementStrategy = $settlementStrategy; 280 | } 281 | } 282 | -------------------------------------------------------------------------------- /src/request/pay/AlipayRefundRequest.php: -------------------------------------------------------------------------------- 1 | refundRequestId; 22 | } 23 | 24 | /** 25 | * @param mixed $refundRequestId 26 | */ 27 | public function setRefundRequestId($refundRequestId) 28 | { 29 | $this->refundRequestId = $refundRequestId; 30 | } 31 | 32 | /** 33 | * @return mixed 34 | */ 35 | public function getPaymentId() 36 | { 37 | return $this->paymentId; 38 | } 39 | 40 | /** 41 | * @param mixed $paymentId 42 | */ 43 | public function setPaymentId($paymentId) 44 | { 45 | $this->paymentId = $paymentId; 46 | } 47 | 48 | /** 49 | * @return mixed 50 | */ 51 | public function getReferenceRefundId() 52 | { 53 | return $this->referenceRefundId; 54 | } 55 | 56 | /** 57 | * @param mixed $referenceRefundId 58 | */ 59 | public function setReferenceRefundId($referenceRefundId) 60 | { 61 | $this->referenceRefundId = $referenceRefundId; 62 | } 63 | 64 | /** 65 | * @return mixed 66 | */ 67 | public function getRefundAmount() 68 | { 69 | return $this->refundAmount; 70 | } 71 | 72 | /** 73 | * @param mixed $refundAmount 74 | */ 75 | public function setRefundAmount($refundAmount) 76 | { 77 | $this->refundAmount = $refundAmount; 78 | } 79 | 80 | /** 81 | * @return mixed 82 | */ 83 | public function getRefundReason() 84 | { 85 | return $this->refundReason; 86 | } 87 | 88 | /** 89 | * @param mixed $refundReason 90 | */ 91 | public function setRefundReason($refundReason) 92 | { 93 | $this->refundReason = $refundReason; 94 | } 95 | 96 | /** 97 | * @return mixed 98 | */ 99 | public function getIsAsyncRefund() 100 | { 101 | return $this->isAsyncRefund; 102 | } 103 | 104 | /** 105 | * @param mixed $isAsyncRefund 106 | */ 107 | public function setIsAsyncRefund($isAsyncRefund) 108 | { 109 | $this->isAsyncRefund = $isAsyncRefund; 110 | } 111 | 112 | /** 113 | * @return mixed 114 | */ 115 | public function getExtendInfo() 116 | { 117 | return $this->extendInfo; 118 | } 119 | 120 | /** 121 | * @param mixed $extendInfo 122 | */ 123 | public function setExtendInfo($extendInfo) 124 | { 125 | $this->extendInfo = $extendInfo; 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /src/request/pay/EntryCodePaymentRequest.php: -------------------------------------------------------------------------------- 1 | setPath('/ams/api/v1/payments/pay'); 15 | $this->setProductCode(ProductCodeType::IN_STORE_PAYMENT); 16 | 17 | $paymentAmount = new Amount(); 18 | $paymentAmount->setCurrency($currency); 19 | $paymentAmount->setValue($amountInCents); 20 | $this->setPaymentAmount($paymentAmount); 21 | 22 | $paymentMethod = new PaymentMethod(); 23 | $paymentMethod->setPaymentMethodType('CONNECT_WALLET'); 24 | $this->setPaymentMethod($paymentMethod); 25 | 26 | $paymentFactor = new PaymentFactor(); 27 | $paymentFactor->setInStorePaymentScenario(InStorePaymentScenario::EntryCode); 28 | $this->setPaymentFactor($paymentFactor); 29 | 30 | $this->setPaymentRequestId($paymentRequestId); 31 | $this->setOrder($order); 32 | 33 | if (isset($paymentNotifyUrl)) { 34 | $this->setPaymentNotifyUrl($paymentNotifyUrl); 35 | } 36 | 37 | if (isset($paymentExpiryTime)) { 38 | $this->setPaymentExpireTime($paymentExpiryTime); 39 | } 40 | 41 | } 42 | 43 | public function validate() 44 | { 45 | $this->assertTrue(isset($this->order), "order required."); 46 | $this->assertTrue(isset($this->order->merchant), "order.merchant required."); 47 | $this->assertTrue(isset($this->order->orderAmount), "order.orderAmount required."); 48 | $this->assertTrue(isset($this->order->orderDescription), "order.orderDescription required."); 49 | $this->assertTrue(isset($this->order->merchant->referenceMerchantId), "order.merchant.referenceMerchantId required."); 50 | $this->assertTrue(isset($this->order->merchant->merchantMCC), "order.merchant.merchantMcc required."); 51 | $this->assertTrue(isset($this->order->merchant->merchantName), "order.merchant.merchantName required."); 52 | $this->assertTrue(isset($this->order->merchant->store), "order.merchant.store required."); 53 | $this->assertTrue(isset($this->order->merchant->store->referenceStoreId), "order.merchant.store.referenceStoreId required."); 54 | $this->assertTrue(isset($this->order->merchant->store->storeName), "order.merchant.store.storeName required."); 55 | $this->assertTrue(isset($this->order->merchant->store->storeMCC), "order.merchant.store.storeMcc required."); 56 | $this->assertTrue(isset($this->order->env), "order.env required."); 57 | $this->assertTrue(isset($this->order->env->userAgent), "order.env.userAgent required."); 58 | 59 | } 60 | 61 | public function assertTrue($exp, $msg) 62 | { 63 | if (!$exp) { 64 | throw new Exception($msg); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/request/pay/OrderCodePaymentRequest.php: -------------------------------------------------------------------------------- 1 | setPath('/ams/api/v1/payments/pay'); 15 | $this->setProductCode(ProductCodeType::IN_STORE_PAYMENT); 16 | 17 | $paymentAmount = new Amount(); 18 | $paymentAmount->setCurrency($currency); 19 | $paymentAmount->setValue($amountInCents); 20 | $this->setPaymentAmount($paymentAmount); 21 | 22 | $paymentMethod = new PaymentMethod(); 23 | $paymentMethod->setPaymentMethodType('CONNECT_WALLET'); 24 | $this->setPaymentMethod($paymentMethod); 25 | 26 | $paymentFactor = new PaymentFactor(); 27 | $paymentFactor->setInStorePaymentScenario(InStorePaymentScenario::OrderCode); 28 | $this->setPaymentFactor($paymentFactor); 29 | 30 | $this->setPaymentRequestId($paymentRequestId); 31 | $this->setOrder($order); 32 | 33 | if (isset($paymentNotifyUrl)) { 34 | $this->setPaymentNotifyUrl($paymentNotifyUrl); 35 | } 36 | 37 | if (isset($paymentExpiryTime)) { 38 | $this->setPaymentExpireTime($paymentExpiryTime); 39 | } 40 | 41 | } 42 | 43 | public function validate() 44 | { 45 | $this->assertTrue(isset($this->order), "order required."); 46 | $this->assertTrue(isset($this->order->merchant), "order.merchant required."); 47 | $this->assertTrue(isset($this->order->orderAmount), "order.orderAmount required."); 48 | $this->assertTrue(isset($this->order->orderDescription), "order.orderDescription required."); 49 | $this->assertTrue(isset($this->order->merchant->referenceMerchantId), "order.merchant.referenceMerchantId required."); 50 | $this->assertTrue(isset($this->order->merchant->merchantMCC), "order.merchant.merchantMcc required."); 51 | $this->assertTrue(isset($this->order->merchant->merchantName), "order.merchant.merchantName required."); 52 | $this->assertTrue(isset($this->order->merchant->store), "order.merchant.store required."); 53 | $this->assertTrue(isset($this->order->merchant->store->referenceStoreId), "order.merchant.store.referenceStoreId required."); 54 | $this->assertTrue(isset($this->order->merchant->store->storeName), "order.merchant.store.storeName required."); 55 | $this->assertTrue(isset($this->order->merchant->store->storeMCC), "order.merchant.store.storeMcc required."); 56 | } 57 | 58 | public function assertTrue($exp, $msg) 59 | { 60 | if (!$exp) { 61 | throw new Exception($msg); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/request/pay/UserPresentedCodePaymentRequest.php: -------------------------------------------------------------------------------- 1 | setPath('/ams/api/v1/payments/pay'); 15 | $this->setProductCode(ProductCodeType::IN_STORE_PAYMENT); 16 | 17 | $paymentAmount = new Amount(); 18 | $paymentAmount->setCurrency($currency); 19 | $paymentAmount->setValue($amountInCents); 20 | $this->setPaymentAmount($paymentAmount); 21 | 22 | $paymentMethod = new PaymentMethod(); 23 | $paymentMethod->setPaymentMethodType('CONNECT_WALLET'); 24 | $paymentMethod->setPaymentMethodId($paymentCode); 25 | $this->setPaymentMethod($paymentMethod); 26 | 27 | $paymentFactor = new PaymentFactor(); 28 | $paymentFactor->setInStorePaymentScenario(InStorePaymentScenario::PaymentCode); 29 | $this->setPaymentFactor($paymentFactor); 30 | 31 | $this->setPaymentRequestId($paymentRequestId); 32 | $this->setOrder($order); 33 | 34 | if (isset($paymentNotifyUrl)) { 35 | $this->setPaymentNotifyUrl($paymentNotifyUrl); 36 | } 37 | 38 | if (isset($paymentExpiryTime)) { 39 | $this->setPaymentExpireTime($paymentExpiryTime); 40 | } 41 | 42 | } 43 | 44 | public function validate() 45 | { 46 | $this->assertTrue(isset($this->order), "order required."); 47 | $this->assertTrue(isset($this->order->merchant), "order.merchant required."); 48 | $this->assertTrue(isset($this->order->orderAmount), "order.orderAmount required."); 49 | $this->assertTrue(isset($this->order->orderDescription), "order.orderDescription required."); 50 | $this->assertTrue(isset($this->order->merchant->referenceMerchantId), "order.merchant.referenceMerchantId required."); 51 | $this->assertTrue(isset($this->order->merchant->merchantMCC), "order.merchant.merchantMcc required."); 52 | $this->assertTrue(isset($this->order->merchant->merchantName), "order.merchant.merchantName required."); 53 | $this->assertTrue(isset($this->order->merchant->store), "order.merchant.store required."); 54 | $this->assertTrue(isset($this->order->merchant->store->referenceStoreId), "order.merchant.store.referenceStoreId required."); 55 | $this->assertTrue(isset($this->order->merchant->store->storeName), "order.merchant.store.storeName required."); 56 | $this->assertTrue(isset($this->order->merchant->store->storeMCC), "order.merchant.store.storeMcc required."); 57 | $this->assertTrue(isset($this->order->env), "order.env required."); 58 | $this->assertTrue(isset($this->order->env->storeTerminalId), "order.env.storeTerminalId required."); 59 | $this->assertTrue(isset($this->order->env->storeTerminalRequestTime), "order.env.storeTerminalRequestTime required."); 60 | } 61 | 62 | public function assertTrue($exp, $msg) 63 | { 64 | if (!$exp) { 65 | throw new Exception($msg); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/request/risk/AlipayRiskScoreInquiryRequest.php: -------------------------------------------------------------------------------- 1 | customerBelongsTo; 19 | } 20 | 21 | /** 22 | * @param mixed $customerBelongsTo 23 | */ 24 | public function setCustomerBelongsTo($customerBelongsTo) 25 | { 26 | $this->customerBelongsTo = $customerBelongsTo; 27 | } 28 | 29 | /** 30 | * @return mixed 31 | */ 32 | public function getCustomerIdType() 33 | { 34 | return $this->customerIdType; 35 | } 36 | 37 | /** 38 | * @param mixed $customerIdType 39 | */ 40 | public function setCustomerIdType($customerIdType) 41 | { 42 | $this->customerIdType = $customerIdType; 43 | } 44 | 45 | /** 46 | * @return mixed 47 | */ 48 | public function getCustomerId() 49 | { 50 | return $this->customerId; 51 | } 52 | 53 | /** 54 | * @param mixed $customerId 55 | */ 56 | public function setCustomerId($customerId) 57 | { 58 | $this->customerId = $customerId; 59 | } 60 | 61 | /** 62 | * @return mixed 63 | */ 64 | public function getRiskScoreTypes() 65 | { 66 | return $this->riskScoreTypes; 67 | } 68 | 69 | /** 70 | * @param mixed $riskScoreTypes 71 | */ 72 | public function setRiskScoreTypes($riskScoreTypes) 73 | { 74 | $this->riskScoreTypes = $riskScoreTypes; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/request/users/AlipayInitAuthenticationRequest.php: -------------------------------------------------------------------------------- 1 | authenticationType; 20 | } 21 | 22 | /** 23 | * @param mixed $authenticationType 24 | */ 25 | public function setAuthenticationType($authenticationType) 26 | { 27 | $this->authenticationType = $authenticationType; 28 | } 29 | 30 | /** 31 | * @return mixed 32 | */ 33 | public function getAuthenticationRequestId() 34 | { 35 | return $this->authenticationRequestId; 36 | } 37 | 38 | /** 39 | * @param mixed $authenticationRequestId 40 | */ 41 | public function setAuthenticationRequestId($authenticationRequestId) 42 | { 43 | $this->authenticationRequestId = $authenticationRequestId; 44 | } 45 | 46 | /** 47 | * @return mixed 48 | */ 49 | public function getAuthenticationChannelType() 50 | { 51 | return $this->authenticationChannelType; 52 | } 53 | 54 | /** 55 | * @param mixed $authenticationChannelType 56 | */ 57 | public function setAuthenticationChannelType($authenticationChannelType) 58 | { 59 | $this->authenticationChannelType = $authenticationChannelType; 60 | } 61 | 62 | /** 63 | * @return mixed 64 | */ 65 | public function getUserIdentityType() 66 | { 67 | return $this->userIdentityType; 68 | } 69 | 70 | /** 71 | * @param mixed $userIdentityType 72 | */ 73 | public function setUserIdentityType($userIdentityType) 74 | { 75 | $this->userIdentityType = $userIdentityType; 76 | } 77 | 78 | /** 79 | * @return mixed 80 | */ 81 | public function getUserIdentityValue() 82 | { 83 | return $this->userIdentityValue; 84 | } 85 | 86 | /** 87 | * @param mixed $userIdentityValue 88 | */ 89 | public function setUserIdentityValue($userIdentityValue) 90 | { 91 | $this->userIdentityValue = $userIdentityValue; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/request/users/AlipayUserQueryInfoRequest.php: -------------------------------------------------------------------------------- 1 | accessToken; 16 | } 17 | 18 | /** 19 | * @param mixed $accessToken 20 | */ 21 | public function setAccessToken($accessToken) 22 | { 23 | $this->accessToken = $accessToken; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/request/users/AlipayVerifyAuthenticationRequest.php: -------------------------------------------------------------------------------- 1 | authenticationType; 18 | } 19 | 20 | /** 21 | * @param mixed $authenticationType 22 | */ 23 | public function setAuthenticationType($authenticationType) 24 | { 25 | $this->authenticationType = $authenticationType; 26 | } 27 | 28 | /** 29 | * @return mixed 30 | */ 31 | public function getAuthenticationRequestId() 32 | { 33 | return $this->authenticationRequestId; 34 | } 35 | 36 | /** 37 | * @param mixed $authenticationRequestId 38 | */ 39 | public function setAuthenticationRequestId($authenticationRequestId) 40 | { 41 | $this->authenticationRequestId = $authenticationRequestId; 42 | } 43 | 44 | /** 45 | * @return mixed 46 | */ 47 | public function getAuthenticationValue() 48 | { 49 | return $this->authenticationValue; 50 | } 51 | 52 | /** 53 | * @param mixed $authenticationValue 54 | */ 55 | public function setAuthenticationValue($authenticationValue) 56 | { 57 | $this->authenticationValue = $authenticationValue; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/tool/IdTool.php: -------------------------------------------------------------------------------- 1 |