[Skip to main content](#vessel-content)

#   Payment configuration parameter returning a corrupted value

##

- **[longhiba](/forum/user/58885-longhiba "View longhiba's Profile")**
- [![longhiba's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58885-longhiba "View longhiba's Profile") Topic Author
- [ Offline](/forum/user/58885-longhiba)

Less More

- Posts: 11
- Thank you received: 0
-
-

2 years 5 months ago [\#361249](#361249) by [longhiba](/forum/user/58885-longhiba "View longhiba's Profile")  *[Payment configuration parameter returning a corrupted value](/forum/29-payment-methods/908217-payment-configuration-parameter-returning-a-corrupted-value#361249 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.2.8 -- PHP version -- : 8.0.30  Hi, I've implemented a Payment plugin based on your example, perfectly working on sandbox, but not working in production for coding problems. After a lot of checks my Bank support found that the problem is that the Terminal ID sent on initialization and on payment notification is sent not as simple string (a number) but some special charcters are added.  I initiate my plugin parameters through pluginConfig array:  On database I checked that my values are memorized correctly:  The problem is that, when I call them to initiate the transaction process with this call:  $tid is sent as 30888470 instead of 30888470 So that the payment system doesn't recognize the terminal ID and payment fails. On logs is rendered as 30888470  All other parameters renders as they should be, included the Ksign (the API key). If I bypass plugin parameter and write it as a string everythig works. I could make a function to &quot;clean&quot; the erroneus value, but I would like to understand why this parameter is modified and why only this!  Thanks for help.")* was created by *[longhiba](/forum/user/58885-longhiba "View longhiba's Profile")*

-- HikaShop version -- : 4.7.1
-- Joomla version -- : 4.2.8
-- PHP version -- : 8.0.30

Hi,
I've implemented a Payment plugin based on your example, perfectly working on sandbox, but not working in production for coding problems.
After a lot of checks my Bank support found that the problem is that the Terminal ID sent on initialization and on payment notification is sent not as simple string (a number) but some special charcters are added.

I initiate my plugin parameters through pluginConfig array:
Code:

var $pluginConfig = array( // Sandbox / Production 'enviroment' =&gt; array('Ambiente di lavoro', 'list', array( 'production' =&gt; 'Production', 'sandbox' =&gt; 'Sandbox', )), 'url_sandbox' =&gt; array('URL sandbox', 'input','https://testapif.netsgroup.com/UNI_CG_SERVICES/services'), 'tid_sandbox' =&gt; array('ID sandbox', 'input', 'UNI_SEL'), 'kSig_sandbox' =&gt; array('API key sandbox', 'input', 'UNI_TESTKEY'), 'payment_url' =&gt; array('URL production', 'input', 'https://pagamenti.unicredit.it/UNI_CG_SERVICES/services'), 'tid' =&gt; array('ID production', 'input', ''), 'kSig' =&gt; array('API key production', 'input', ''), 'debug' =&gt; array('DEBUG', 'boolean','0'), // ... other stuff );

On database I checked that my values are memorized correctly:
Code:

O:8:"stdClass":31:{s:10:"enviroment";s:10:"production";s:11:"url_sandbox";s:55:"https://testapif.netsgroup.com/UNI_CG_SERVICES/services";s:11:"tid_sandbox";s:7:"UNI_SEL";s:12:"kSig_sandbox";s:11:"UNI_TESTKEY";s:11:"payment_url";s:55:"https://pagamenti.unicredit.it/UNI_CG_SERVICES/services";s:3:"tid";s:14:"‪30888470‬";s:4:"kSig";s:32:"******************";s:12:"notification";s:1:"0";s:5:"debug";s:1:"1";

The problem is that, when I call them to initiate the transaction process with this call: Code:

$tid = ($this-&gt;payment_params-&gt;enviroment == 'sandbox') ? $this-&gt;payment_params-&gt;tid_sandbox : $this-&gt;payment_params-&gt;tid; $kSig = ($this-&gt;payment_params-&gt;enviroment == 'sandbox') ? $this-&gt;payment_params-&gt;kSig_sandbox : $this-&gt;payment_params-&gt;kSig; $payment_url = ($this-&gt;payment_params-&gt;enviroment == 'sandbox') ? $this-&gt;payment_params-&gt;url_sandbox : $this-&gt;payment_params-&gt;payment_url;

$tid is sent as **&lt;U+202A&gt;30888470&lt;U+202C&gt;**
instead of **30888470**
So that the payment system doesn't recognize the terminal ID and payment fails.
On logs is rendered as 30888470

All other parameters renders as they should be, included the Ksign (the API key).
If I bypass plugin parameter and write it as a string everythig works.
I could make a function to "clean" the erroneus value, but I would like to understand why this parameter is modified and why only this!

Thanks for help.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy85MDgyMTctcGF5bWVudC1jb25maWd1cmF0aW9uLXBhcmFtZXRlci1yZXR1cm5pbmctYS1jb3JydXB0ZWQtdmFsdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86363
- Thank you received: 14296
-
-

2 years 5 months ago [\#361250](#361250) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Payment configuration parameter returning a corrupted value](/forum/29-payment-methods/908217-payment-configuration-parameter-returning-a-corrupted-value#361250 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.2.8 -- PHP version -- : 8.0.30  Hi, I've implemented a Payment plugin based on your example, perfectly working on sandbox, but not working in production for coding problems. After a lot of checks my Bank support found that the problem is that the Terminal ID sent on initialization and on payment notification is sent not as simple string (a number) but some special charcters are added.  I initiate my plugin parameters through pluginConfig array:  On database I checked that my values are memorized correctly:  The problem is that, when I call them to initiate the transaction process with this call:  $tid is sent as 30888470 instead of 30888470 So that the payment system doesn't recognize the terminal ID and payment fails. On logs is rendered as 30888470  All other parameters renders as they should be, included the Ksign (the API key). If I bypass plugin parameter and write it as a string everythig works. I could make a function to &quot;clean&quot; the erroneus value, but I would like to understand why this parameter is modified and why only this!  Thanks for help.")*

Hi,

The U+202A and U+202C are unicode control characters for direction:
[ www.fileformat.info/info/unicode/char/202a/index.htm](https://www.fileformat.info/info/unicode/char/202a/index.htm)
[ www.fileformat.info/info/unicode/char/202c/index.htm](https://www.fileformat.info/info/unicode/char/202c/index.htm)
I think this is used when you have text in right to left direction, and inside it, you have left to right text.
And control characters like this might not appear, since they are control characters, not meant to appear on the screen, but change the behavior of the text being displayed.
So this could be the result of a copy/paste gone awry.
There is probably nothing wrong with your plugin code, nor with HikaShop or Joomla.

The following user(s) said Thank You: [longhiba](/forum/user/58885-longhiba "View longhiba's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy85MDgyMTctcGF5bWVudC1jb25maWd1cmF0aW9uLXBhcmFtZXRlci1yZXR1cm5pbmctYS1jb3JydXB0ZWQtdmFsdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[longhiba](/forum/user/58885-longhiba "View longhiba's Profile")**
- [![longhiba's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58885-longhiba "View longhiba's Profile") Topic Author
- [ Offline](/forum/user/58885-longhiba)

Less More

- Posts: 11
- Thank you received: 0
-
-

2 years 5 months ago [\#361269](#361269) by [longhiba](/forum/user/58885-longhiba "View longhiba's Profile")  Replied by *[longhiba](/forum/user/58885-longhiba "View longhiba's Profile")* on topic *[Payment configuration parameter returning a corrupted value](/forum/29-payment-methods/908217-payment-configuration-parameter-returning-a-corrupted-value#361269 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.2.8 -- PHP version -- : 8.0.30  Hi, I've implemented a Payment plugin based on your example, perfectly working on sandbox, but not working in production for coding problems. After a lot of checks my Bank support found that the problem is that the Terminal ID sent on initialization and on payment notification is sent not as simple string (a number) but some special charcters are added.  I initiate my plugin parameters through pluginConfig array:  On database I checked that my values are memorized correctly:  The problem is that, when I call them to initiate the transaction process with this call:  $tid is sent as 30888470 instead of 30888470 So that the payment system doesn't recognize the terminal ID and payment fails. On logs is rendered as 30888470  All other parameters renders as they should be, included the Ksign (the API key). If I bypass plugin parameter and write it as a string everythig works. I could make a function to &quot;clean&quot; the erroneus value, but I would like to understand why this parameter is modified and why only this!  Thanks for help.")*

Hi,
it was exactly like this.
Thank you so much.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy85MDgyMTctcGF5bWVudC1jb25maWd1cmF0aW9uLXBhcmFtZXRlci1yZXR1cm5pbmctYS1jb3JydXB0ZWQtdmFsdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.050 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
