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

#   Wrong PayPal Transaction id: formatting?

##

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

Less More

- Posts: 10
- Thank you received: 0
-
-

13 years 2 months ago [\#121239](#121239) by [TheCoreStylerz](/forum/user/27423-thecorestylerz "View TheCoreStylerz's Profile")  *[Wrong PayPal Transaction id: formatting?](/forum/31-development/861562-wrong-paypal-transaction-id-formatting#121239 "-- HikaShop version -- :2.2.0 -- Joomla version -- : latest -- PHP version -- : 5.10.1  Hi. I developed a script for a windows software that requires a challenge code.  This script check if the PayPal Transaction ID is available inside the database. HikaShop transaction ID's are stored inside the hikashop&#95;history table, but something goes wrong when i query the DB.  I tried to directly check values in rows, and to mysql&#95;fetch aswell.  The script find some values, many not.  This thing is making me fool, since it's possible that the script find the &quot;PayPal transaction id: XXXXXX&quot; only for the ones that i added manually inside the table.  Is hikashop saving something hidden, some errors or formatting?  Using a SELECT &#42; FROM TABLE WHERE history&#95;data = $pay and formartting $pay as &quot;PayPal Transaction id : $transaction&#95;id&quot; always find a value, and others not.  Also i tried to explode only the paypal 17 chars string, but not work!  This produce: Array ( &#91;0&#93; =&gt; &#91;1&#93; =&gt; 0JW61238FU6854240 &#91;2&#93; =&gt; 5EA00979GC149044V &#91;3&#93; =&gt; 59P88560S9783170B &#91;4&#93; =&gt; 1L697134B06956638 &#91;5&#93; =&gt; 1N476458GR470922M &#91;6&#93; =&gt; 3N4412142S083993R &#91;7&#93; =&gt; 2GN69713EV7294613 &#91;8&#93; =&gt; 9WT48148YE725931K &#91;9&#93; =&gt; 585690586Y6998523 &#91;10&#93; =&gt; 7X9149767T051513K &#91;11&#93; =&gt; 5WJ25963L5455313H &#91;12&#93; =&gt; 1L717841BA5989748 &#91;13&#93; =&gt; 0E750230DV1575308 &#91;14&#93; =&gt; 85B43558SH819711N &#91;15&#93; =&gt; 78R85507FR2081540 &#91;16&#93; =&gt; 96F7363575285431M &#91;17&#93; =&gt; 87V99180GV2251342 &#91;18&#93; =&gt; 4G459145SE959020V &#91;19&#93; =&gt; 86U00726DL9205244 &#91;20&#93; =&gt; 70820350T9653825F &#91;21&#93; =&gt; 8K002091YN0079914 &#91;22&#93; =&gt; 8SD993824R7167708 &#91;23&#93; =&gt; 93L886231K973983G &#91;24&#93; =&gt; 6E98077468505954G &#91;25&#93; =&gt; 770172708D596892K &#91;26&#93; =&gt; 22N679682U615734D &#91;27&#93; =&gt; 3WR4000656945550Y &#91;28&#93; =&gt; 59P88560S9783170B &#91;29&#93; =&gt; 8H242117S01162917 &#91;30&#93; =&gt; 9WC47475K89394047 &#91;31&#93; =&gt; 83L6687699339330K &#91;32&#93; =&gt; 1BE09674W4880373N &#91;33&#93; =&gt; 3JC01978GH9146509 &#91;34&#93; =&gt; 31381161BJ159335S &#91;35&#93; =&gt; 17V97629HJ1941344 &#91;36&#93; =&gt; 4XG15144CK988864F &#91;37&#93; =&gt; 18625833YF123353H &#91;38&#93; =&gt; 2GU86013NN2703635 ) Match59P88560S9783170B  But also: Array ( &#91;0&#93; =&gt; &#91;1&#93; =&gt; 0JW61238FU6854240 &#91;2&#93; =&gt; 5EA00979GC149044V &#91;3&#93; =&gt; 59P88560S9783170B &#91;4&#93; =&gt; 1L697134B06956638 &#91;5&#93; =&gt; 1N476458GR470922M &#91;6&#93; =&gt; 3N4412142S083993R &#91;7&#93; =&gt; 2GN69713EV7294613 &#91;8&#93; =&gt; 9WT48148YE725931K &#91;9&#93; =&gt; 585690586Y6998523 &#91;10&#93; =&gt; 7X9149767T051513K &#91;11&#93; =&gt; 5WJ25963L5455313H &#91;12&#93; =&gt; 1L717841BA5989748 &#91;13&#93; =&gt; 0E750230DV1575308 &#91;14&#93; =&gt; 85B43558SH819711N &#91;15&#93; =&gt; 78R85507FR2081540 &#91;16&#93; =&gt; 96F7363575285431M &#91;17&#93; =&gt; 87V99180GV2251342 &#91;18&#93; =&gt; 4G459145SE959020V &#91;19&#93; =&gt; 86U00726DL9205244 &#91;20&#93; =&gt; 70820350T9653825F &#91;21&#93; =&gt; 8K002091YN0079914 &#91;22&#93; =&gt; 8SD993824R7167708 &#91;23&#93; =&gt; 93L886231K973983G &#91;24&#93; =&gt; 6E98077468505954G &#91;25&#93; =&gt; 770172708D596892K &#91;26&#93; =&gt; 22N679682U615734D &#91;27&#93; =&gt; 3WR4000656945550Y &#91;28&#93; =&gt; 59P88560S9783170B &#91;29&#93; =&gt; 8H242117S01162917 &#91;30&#93; =&gt; 9WC47475K89394047 &#91;31&#93; =&gt; 83L6687699339330K &#91;32&#93; =&gt; 1BE09674W4880373N &#91;33&#93; =&gt; 3JC01978GH9146509 &#91;34&#93; =&gt; 31381161BJ159335S &#91;35&#93; =&gt; 17V97629HJ1941344 &#91;36&#93; =&gt; 4XG15144CK988864F &#91;37&#93; =&gt; 18625833YF123353H &#91;38&#93; =&gt; 2GU86013NN2703635 ) Does not match0JW61238FU6854240  using 0JW61238FU6854240 value.  There is something to know about how the paypal transactions are stored?")* was created by *[TheCoreStylerz](/forum/user/27423-thecorestylerz "View TheCoreStylerz's Profile")*

-- HikaShop version -- :2.2.0
-- Joomla version -- : latest
-- PHP version -- : 5.10.1

Hi.
I developed a script for a windows software that requires a challenge code.

This script check if the PayPal Transaction ID is available inside the database.
HikaShop transaction ID's are stored inside the hikashop_history table, but something goes wrong when i query the DB.

I tried to directly check values in rows, and to mysql_fetch aswell.

The script find some values, many not.

This thing is making me fool, since it's possible that the script find the "PayPal transaction id: XXXXXX" only for the ones that i added manually inside the table.

Is hikashop saving something hidden, some errors or formatting?

Using a SELECT * FROM TABLE WHERE history_data = $pay and formartting $pay as "PayPal Transaction id : $transaction_id" always find a value, and others not.

Also i tried to explode only the paypal 17 chars string, but not work! Code:

$pay = "[oaypal id as string]"; // check if Transaction ID is available on the default website. $query = mysql_query ("SELECT * FROM jh23m_hikashop_history"); $result = mysql_num_rows($query); while(($row = mysql_fetch_array($query))) { $paypal_ids[] =$row['history_data']; } //print_r ($paypal_ids); // ora cerca il valore %pay $paypal_ids_split = implode("", $paypal_ids); //print_r ($paypal_ids_split); $paypal_ids_clean = explode ("PayPal transaction id: ", $paypal_ids_split); print_r ($paypal_ids_clean); if (array_search($pay, $paypal_ids_clean,TRUE)){ echo "Match"; } else { echo "Does not match"; } echo $pay;

This produce:
Array ( [0] =&gt; [1] =&gt; 0JW61238FU6854240 [2] =&gt; 5EA00979GC149044V [3] =&gt; 59P88560S9783170B [4] =&gt; 1L697134B06956638 [5] =&gt; 1N476458GR470922M [6] =&gt; 3N4412142S083993R [7] =&gt; 2GN69713EV7294613 [8] =&gt; 9WT48148YE725931K [9] =&gt; 585690586Y6998523 [10] =&gt; 7X9149767T051513K [11] =&gt; 5WJ25963L5455313H [12] =&gt; 1L717841BA5989748 [13] =&gt; 0E750230DV1575308 [14] =&gt; 85B43558SH819711N [15] =&gt; 78R85507FR2081540 [16] =&gt; 96F7363575285431M [17] =&gt; 87V99180GV2251342 [18] =&gt; 4G459145SE959020V [19] =&gt; 86U00726DL9205244 [20] =&gt; 70820350T9653825F [21] =&gt; 8K002091YN0079914 [22] =&gt; 8SD993824R7167708 [23] =&gt; 93L886231K973983G [24] =&gt; 6E98077468505954G [25] =&gt; 770172708D596892K [26] =&gt; 22N679682U615734D [27] =&gt; 3WR4000656945550Y [28] =&gt; 59P88560S9783170B [29] =&gt; 8H242117S01162917 [30] =&gt; 9WC47475K89394047 [31] =&gt; 83L6687699339330K [32] =&gt; 1BE09674W4880373N [33] =&gt; 3JC01978GH9146509 [34] =&gt; 31381161BJ159335S [35] =&gt; 17V97629HJ1941344 [36] =&gt; 4XG15144CK988864F [37] =&gt; 18625833YF123353H [38] =&gt; 2GU86013NN2703635 ) Match59P88560S9783170B

But also:
Array ( [0] =&gt; [1] =&gt; 0JW61238FU6854240 [2] =&gt; 5EA00979GC149044V [3] =&gt; 59P88560S9783170B [4] =&gt; 1L697134B06956638 [5] =&gt; 1N476458GR470922M [6] =&gt; 3N4412142S083993R [7] =&gt; 2GN69713EV7294613 [8] =&gt; 9WT48148YE725931K [9] =&gt; 585690586Y6998523 [10] =&gt; 7X9149767T051513K [11] =&gt; 5WJ25963L5455313H [12] =&gt; 1L717841BA5989748 [13] =&gt; 0E750230DV1575308 [14] =&gt; 85B43558SH819711N [15] =&gt; 78R85507FR2081540 [16] =&gt; 96F7363575285431M [17] =&gt; 87V99180GV2251342 [18] =&gt; 4G459145SE959020V [19] =&gt; 86U00726DL9205244 [20] =&gt; 70820350T9653825F [21] =&gt; 8K002091YN0079914 [22] =&gt; 8SD993824R7167708 [23] =&gt; 93L886231K973983G [24] =&gt; 6E98077468505954G [25] =&gt; 770172708D596892K [26] =&gt; 22N679682U615734D [27] =&gt; 3WR4000656945550Y [28] =&gt; 59P88560S9783170B [29] =&gt; 8H242117S01162917 [30] =&gt; 9WC47475K89394047 [31] =&gt; 83L6687699339330K [32] =&gt; 1BE09674W4880373N [33] =&gt; 3JC01978GH9146509 [34] =&gt; 31381161BJ159335S [35] =&gt; 17V97629HJ1941344 [36] =&gt; 4XG15144CK988864F [37] =&gt; 18625833YF123353H [38] =&gt; 2GU86013NN2703635 ) Does not match0JW61238FU6854240

using 0JW61238FU6854240 value.

There is something to know about how the paypal transactions are stored?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2MTU2Mi13cm9uZy1wYXlwYWwtdHJhbnNhY3Rpb24taWQtZm9ybWF0dGluZz90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14276
-
-

13 years 1 month ago [\#121316](#121316) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Wrong PayPal Transaction id: formatting?](/forum/31-development/861562-wrong-paypal-transaction-id-formatting#121316 "-- HikaShop version -- :2.2.0 -- Joomla version -- : latest -- PHP version -- : 5.10.1  Hi. I developed a script for a windows software that requires a challenge code.  This script check if the PayPal Transaction ID is available inside the database. HikaShop transaction ID's are stored inside the hikashop&#95;history table, but something goes wrong when i query the DB.  I tried to directly check values in rows, and to mysql&#95;fetch aswell.  The script find some values, many not.  This thing is making me fool, since it's possible that the script find the &quot;PayPal transaction id: XXXXXX&quot; only for the ones that i added manually inside the table.  Is hikashop saving something hidden, some errors or formatting?  Using a SELECT &#42; FROM TABLE WHERE history&#95;data = $pay and formartting $pay as &quot;PayPal Transaction id : $transaction&#95;id&quot; always find a value, and others not.  Also i tried to explode only the paypal 17 chars string, but not work!  This produce: Array ( &#91;0&#93; =&gt; &#91;1&#93; =&gt; 0JW61238FU6854240 &#91;2&#93; =&gt; 5EA00979GC149044V &#91;3&#93; =&gt; 59P88560S9783170B &#91;4&#93; =&gt; 1L697134B06956638 &#91;5&#93; =&gt; 1N476458GR470922M &#91;6&#93; =&gt; 3N4412142S083993R &#91;7&#93; =&gt; 2GN69713EV7294613 &#91;8&#93; =&gt; 9WT48148YE725931K &#91;9&#93; =&gt; 585690586Y6998523 &#91;10&#93; =&gt; 7X9149767T051513K &#91;11&#93; =&gt; 5WJ25963L5455313H &#91;12&#93; =&gt; 1L717841BA5989748 &#91;13&#93; =&gt; 0E750230DV1575308 &#91;14&#93; =&gt; 85B43558SH819711N &#91;15&#93; =&gt; 78R85507FR2081540 &#91;16&#93; =&gt; 96F7363575285431M &#91;17&#93; =&gt; 87V99180GV2251342 &#91;18&#93; =&gt; 4G459145SE959020V &#91;19&#93; =&gt; 86U00726DL9205244 &#91;20&#93; =&gt; 70820350T9653825F &#91;21&#93; =&gt; 8K002091YN0079914 &#91;22&#93; =&gt; 8SD993824R7167708 &#91;23&#93; =&gt; 93L886231K973983G &#91;24&#93; =&gt; 6E98077468505954G &#91;25&#93; =&gt; 770172708D596892K &#91;26&#93; =&gt; 22N679682U615734D &#91;27&#93; =&gt; 3WR4000656945550Y &#91;28&#93; =&gt; 59P88560S9783170B &#91;29&#93; =&gt; 8H242117S01162917 &#91;30&#93; =&gt; 9WC47475K89394047 &#91;31&#93; =&gt; 83L6687699339330K &#91;32&#93; =&gt; 1BE09674W4880373N &#91;33&#93; =&gt; 3JC01978GH9146509 &#91;34&#93; =&gt; 31381161BJ159335S &#91;35&#93; =&gt; 17V97629HJ1941344 &#91;36&#93; =&gt; 4XG15144CK988864F &#91;37&#93; =&gt; 18625833YF123353H &#91;38&#93; =&gt; 2GU86013NN2703635 ) Match59P88560S9783170B  But also: Array ( &#91;0&#93; =&gt; &#91;1&#93; =&gt; 0JW61238FU6854240 &#91;2&#93; =&gt; 5EA00979GC149044V &#91;3&#93; =&gt; 59P88560S9783170B &#91;4&#93; =&gt; 1L697134B06956638 &#91;5&#93; =&gt; 1N476458GR470922M &#91;6&#93; =&gt; 3N4412142S083993R &#91;7&#93; =&gt; 2GN69713EV7294613 &#91;8&#93; =&gt; 9WT48148YE725931K &#91;9&#93; =&gt; 585690586Y6998523 &#91;10&#93; =&gt; 7X9149767T051513K &#91;11&#93; =&gt; 5WJ25963L5455313H &#91;12&#93; =&gt; 1L717841BA5989748 &#91;13&#93; =&gt; 0E750230DV1575308 &#91;14&#93; =&gt; 85B43558SH819711N &#91;15&#93; =&gt; 78R85507FR2081540 &#91;16&#93; =&gt; 96F7363575285431M &#91;17&#93; =&gt; 87V99180GV2251342 &#91;18&#93; =&gt; 4G459145SE959020V &#91;19&#93; =&gt; 86U00726DL9205244 &#91;20&#93; =&gt; 70820350T9653825F &#91;21&#93; =&gt; 8K002091YN0079914 &#91;22&#93; =&gt; 8SD993824R7167708 &#91;23&#93; =&gt; 93L886231K973983G &#91;24&#93; =&gt; 6E98077468505954G &#91;25&#93; =&gt; 770172708D596892K &#91;26&#93; =&gt; 22N679682U615734D &#91;27&#93; =&gt; 3WR4000656945550Y &#91;28&#93; =&gt; 59P88560S9783170B &#91;29&#93; =&gt; 8H242117S01162917 &#91;30&#93; =&gt; 9WC47475K89394047 &#91;31&#93; =&gt; 83L6687699339330K &#91;32&#93; =&gt; 1BE09674W4880373N &#91;33&#93; =&gt; 3JC01978GH9146509 &#91;34&#93; =&gt; 31381161BJ159335S &#91;35&#93; =&gt; 17V97629HJ1941344 &#91;36&#93; =&gt; 4XG15144CK988864F &#91;37&#93; =&gt; 18625833YF123353H &#91;38&#93; =&gt; 2GU86013NN2703635 ) Does not match0JW61238FU6854240  using 0JW61238FU6854240 value.  There is something to know about how the paypal transactions are stored?")*

The transaction id is added with trailing \r\n. You don't see them because they don't appear on html pages, but if you look in the database, you should see them in the history table.
You should use something like:
if (array_search($pay."\r\n\r\n", $paypal_ids_clean,TRUE)){

The following user(s) said Thank You: [Мыктыбек](/forum/user/30192-myktybek "View Мыктыбек's Profile")

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

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

Less More

- Posts: 10
- Thank you received: 0
-
-

13 years 1 month ago [\#121404](#121404) by [TheCoreStylerz](/forum/user/27423-thecorestylerz "View TheCoreStylerz's Profile")  Replied by *[TheCoreStylerz](/forum/user/27423-thecorestylerz "View TheCoreStylerz's Profile")* on topic *[Wrong PayPal Transaction id: formatting?](/forum/31-development/861562-wrong-paypal-transaction-id-formatting#121404 "-- HikaShop version -- :2.2.0 -- Joomla version -- : latest -- PHP version -- : 5.10.1  Hi. I developed a script for a windows software that requires a challenge code.  This script check if the PayPal Transaction ID is available inside the database. HikaShop transaction ID's are stored inside the hikashop&#95;history table, but something goes wrong when i query the DB.  I tried to directly check values in rows, and to mysql&#95;fetch aswell.  The script find some values, many not.  This thing is making me fool, since it's possible that the script find the &quot;PayPal transaction id: XXXXXX&quot; only for the ones that i added manually inside the table.  Is hikashop saving something hidden, some errors or formatting?  Using a SELECT &#42; FROM TABLE WHERE history&#95;data = $pay and formartting $pay as &quot;PayPal Transaction id : $transaction&#95;id&quot; always find a value, and others not.  Also i tried to explode only the paypal 17 chars string, but not work!  This produce: Array ( &#91;0&#93; =&gt; &#91;1&#93; =&gt; 0JW61238FU6854240 &#91;2&#93; =&gt; 5EA00979GC149044V &#91;3&#93; =&gt; 59P88560S9783170B &#91;4&#93; =&gt; 1L697134B06956638 &#91;5&#93; =&gt; 1N476458GR470922M &#91;6&#93; =&gt; 3N4412142S083993R &#91;7&#93; =&gt; 2GN69713EV7294613 &#91;8&#93; =&gt; 9WT48148YE725931K &#91;9&#93; =&gt; 585690586Y6998523 &#91;10&#93; =&gt; 7X9149767T051513K &#91;11&#93; =&gt; 5WJ25963L5455313H &#91;12&#93; =&gt; 1L717841BA5989748 &#91;13&#93; =&gt; 0E750230DV1575308 &#91;14&#93; =&gt; 85B43558SH819711N &#91;15&#93; =&gt; 78R85507FR2081540 &#91;16&#93; =&gt; 96F7363575285431M &#91;17&#93; =&gt; 87V99180GV2251342 &#91;18&#93; =&gt; 4G459145SE959020V &#91;19&#93; =&gt; 86U00726DL9205244 &#91;20&#93; =&gt; 70820350T9653825F &#91;21&#93; =&gt; 8K002091YN0079914 &#91;22&#93; =&gt; 8SD993824R7167708 &#91;23&#93; =&gt; 93L886231K973983G &#91;24&#93; =&gt; 6E98077468505954G &#91;25&#93; =&gt; 770172708D596892K &#91;26&#93; =&gt; 22N679682U615734D &#91;27&#93; =&gt; 3WR4000656945550Y &#91;28&#93; =&gt; 59P88560S9783170B &#91;29&#93; =&gt; 8H242117S01162917 &#91;30&#93; =&gt; 9WC47475K89394047 &#91;31&#93; =&gt; 83L6687699339330K &#91;32&#93; =&gt; 1BE09674W4880373N &#91;33&#93; =&gt; 3JC01978GH9146509 &#91;34&#93; =&gt; 31381161BJ159335S &#91;35&#93; =&gt; 17V97629HJ1941344 &#91;36&#93; =&gt; 4XG15144CK988864F &#91;37&#93; =&gt; 18625833YF123353H &#91;38&#93; =&gt; 2GU86013NN2703635 ) Match59P88560S9783170B  But also: Array ( &#91;0&#93; =&gt; &#91;1&#93; =&gt; 0JW61238FU6854240 &#91;2&#93; =&gt; 5EA00979GC149044V &#91;3&#93; =&gt; 59P88560S9783170B &#91;4&#93; =&gt; 1L697134B06956638 &#91;5&#93; =&gt; 1N476458GR470922M &#91;6&#93; =&gt; 3N4412142S083993R &#91;7&#93; =&gt; 2GN69713EV7294613 &#91;8&#93; =&gt; 9WT48148YE725931K &#91;9&#93; =&gt; 585690586Y6998523 &#91;10&#93; =&gt; 7X9149767T051513K &#91;11&#93; =&gt; 5WJ25963L5455313H &#91;12&#93; =&gt; 1L717841BA5989748 &#91;13&#93; =&gt; 0E750230DV1575308 &#91;14&#93; =&gt; 85B43558SH819711N &#91;15&#93; =&gt; 78R85507FR2081540 &#91;16&#93; =&gt; 96F7363575285431M &#91;17&#93; =&gt; 87V99180GV2251342 &#91;18&#93; =&gt; 4G459145SE959020V &#91;19&#93; =&gt; 86U00726DL9205244 &#91;20&#93; =&gt; 70820350T9653825F &#91;21&#93; =&gt; 8K002091YN0079914 &#91;22&#93; =&gt; 8SD993824R7167708 &#91;23&#93; =&gt; 93L886231K973983G &#91;24&#93; =&gt; 6E98077468505954G &#91;25&#93; =&gt; 770172708D596892K &#91;26&#93; =&gt; 22N679682U615734D &#91;27&#93; =&gt; 3WR4000656945550Y &#91;28&#93; =&gt; 59P88560S9783170B &#91;29&#93; =&gt; 8H242117S01162917 &#91;30&#93; =&gt; 9WC47475K89394047 &#91;31&#93; =&gt; 83L6687699339330K &#91;32&#93; =&gt; 1BE09674W4880373N &#91;33&#93; =&gt; 3JC01978GH9146509 &#91;34&#93; =&gt; 31381161BJ159335S &#91;35&#93; =&gt; 17V97629HJ1941344 &#91;36&#93; =&gt; 4XG15144CK988864F &#91;37&#93; =&gt; 18625833YF123353H &#91;38&#93; =&gt; 2GU86013NN2703635 ) Does not match0JW61238FU6854240  using 0JW61238FU6854240 value.  There is something to know about how the paypal transactions are stored?")*

> nicolas wrote: The transaction id is added with trailing \\r\\n. You don't see them because they don't appear on html pages, but if you look in the database, you should see them in the history table.
> You should use something like:
> if (array\_search($pay."\\r\\n\\r\\n", $paypal\_ids\_clean,TRUE)){

Thanks! im an absolute beginner with php. I solved by using a fuction that clean all withespaces before and after the string. ![;)](/media/kunena/emoticons/11.png ";)")

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

- **[Мыктыбек](/forum/user/30192-myktybek "View Мыктыбек's Profile")**
- [![Мыктыбек's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/30192-myktybek "View Мыктыбек's Profile")
- [ Offline](/forum/user/30192-myktybek)

Less More

- Posts: 39
- Thank you received: 0
-
-

12 years 9 months ago [\#139732](#139732) by [Мыктыбек](/forum/user/30192-myktybek "View Мыктыбек's Profile")  Replied by *[Мыктыбек](/forum/user/30192-myktybek "View Мыктыбек's Profile")* on topic *[Wrong PayPal Transaction id: formatting?](/forum/31-development/861562-wrong-paypal-transaction-id-formatting#139732 "-- HikaShop version -- :2.2.0 -- Joomla version -- : latest -- PHP version -- : 5.10.1  Hi. I developed a script for a windows software that requires a challenge code.  This script check if the PayPal Transaction ID is available inside the database. HikaShop transaction ID's are stored inside the hikashop&#95;history table, but something goes wrong when i query the DB.  I tried to directly check values in rows, and to mysql&#95;fetch aswell.  The script find some values, many not.  This thing is making me fool, since it's possible that the script find the &quot;PayPal transaction id: XXXXXX&quot; only for the ones that i added manually inside the table.  Is hikashop saving something hidden, some errors or formatting?  Using a SELECT &#42; FROM TABLE WHERE history&#95;data = $pay and formartting $pay as &quot;PayPal Transaction id : $transaction&#95;id&quot; always find a value, and others not.  Also i tried to explode only the paypal 17 chars string, but not work!  This produce: Array ( &#91;0&#93; =&gt; &#91;1&#93; =&gt; 0JW61238FU6854240 &#91;2&#93; =&gt; 5EA00979GC149044V &#91;3&#93; =&gt; 59P88560S9783170B &#91;4&#93; =&gt; 1L697134B06956638 &#91;5&#93; =&gt; 1N476458GR470922M &#91;6&#93; =&gt; 3N4412142S083993R &#91;7&#93; =&gt; 2GN69713EV7294613 &#91;8&#93; =&gt; 9WT48148YE725931K &#91;9&#93; =&gt; 585690586Y6998523 &#91;10&#93; =&gt; 7X9149767T051513K &#91;11&#93; =&gt; 5WJ25963L5455313H &#91;12&#93; =&gt; 1L717841BA5989748 &#91;13&#93; =&gt; 0E750230DV1575308 &#91;14&#93; =&gt; 85B43558SH819711N &#91;15&#93; =&gt; 78R85507FR2081540 &#91;16&#93; =&gt; 96F7363575285431M &#91;17&#93; =&gt; 87V99180GV2251342 &#91;18&#93; =&gt; 4G459145SE959020V &#91;19&#93; =&gt; 86U00726DL9205244 &#91;20&#93; =&gt; 70820350T9653825F &#91;21&#93; =&gt; 8K002091YN0079914 &#91;22&#93; =&gt; 8SD993824R7167708 &#91;23&#93; =&gt; 93L886231K973983G &#91;24&#93; =&gt; 6E98077468505954G &#91;25&#93; =&gt; 770172708D596892K &#91;26&#93; =&gt; 22N679682U615734D &#91;27&#93; =&gt; 3WR4000656945550Y &#91;28&#93; =&gt; 59P88560S9783170B &#91;29&#93; =&gt; 8H242117S01162917 &#91;30&#93; =&gt; 9WC47475K89394047 &#91;31&#93; =&gt; 83L6687699339330K &#91;32&#93; =&gt; 1BE09674W4880373N &#91;33&#93; =&gt; 3JC01978GH9146509 &#91;34&#93; =&gt; 31381161BJ159335S &#91;35&#93; =&gt; 17V97629HJ1941344 &#91;36&#93; =&gt; 4XG15144CK988864F &#91;37&#93; =&gt; 18625833YF123353H &#91;38&#93; =&gt; 2GU86013NN2703635 ) Match59P88560S9783170B  But also: Array ( &#91;0&#93; =&gt; &#91;1&#93; =&gt; 0JW61238FU6854240 &#91;2&#93; =&gt; 5EA00979GC149044V &#91;3&#93; =&gt; 59P88560S9783170B &#91;4&#93; =&gt; 1L697134B06956638 &#91;5&#93; =&gt; 1N476458GR470922M &#91;6&#93; =&gt; 3N4412142S083993R &#91;7&#93; =&gt; 2GN69713EV7294613 &#91;8&#93; =&gt; 9WT48148YE725931K &#91;9&#93; =&gt; 585690586Y6998523 &#91;10&#93; =&gt; 7X9149767T051513K &#91;11&#93; =&gt; 5WJ25963L5455313H &#91;12&#93; =&gt; 1L717841BA5989748 &#91;13&#93; =&gt; 0E750230DV1575308 &#91;14&#93; =&gt; 85B43558SH819711N &#91;15&#93; =&gt; 78R85507FR2081540 &#91;16&#93; =&gt; 96F7363575285431M &#91;17&#93; =&gt; 87V99180GV2251342 &#91;18&#93; =&gt; 4G459145SE959020V &#91;19&#93; =&gt; 86U00726DL9205244 &#91;20&#93; =&gt; 70820350T9653825F &#91;21&#93; =&gt; 8K002091YN0079914 &#91;22&#93; =&gt; 8SD993824R7167708 &#91;23&#93; =&gt; 93L886231K973983G &#91;24&#93; =&gt; 6E98077468505954G &#91;25&#93; =&gt; 770172708D596892K &#91;26&#93; =&gt; 22N679682U615734D &#91;27&#93; =&gt; 3WR4000656945550Y &#91;28&#93; =&gt; 59P88560S9783170B &#91;29&#93; =&gt; 8H242117S01162917 &#91;30&#93; =&gt; 9WC47475K89394047 &#91;31&#93; =&gt; 83L6687699339330K &#91;32&#93; =&gt; 1BE09674W4880373N &#91;33&#93; =&gt; 3JC01978GH9146509 &#91;34&#93; =&gt; 31381161BJ159335S &#91;35&#93; =&gt; 17V97629HJ1941344 &#91;36&#93; =&gt; 4XG15144CK988864F &#91;37&#93; =&gt; 18625833YF123353H &#91;38&#93; =&gt; 2GU86013NN2703635 ) Does not match0JW61238FU6854240  using 0JW61238FU6854240 value.  There is something to know about how the paypal transactions are stored?")*

Hi i want create own transaction server to server i am write some php codes but i can't do it if you know code or some idea can you sent example code php please?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2MTU2Mi13cm9uZy1wYXlwYWwtdHJhbnNhY3Rpb24taWQtZm9ybWF0dGluZz90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14276
-
-

12 years 9 months ago [\#139813](#139813) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Wrong PayPal Transaction id: formatting?](/forum/31-development/861562-wrong-paypal-transaction-id-formatting#139813 "-- HikaShop version -- :2.2.0 -- Joomla version -- : latest -- PHP version -- : 5.10.1  Hi. I developed a script for a windows software that requires a challenge code.  This script check if the PayPal Transaction ID is available inside the database. HikaShop transaction ID's are stored inside the hikashop&#95;history table, but something goes wrong when i query the DB.  I tried to directly check values in rows, and to mysql&#95;fetch aswell.  The script find some values, many not.  This thing is making me fool, since it's possible that the script find the &quot;PayPal transaction id: XXXXXX&quot; only for the ones that i added manually inside the table.  Is hikashop saving something hidden, some errors or formatting?  Using a SELECT &#42; FROM TABLE WHERE history&#95;data = $pay and formartting $pay as &quot;PayPal Transaction id : $transaction&#95;id&quot; always find a value, and others not.  Also i tried to explode only the paypal 17 chars string, but not work!  This produce: Array ( &#91;0&#93; =&gt; &#91;1&#93; =&gt; 0JW61238FU6854240 &#91;2&#93; =&gt; 5EA00979GC149044V &#91;3&#93; =&gt; 59P88560S9783170B &#91;4&#93; =&gt; 1L697134B06956638 &#91;5&#93; =&gt; 1N476458GR470922M &#91;6&#93; =&gt; 3N4412142S083993R &#91;7&#93; =&gt; 2GN69713EV7294613 &#91;8&#93; =&gt; 9WT48148YE725931K &#91;9&#93; =&gt; 585690586Y6998523 &#91;10&#93; =&gt; 7X9149767T051513K &#91;11&#93; =&gt; 5WJ25963L5455313H &#91;12&#93; =&gt; 1L717841BA5989748 &#91;13&#93; =&gt; 0E750230DV1575308 &#91;14&#93; =&gt; 85B43558SH819711N &#91;15&#93; =&gt; 78R85507FR2081540 &#91;16&#93; =&gt; 96F7363575285431M &#91;17&#93; =&gt; 87V99180GV2251342 &#91;18&#93; =&gt; 4G459145SE959020V &#91;19&#93; =&gt; 86U00726DL9205244 &#91;20&#93; =&gt; 70820350T9653825F &#91;21&#93; =&gt; 8K002091YN0079914 &#91;22&#93; =&gt; 8SD993824R7167708 &#91;23&#93; =&gt; 93L886231K973983G &#91;24&#93; =&gt; 6E98077468505954G &#91;25&#93; =&gt; 770172708D596892K &#91;26&#93; =&gt; 22N679682U615734D &#91;27&#93; =&gt; 3WR4000656945550Y &#91;28&#93; =&gt; 59P88560S9783170B &#91;29&#93; =&gt; 8H242117S01162917 &#91;30&#93; =&gt; 9WC47475K89394047 &#91;31&#93; =&gt; 83L6687699339330K &#91;32&#93; =&gt; 1BE09674W4880373N &#91;33&#93; =&gt; 3JC01978GH9146509 &#91;34&#93; =&gt; 31381161BJ159335S &#91;35&#93; =&gt; 17V97629HJ1941344 &#91;36&#93; =&gt; 4XG15144CK988864F &#91;37&#93; =&gt; 18625833YF123353H &#91;38&#93; =&gt; 2GU86013NN2703635 ) Match59P88560S9783170B  But also: Array ( &#91;0&#93; =&gt; &#91;1&#93; =&gt; 0JW61238FU6854240 &#91;2&#93; =&gt; 5EA00979GC149044V &#91;3&#93; =&gt; 59P88560S9783170B &#91;4&#93; =&gt; 1L697134B06956638 &#91;5&#93; =&gt; 1N476458GR470922M &#91;6&#93; =&gt; 3N4412142S083993R &#91;7&#93; =&gt; 2GN69713EV7294613 &#91;8&#93; =&gt; 9WT48148YE725931K &#91;9&#93; =&gt; 585690586Y6998523 &#91;10&#93; =&gt; 7X9149767T051513K &#91;11&#93; =&gt; 5WJ25963L5455313H &#91;12&#93; =&gt; 1L717841BA5989748 &#91;13&#93; =&gt; 0E750230DV1575308 &#91;14&#93; =&gt; 85B43558SH819711N &#91;15&#93; =&gt; 78R85507FR2081540 &#91;16&#93; =&gt; 96F7363575285431M &#91;17&#93; =&gt; 87V99180GV2251342 &#91;18&#93; =&gt; 4G459145SE959020V &#91;19&#93; =&gt; 86U00726DL9205244 &#91;20&#93; =&gt; 70820350T9653825F &#91;21&#93; =&gt; 8K002091YN0079914 &#91;22&#93; =&gt; 8SD993824R7167708 &#91;23&#93; =&gt; 93L886231K973983G &#91;24&#93; =&gt; 6E98077468505954G &#91;25&#93; =&gt; 770172708D596892K &#91;26&#93; =&gt; 22N679682U615734D &#91;27&#93; =&gt; 3WR4000656945550Y &#91;28&#93; =&gt; 59P88560S9783170B &#91;29&#93; =&gt; 8H242117S01162917 &#91;30&#93; =&gt; 9WC47475K89394047 &#91;31&#93; =&gt; 83L6687699339330K &#91;32&#93; =&gt; 1BE09674W4880373N &#91;33&#93; =&gt; 3JC01978GH9146509 &#91;34&#93; =&gt; 31381161BJ159335S &#91;35&#93; =&gt; 17V97629HJ1941344 &#91;36&#93; =&gt; 4XG15144CK988864F &#91;37&#93; =&gt; 18625833YF123353H &#91;38&#93; =&gt; 2GU86013NN2703635 ) Does not match0JW61238FU6854240  using 0JW61238FU6854240 value.  There is something to know about how the paypal transactions are stored?")*

Hi,

I would recommend to look in the folders of the folder plugins/hikashoppayment of your website. You'll find the full code of all the payment plugins of HikaShop. Plenty of examples to work with.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2MTU2Mi13cm9uZy1wYXlwYWwtdHJhbnNhY3Rpb24taWQtZm9ybWF0dGluZz90bXBsPW1hcmtkb3du) 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.101 seconds

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

[](#top)
