Skip to content

Commit

Permalink
Merge pull request smarty-php#30 from think-ahead/Redmine-#5143-(kire…
Browse files Browse the repository at this point in the history
…i)-キレイ・複数かんざしアカウント未対応箇所に対応する(Support-for-kirei,-multiple-kanzashi-accounts-unsupported-parts)

Redmine #5143 (kirei) キレイ・複数かんざしアカウント未対応箇所に対応する(support for kirei, multiple kanzashi accounts unsupported parts)
  • Loading branch information
think-katou authored Dec 22, 2020
2 parents 768fb88 + f69014f commit 184268e
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 22 deletions.
4 changes: 0 additions & 4 deletions app/config/require.dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,4 @@
define('EMAIL_DOMAIN', 'rctest.bmy.jp');

//-- かんざし設定 --//
define('KANZASHI_SIGNIN_URL', 'https://kanzashi-stg.pp-dev.org/signin');
define('KANZASHI_SIGNIN_HASH_KEY', '9rjaDn3TtIeuQxeWwOtlcIweoUrGGVuG0ZI8rjDsYdvs7lLFmBLKYeucEvEoU4BXibpxCLed7h9lKdu6yZM0HueiZz');
define('KANZASHI_SIGNIN_MEDIA', 'THK');
define('KANZASHI_SIGNIN_VERSION', 'v1');
define('KANZASHI_PATH', 'https://rckanzashiapi.sipss.jp');
4 changes: 0 additions & 4 deletions app/config/require.online.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
define('EMAIL_DOMAIN', 'bmy.jp');

//-- かんざし設定 --//
define('KANZASHI_SIGNIN_URL', 'https://kanzashi.com/signin');
define('KANZASHI_SIGNIN_HASH_KEY', 'vasahGa8Aephix9Goon9cheiMoh9Ahshish7lae1quei9eapi9paighiivieph2porahnei4ao6pha6phaephieFae');
define('KANZASHI_SIGNIN_MEDIA', 'THK');
define('KANZASHI_SIGNIN_VERSION', 'v1');
define('KANZASHI_PATH', 'https://kanzashiapi.sipss.jp');

//-- Webプロキシ --//
Expand Down
4 changes: 0 additions & 4 deletions app/config/require.rc.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@
define('EMAIL_DOMAIN', 'rcmail.bmy.jp');

//-- かんざし設定 --//
define('KANZASHI_SIGNIN_URL', 'https://kanzashi-stg.pp-dev.org/signin');
define('KANZASHI_SIGNIN_HASH_KEY', '9rjaDn3TtIeuQxeWwOtlcIweoUrGGVuG0ZI8rjDsYdvs7lLFmBLKYeucEvEoU4BXibpxCLed7h9lKdu6yZM0HueiZz');
define('KANZASHI_SIGNIN_MEDIA', 'THK');
define('KANZASHI_SIGNIN_VERSION', 'v1');
define('KANZASHI_PATH', 'https://rckanzashiapi.sipss.jp');

//-- Webプロキシ --//
Expand Down
54 changes: 44 additions & 10 deletions app/controllers/servers_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,7 @@ class ServersController extends WebServicesController
'storetype' => 'tns:storetypeInformation',
'allstoretype' => 'tns:AllStoreTypes',
'KanzashiSalons' => 'tns:KanzashiSalons',
'KanzashiConfig' => 'tns:KanzashiConfig',
'KanzashiInfo' => 'tns:KanzashiInfo',
'FACILITY_ENABLED' => 'xsd:boolean'
)),
Expand Down Expand Up @@ -1209,16 +1210,25 @@ class ServersController extends WebServicesController
'array' => 'KanzashiSalon'
),

'KanzashiConfig' => array(
'struct' => array(
'HairSigninHashKey' => 'xsd:string',
'HairSigninMedia' => 'xsd:string',
'HairSigninUrl' => 'xsd:string',
'HairSigninVersion' => 'xsd:string',
'KireiSigninHashKey' => 'xsd:string',
'KireiSigninMedia' => 'xsd:string',
'KireiSigninUrl' => 'xsd:string',
'KireiSigninVersion' => 'xsd:string'
)
),

'KanzashiInfo' => array(
'struct' => array(
'KanzashiId' => 'xsd:int',
'Status' => 'xsd:int',
'SyncKanzashiEnabledStaffReservationOnly' => 'xsd:boolean',
'FreeStaffcode' => 'xsd:int',
'SigninUrl' => 'xsd:string',
'SigninHashKey' => 'xsd:string',
'SigninMedia' => 'xsd:string',
'SigninVersion' => 'xsd:string'
'FreeStaffcode' => 'xsd:int'
)
),

Expand Down Expand Up @@ -3426,13 +3436,37 @@ function wsLogin($param)
'KanzashiId' => $salons[0]['KanzashiId'],
'Status' => $salons[0]['Status'],
'SyncKanzashiEnabledStaffReservationOnly' => (bool)$salons[0]['SyncKanzashiEnabledStaffReservationOnly'],
'FreeStaffcode' => $salons[0]['FreeStaffcode'],
'SigninUrl' => KANZASHI_SIGNIN_URL,
'SigninHashKey' => KANZASHI_SIGNIN_HASH_KEY,
'SigninMedia' => KANZASHI_SIGNIN_MEDIA,
'SigninVersion' => KANZASHI_SIGNIN_VERSION
'FreeStaffcode' => $salons[0]['FreeStaffcode']
);

$Sql = "
SELECT
hair_signin_hash_key AS HairSigninHashKey,
hair_signin_media AS HairSigninMedia,
hair_signin_url AS HairSigninUrl,
hair_signin_version AS HairSigninVersion,
kirei_signin_hash_key AS KireiSigninHashKey,
kirei_signin_media AS KireiSigninMedia,
kirei_signin_url AS KireiSigninUrl,
kirei_signin_version AS KireiSigninVersion
FROM
sipssbeauty_kanzashi.configuration";
$result = $this->StoreSettings->query($Sql);
$kanzashiConfig = $result[0]['configuration'];

if ($kanzashiConfig) {
$arrReturn['KanzashiConfig'] = array(
'HairSigninHashKey' => $kanzashiConfig['HairSigninHashKey'],
'HairSigninMedia' => $kanzashiConfig['HairSigninMedia'],
'HairSigninUrl' => $kanzashiConfig['HairSigninUrl'],
'HairSigninVersion' => $kanzashiConfig['HairSigninVersion'],
'KireiSigninHashKey' => $kanzashiConfig['KireiSigninHashKey'],
'KireiSigninMedia' => $kanzashiConfig['KireiSigninMedia'],
'KireiSigninUrl' => $kanzashiConfig['KireiSigninUrl'],
'KireiSigninVersion' => $kanzashiConfig['KireiSigninVersion']
);
}

}
$arrReturn['KanzashiSalons'] = $salons;
//------------------------------------------------------------------
Expand Down

0 comments on commit 184268e

Please sign in to comment.