[TYPO3-english] TS to insert GP-values into DB

Bert Hiddink [BENDOO e-work solutions] hiddink at bendoo.nl
Thu Jun 26 13:08:29 CEST 2014


Hello,

I want to capture the value an external POST-var and insert part of it 
into a DB-table.

The post-var "Data" (string) looks like this:
amount=333333300|captureDay=0|captureMode=AUTHOR_CAPTURE|currencyCode=978|merchantId=002020000000001|orderId=iDeal1403770610|transactionDateTime=2014-06-26T10:17:28+02:00|transactionReference=iDeal1403770610x101727|keyVersion=1|authorisationId=002000234237|paymentMeanBrand=IDEAL|paymentMeanType=CREDIT_TRANSFER|responseCode=00

I need to process several variables of this string, so I wrote the 
following snippet:

   lib.content >
   lib.content = COA_INT
   lib.content {

     20 = TEXT
     20.stdWrap.data = GP:Data
     20.stdWrap.split {
        token.char = 124
        cObjNum = 1||2||3||4||5||6||7||8||9||10||11||12||13||
        1.current = 1
        ## This outputs "amount=333333300"

        6.current = 1
        ## This outputs "orderId=iDeal1403770610"

        13.current = 1
        13.split {
           token.char = 61
           cObjNum = 1||2||
           2.current=1
           ## This outputs "00"
        }

     }
   }

So far, so good...

Now I need to insert the object "lib.content.20.13.2" into a 
DB-table...can this be done with TS? Any ideas/suggestions?

Thanks so far!

Regards,
Bert


More information about the TYPO3-english mailing list