From 376024e2bdc5a223e943b39225bd773a23e5d460 Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 3 Jul 2019 13:11:20 +0300 Subject: [PATCH] Backward compatibility with previously created payments --- intaro.retailcrm/classes/general/RCrmActions.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/intaro.retailcrm/classes/general/RCrmActions.php b/intaro.retailcrm/classes/general/RCrmActions.php index 324a2eaa..351a4549 100644 --- a/intaro.retailcrm/classes/general/RCrmActions.php +++ b/intaro.retailcrm/classes/general/RCrmActions.php @@ -302,6 +302,17 @@ class RCrmActions return ''; } + /** + * Returns true if provided externalId in new format (id_clientId) + * + * @param $externalId + * @return bool + */ + public static function isNewExternalId($externalId) + { + return !(false === strpos($externalId, '_')); + } + /** * Generates payment external ID *