Re: [WebDNA] Authorize working connection...

This WebDNA talk-list message is from

2020


It keeps the original formatting.
numero = 114989
interpreted = N
texte = 2617 --Apple-Mail=_17DA2D90-DB9A-4E2D-8E9E-E6C9DC304E49 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 [xmlparse var=3Dxml_var1]  USERID UID-12345   INVOICENUMBER INV10023  [/xmlparse] [xmlnodes ref=3Dxml_var1][!] [/!][xmlnodes][!] [/!][TEXT][xmlnodes][!] [/!][showif [name]=3Dname][GetChars = start=3D1&trim=3Dboth][value][/GetChars]=3D[/showif][showif = [name]=3Dvalue][GetChars = start=3D1&trim=3Dboth][value][/GetChars][/showif][!] [/!][/xmlnodes][/TEXT][!] [/!][/xmlnodes][!] [/!][/xmlnodes] USERID =3D [USERID]
INVOICENUMBER =3D [INVOICENUMBER] Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@plsoftware.com.au > On 1 Jan 2020, at 21:56, talk@webdna.us wrote: >=20 > XML Parse worked good until I have duplicate... any suggestion...? > > > USERID > USERID Value1 > > > INVOICENUMBER > INV10023 > > >=20 > On Tue, Dec 31, 2019 at 10:02 AM > wrote: > If you don=E2=80=99t want to run into problems with Middle & GetChars = that could be thrown out by a change in an xml response or if you simply = want something portable you should use the native WebDNA XML processor = that was specifically created for exactly the operation you have = enquired. >=20 > http://webdna.us/page.dna?numero=3D283 = >=20 >=20 > Kind regards >=20 > Stuart Tremain > Pharoah Lane Software > AUSTRALIA > webdna@plsoftware.com.au >=20 >=20 >=20 >=20 >=20 >=20 >=20 >> On 30 Dec 2019, at 23:48, talk@webdna.us = wrote: >>=20 >> Didn't get much help for the talk list put this works and maybe they = can add it to their website for others.... searching the webDNA website = I could not find anything recent (like 20 years ago)... hard to believe = with Webcatalog and eCommerce they never got it quite together... >> Note: "" needs to be changed to get "successful" transactions = after you run it... >>=20 >> ++++++++++++++++++++++++++++++++++++ <> >> [text]content=3D >> >> >> [ YOUR API LOGIN P3u95bQpv] >> [ YOUR TRANSACTION KEY = HZ32z3fP4hTG2] >> >> 123444856 >> >> authCaptureTransaction >> 5 >> >> >> 5424000000000015 >> 2020-12 >> 999 >> >> >> >> INV-12345448 >> Product Description >> >> >> >> 1 >> vase >> Cannes logo 5KP3u95bQpv >> 18 >> 45.00 >> >> >> >> 4.26 >> level2 tax name >> level2 tax >> >> >> 8.55 >> duty name >> duty description >> >> >> 4.26 >> level2 tax name >> level2 tax >> >> 456654 >> >> 99999456654 >> >> >> Ellen >> Johnson >> Souveniropolis >>
14 Main Street
>> Pecan Springs >> TX >> 44628 >> USA >>
>> >> China >> Bayles >> Thyme for Tea >>
12 Main Street
>> Pecan Springs >> TX >> 44628 >> USA >>
>> 192.168.1.1 >> >> >> MerchantDefinedFieldName1 >> MerchantDefinedFieldValue1 >> >> >> favorite_color >> blue >> >> >>
>>
[/text] >>=20 >>=20 >> [text]response=3D[tcpconnect host=3Dapitest.authorize.net = &port=3D443&ssl=3DT][!] >> [/!][tcpsend]POST /xml/v1/request.api = HTTP/1.0[UnURL]%0D%0A[/UnURL][!] >> [/!]Host: apitest.authorize.net:443 = [UnURL]%0D%0A[/UnURL][!] >> [/!]User-Agent: StoreBuilder[UnURL]%0D%0A[/UnURL][!] >> [/!]Content-type: = application/x-www-form-urlencoded[UnURL]%0D%0A[/UnURL][!] >> [/!]Content-length: = [CountChars][content][/CountChars][UnURL]%0D%0A[/UnURL][!] >> [/!][content][UnURL]%0D%0A[/UnURL][!] >> [/!][/TCPSend][/tcpconnect][/text] >>=20 >> [response] >> ++++++++++++++++++++++++++++++++++++++++++++++++++++ >> Not sure if anyone has an easier way to parse out the XML data and = this is an example or how I do it on a google GEO TCPConnection....=20 >>=20 >> [text]BEFORE=3D[countchars][response][/countchars][/text] >>=20 >> [text]PRE=3D[convertwords table=3Daddr][response][/convertwords][/text]= >>=20 >> [text]AFTER=3D[countchars][PRE][/countchars][/text] >>=20 >> [text]END=3D[FindString source=3D[PRE]&find=3D][/text] >>=20 >> [text]THEFILE=3D[getchars = start=3D0&end=3D[math][END]+10[/math]][PRE][/getchars][/text] >>=20 >> [text]cords=3D[THEFILE][/text] >>=20 >> [text]STATUS=3D[Middle = StartAfter=3D&EndBefore=3D][cords][/Middle][/text] >>=20 >> [text]TYPEPRE=3D[Middle = StartAfter=3D&EndBefore=3D][cords][/Middle][/text= ] >> [Showif [TYPEPRE]^][text]TYPEPRE=3D[getchars = start=3D0&EndBefore=3D][TYPEPRE][/getchars][/text][/Showif] >>=20 >> [text]G_TYPE=3D[getchars = start=3D0&End=3D[math][countchars][TYPEPRE][/countchars]-8[/math]][TYPEPRE= ][/getchars][/text] >>=20 >> [Showif [STATUS]=3Dok] >>=20 >> [text]components=3D[Middle = StartAfter=3D&EndBefore=3D][cords][/Middle][= /text] >> [text]componentsEND=3D[countchars][components][/countchars][/text] >>=20 >> [text]Test1=3D[FindString = source=3D[components]&find=3D][/text] >>=20 >> [text]test2=3D[FindString source=3D[getchars = start=3D[math][Test1]+22[/math]&end=3D][components][/getchars]&find=3D][/text] >>=20 >> [text]test3=3D[FindString source=3D[getchars = start=3D[math][Test1]+22+[Test2]+22[/math]&end=3D][components][/getchars]&= find=3D][/text] >>=20 >>=20 >>=20 >> --=20 >> Brian Harrington >> Auto Glass Xpress >> 2655 Millersport Hwy. Suite 1063 >> Getzville, NY 14068 >> (716) 861-2029 >> www.Auto-Glass-Xpress.com = ---------------------------------------= ------------------ This message is sent to you because you are = subscribed to the mailing list talk@webdna.us To = unsubscribe, E-mail to: talk-leave@webdna.us = archives: = http://www.webdna.us/page.dna?numero=3D55 = Bug Reporting: = support@webdna.us > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list = talk@webdna.us To unsubscribe, E-mail to: = talk-leave@webdna.us archives: = http://www.webdna.us/page.dna?numero=3D55 = Bug Reporting: = support@webdna.us >=20 > --=20 > Brian Harrington > Auto Glass Xpress > 2655 Millersport Hwy. Suite 1063 > Getzville, NY 14068 > (716) 861-2029 > www.Auto-Glass-Xpress.com = ---------------------------------------= ------------------ This message is sent to you because you are = subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: = talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 = Bug Reporting: support@webdna.us --Apple-Mail=_17DA2D90-DB9A-4E2D-8E9E-E6C9DC304E49 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
[xmlparse var=3Dxml_var1]
<userFields>
= <userField>
= <name>USERID</name>
= <value>UID-12345</value>
= </userField>
= <userField>
= <name>INVOICENUMBER</name>
= <value>INV10023</value>
= </userField>
</userFields>
[/xmlparse]

[xmlnodes = ref=3Dxml_var1][!]
[/!][xmlnodes][!]
= [/!][TEXT][xmlnodes][!]
= [/!][showif [name]=3Dname][GetChars = start=3D1&trim=3Dboth][value][/GetChars]=3D[/showif][showif = [name]=3Dvalue][GetChars = start=3D1&trim=3Dboth][value][/GetChars][/showif][!]
= [/!][/xmlnodes][/TEXT][!]
= [/!][/xmlnodes][!]
[/!][/xmlnodes]

USERID =3D = [USERID]<br>
INVOICENUMBER =3D = [INVOICENUMBER]






Kind regards

Stuart Tremain
Pharoah Lane Software
AUSTRALIA







On 1 Jan 2020, at 21:56, talk@webdna.us wrote:

XML Parse worked good until I have duplicate... any = suggestion...?
<userFields>
  =     <userField>
      =   <name>USERID</name>
    =     <value> USERID Value1</value>
      </userField>
  =     <userField>
      =   <name>INVOICENUMBER</name>
  =       <value>INV10023</value>
      </userField>
  =   </userFields>

On Tue, Dec = 31, 2019 at 10:02 AM <talk@webdna.us> wrote:
If you don=E2=80=99t want to run into problems = with Middle & GetChars that could be thrown out by a change in an = xml response or if you simply want something portable you should use the = native WebDNA XML processor that was specifically created for exactly = the operation you have enquired.



Kind regards

Stuart Tremain
Pharoah Lane Software
AUSTRALIA







On 30 Dec 2019, at 23:48, talk@webdna.us wrote:

Didn't get much = help for the talk list put this works and maybe they can add it to their = website for others.... searching the webDNA website I could not find = anything recent (like 20 years ago)... hard to believe with Webcatalog = and eCommerce they never got it quite together...
Note: = "<refId>" needs to be changed to get "successful" transactions = after you run it...

[text]content=3D
<createTransactionRequest = xmlns=3D"AnetApi/xml/v1/schema/AnetApiSchema.xsd">
 = <merchantAuthentication>
    = <name>[  YOUR API LOGIN P3u95bQpv]</name>
    <transactionKey>[ YOUR TRANSACTION KEY = HZ32z3fP4hTG2]</transactionKey>
  = </merchantAuthentication>
  = <refId>123444856</refId>
  = <transactionRequest>
    = <transactionType>authCaptureTransaction</transactionType>
    <amount>5</amount>
    <payment>
    =   <creditCard>
        = <cardNumber>5424000000000015</cardNumber>
 =       = <expirationDate>2020-12</expirationDate>
  =       <cardCode>999</cardCode>
      </creditCard>
  =   </payment>
    <order>
    =  <invoiceNumber>INV-12345448</invoiceNumber>
     <description>Product = Description</description>
    = </order>
    <lineItems>
      <lineItem>
  =       <itemId>1</itemId>
  =       <name>vase</name>
  =       <description>Cannes logo 5KP3u95bQpv = </description>
        = <quantity>18</quantity>
      =   <unitPrice>45.00</unitPrice>
  =     </lineItem>
    = </lineItems>
    <tax>
      <amount>4.26</amount>
      <name>level2 tax = name</name>
      = <description>level2 tax</description>
  =   </tax>
    <duty>
      <amount>8.55</amount>
      <name>duty name</name>
      <description>duty = description</description>
    = </duty>
    <shipping>
      <amount>4.26</amount>
      <name>level2 tax = name</name>
      = <description>level2 tax</description>
  =   </shipping>
    = <poNumber>456654</poNumber>
    = <customer>
      = <id>99999456654</id>
    = </customer>
    <billTo>
      = <firstName>Ellen</firstName>
    =   <lastName>Johnson</lastName>
  =     <company>Souveniropolis</company>
      <address>14 Main = Street</address>
      = <city>Pecan Springs</city>
    =   <state>TX</state>
      = <zip>44628</zip>
      = <country>USA</country>
    = </billTo>
    <shipTo>
      = <firstName>China</firstName>
    =   <lastName>Bayles</lastName>
  =     <company>Thyme for Tea</company>
      <address>12 Main = Street</address>
      = <city>Pecan Springs</city>
    =   <state>TX</state>
      = <zip>44628</zip>
      = <country>USA</country>
    = </shipTo>
    = <customerIP>192.168.1.1</customerIP>
  =   <userFields>
      = <userField>
        = <name>MerchantDefinedFieldName1</name>
  =       = <value>MerchantDefinedFieldValue1</value>
 =     </userField>
      = <userField>
        = <name>favorite_color</name>
    =     <value>blue</value>
  =     </userField>
    = </userFields>
  </transactionRequest>
</createTransactionRequest>[/text]


[text]response=3D[tcpconnect host=3Dapitest.authorize.net&port=3D443&ssl=3DT][!]
[/!][tcpsend]POST /xml/v1/request.api = HTTP/1.0[UnURL]%0D%0A[/UnURL][!]
[/!]Host: apitest.authorize.net:443[UnURL]%0D%0A[/UnURL][!]
[/!]User-Agent: StoreBuilder[UnURL]%0D%0A[/UnURL][!]
[/!]Content-type: = application/x-www-form-urlencoded[UnURL]%0D%0A[/UnURL][!]
[/!]Content-length: = [CountChars][content][/CountChars][UnURL]%0D%0A[/UnURL][!]
[/!][content][UnURL]%0D%0A[/UnURL][!]
[/!][/TCPSend][/tcpconnect][/text]

[response]
++++++++++++++++++++++++++++++++++++++++++++++++++++
Not sure if anyone has an easier way to = parse out the XML data and this is an example or how I do it on a google = GEO TCPConnection.... 

[text]BEFORE=3D[countchars][response][/countchars][/text]

[text]PRE=3D[convertwords = table=3Daddr][response][/convertwords][/text]

[text]AFTER=3D[countchars][PRE][/countchars][/text]

[text]END=3D[FindString = source=3D[PRE]&find=3D</result>][/text]

[text]THEFILE=3D[getchars = start=3D0&end=3D[math][END]+10[/math]][PRE][/getchars][/text]

[text]cords=3D[THEFILE][/text]
[text]STATUS=3D[Middle = StartAfter=3D<status>&EndBefore=3D</status>][cords][/Middl= e][/text]

[text]TYPEPRE=3D[Middle = StartAfter=3D<type>&EndBefore=3D<formatted_address>][cords= ][/Middle][/text]
[Showif = [TYPEPRE]^</type>][text]TYPEPRE=3D[getchars = start=3D0&EndBefore=3D</type>][TYPEPRE][/getchars][/text][/Showi= f]

[text]G_TYPE=3D[getchars = start=3D0&End=3D[math][countchars][TYPEPRE][/countchars]-8[/math]][TYP= EPRE][/getchars][/text]

[Showif = [STATUS]=3Dok]

[text]components=3D[Middle = StartAfter=3D</formatted_address>&EndBefore=3D<geometry>][= cords][/Middle][/text]
[text]componentsEND=3D[countchars][components][/countchars][/te= xt]

[text]Test1=3D[FindString = source=3D[components]&find=3D<address_component>][/text]

[text]test2=3D[FindString source=3D[getchars = start=3D[math][Test1]+22[/math]&end=3D][components][/getchars]&fin= d=3D<address_component>][/text]

[text]test3=3D[FindString source=3D[getchars = start=3D[math][Test1]+22+[Test2]+22[/math]&end=3D][components][/getcha= rs]&find=3D<address_component>][/text]



--
Brian Harrington
Auto = Glass Xpress
2655 Millersport Hwy. Suite = 1063
Getzville, NY 14068
(716) = 861-2029
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55= Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55= Bug Reporting: support@webdna.us


--
Brian = Harrington
Auto Glass Xpress
2655 Millersport Hwy. Suite 1063
Getzville, NY 14068
(716) = 861-2029
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us --Apple-Mail=_17DA2D90-DB9A-4E2D-8E9E-E6C9DC304E49-- . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Authorize working connection... (Stuart Tremain 2020)
  2. Re: [WebDNA] Authorize working connection... (Diane Blackmore 2020)
  3. Re: [WebDNA] Authorize working connection... (Stuart Tremain 2020)
  4. Re: [WebDNA] Authorize working connection... (christophe.billiottet@webdna.us 2020)
  5. Re: [WebDNA] Authorize working connection... (Diane Blackmore 2020)
  6. Re: [WebDNA] Authorize working connection... (Stuart Tremain 2020)
  7. Re: [WebDNA] Authorize working connection... (Diane Blackmore 2020)
  8. Re: [WebDNA] Authorize working connection... (Stuart Tremain 2020)
  9. Re: [WebDNA] Authorize working connection... (Diane Blackmore 2020)
  10. Re: [WebDNA] Authorize working connection... (Brian Harrington 2020)
  11. Re: [WebDNA] Authorize working connection... (Stuart Tremain 2020)
  12. Re: [WebDNA] Authorize working connection... (Brian Harrington 2020)
  13. Re: [WebDNA] Authorize working connection... (Brian Harrington 2019)
  14. Re: [WebDNA] Authorize working connection... (Stuart Tremain 2019)
  15. Re: [WebDNA] Authorize working connection... (Stuart Tremain 2019)
  16. Re: [WebDNA] Authorize working connection... (Brian Harrington 2019)
  17. Re: [WebDNA] Authorize working connection... (Brian Harrington 2019)
  18. Re: [WebDNA] Authorize working connection... (christophe.billiottet@webdna.us 2019)
  19. [WebDNA] Authorize working connection... (Brian Harrington 2019)
2617 --Apple-Mail=_17DA2D90-DB9A-4E2D-8E9E-E6C9DC304E49 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 [xmlparse var=3Dxml_var1]  USERID UID-12345   INVOICENUMBER INV10023  [/xmlparse] [xmlnodes ref=3Dxml_var1][!] [/!][xmlnodes][!] [/!][text][xmlnodes][!] [/!][showif [name]=3Dname][GetChars = start=3D1&trim=3Dboth][value][/GetChars]=3D[/showif][showif = [name]=3Dvalue][GetChars = start=3D1&trim=3Dboth][value][/GetChars][/showif][!] [/!][/xmlnodes][/TEXT][!] [/!][/xmlnodes][!] [/!][/xmlnodes] USERID =3D [USERID]
INVOICENUMBER =3D [INVOICENUMBER] Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@plsoftware.com.au > On 1 Jan 2020, at 21:56, talk@webdna.us wrote: >=20 > XML Parse worked good until I have duplicate... any suggestion...? > > > USERID > USERID Value1 > > > INVOICENUMBER > INV10023 > > >=20 > On Tue, Dec 31, 2019 at 10:02 AM > wrote: > If you don=E2=80=99t want to run into problems with Middle & GetChars = that could be thrown out by a change in an xml response or if you simply = want something portable you should use the native WebDNA XML processor = that was specifically created for exactly the operation you have = enquired. >=20 > http://webdna.us/page.dna?numero=3D283 = >=20 >=20 > Kind regards >=20 > Stuart Tremain > Pharoah Lane Software > AUSTRALIA > webdna@plsoftware.com.au >=20 >=20 >=20 >=20 >=20 >=20 >=20 >> On 30 Dec 2019, at 23:48, talk@webdna.us = wrote: >>=20 >> Didn't get much help for the Talk List put this works and maybe they = can add it to their website for others.... searching the webDNA website = I could not find anything recent (like 20 years ago)... hard to believe = with Webcatalog and eCommerce they never got it quite together... >> Note: "" needs to be changed to get "successful" transactions = after you run it... >>=20 >> ++++++++++++++++++++++++++++++++++++ <> >> [text]content=3D >> >> >> [ YOUR API LOGIN P3u95bQpv] >> [ YOUR TRANSACTION KEY = HZ32z3fP4hTG2] >> >> 123444856 >> >> authCaptureTransaction >> 5 >> >> >> 5424000000000015 >> 2020-12 >> 999 >> >> >> >> INV-12345448 >> Product Description >> >> >> >> 1 >> vase >> Cannes logo 5KP3u95bQpv >> 18 >> 45.00 >> >> >> >> 4.26 >> level2 tax name >> level2 tax >> >> >> 8.55 >> duty name >> duty description >> >> >> 4.26 >> level2 tax name >> level2 tax >> >> 456654 >> >> 99999456654 >> >> >> Ellen >> Johnson >> Souveniropolis >>
14 Main Street
>> Pecan Springs >> TX >> 44628 >> USA >>
>> >> China >> Bayles >> Thyme for Tea >>
12 Main Street
>> Pecan Springs >> TX >> 44628 >> USA >>
>> 192.168.1.1 >> >> >> MerchantDefinedFieldName1 >> MerchantDefinedFieldValue1 >> >> >> favorite_color >> blue >> >> >>
>>
[/text] >>=20 >>=20 >> [text]response=3D[tcpconnect host=3Dapitest.authorize.net = &port=3D443&ssl=3DT][!] >> [/!][tcpsend]POST /xml/v1/request.api = HTTP/1.0[unurl]%0D%0A[/UnURL][!] >> [/!]Host: apitest.authorize.net:443 = [unurl]%0D%0A[/UnURL][!] >> [/!]User-Agent: StoreBuilder[unurl]%0D%0A[/UnURL][!] >> [/!]Content-type: = application/x-www-form-urlencoded[unurl]%0D%0A[/UnURL][!] >> [/!]Content-length: = [countchars][content][/CountChars][unurl]%0D%0A[/UnURL][!] >> [/!][content][unurl]%0D%0A[/UnURL][!] >> [/!][/TCPSend][/tcpconnect][/text] >>=20 >> [response] >> ++++++++++++++++++++++++++++++++++++++++++++++++++++ >> Not sure if anyone has an easier way to parse out the XML data and = this is an example or how I do it on a google GEO TCPConnection....=20 >>=20 >> [text]BEFORE=3D[countchars][response][/countchars][/text] >>=20 >> [text]PRE=3D[convertwords table=3Daddr][response][/convertwords][/text]= >>=20 >> [text]AFTER=3D[countchars][PRE][/countchars][/text] >>=20 >> [text]END=3D[FindString source=3D[PRE]&find=3D][/text] >>=20 >> [text]THEFILE=3D[getchars = start=3D0&end=3D[math][END]+10[/math]][PRE][/getchars][/text] >>=20 >> [text]cords=3D[THEFILE][/text] >>=20 >> [text]STATUS=3D[Middle = StartAfter=3D&EndBefore=3D][cords][/Middle][/text] >>=20 >> [text]TYPEPRE=3D[Middle = StartAfter=3D&EndBefore=3D][cords][/Middle][/text= ] >> [Showif [TYPEPRE]^][text]TYPEPRE=3D[getchars = start=3D0&EndBefore=3D][TYPEPRE][/getchars][/text][/Showif] >>=20 >> [text]G_TYPE=3D[getchars = start=3D0&End=3D[math][countchars][TYPEPRE][/countchars]-8[/math]][TYPEPRE= ][/getchars][/text] >>=20 >> [Showif [STATUS]=3Dok] >>=20 >> [text]components=3D[Middle = StartAfter=3D&EndBefore=3D][cords][/Middle][= /text] >> [text]componentsEND=3D[countchars][components][/countchars][/text] >>=20 >> [text]Test1=3D[FindString = source=3D[components]&find=3D][/text] >>=20 >> [text]test2=3D[FindString source=3D[getchars = start=3D[math][Test1]+22[/math]&end=3D][components][/getchars]&find=3D][/text] >>=20 >> [text]test3=3D[FindString source=3D[getchars = start=3D[math][Test1]+22+[Test2]+22[/math]&end=3D][components][/getchars]&= find=3D][/text] >>=20 >>=20 >>=20 >> --=20 >> Brian Harrington >> Auto Glass Xpress >> 2655 Millersport Hwy. Suite 1063 >> Getzville, NY 14068 >> (716) 861-2029 >> www.Auto-Glass-Xpress.com = ---------------------------------------= ------------------ This message is sent to you because you are = subscribed to the mailing list talk@webdna.us To = unsubscribe, E-mail to: talk-leave@webdna.us = archives: = http://www.webdna.us/page.dna?numero=3D55 = Bug Reporting: = support@webdna.us > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list = talk@webdna.us To unsubscribe, E-mail to: = talk-leave@webdna.us archives: = http://www.webdna.us/page.dna?numero=3D55 = Bug Reporting: = support@webdna.us >=20 > --=20 > Brian Harrington > Auto Glass Xpress > 2655 Millersport Hwy. Suite 1063 > Getzville, NY 14068 > (716) 861-2029 > www.Auto-Glass-Xpress.com = ---------------------------------------= ------------------ This message is sent to you because you are = subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: = talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 = Bug Reporting: support@webdna.us --Apple-Mail=_17DA2D90-DB9A-4E2D-8E9E-E6C9DC304E49 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
[xmlparse var=3Dxml_var1]
<userFields>
= <userField>
= <name>USERID</name>
= <value>UID-12345</value>
= </userField>
= <userField>
= <name>INVOICENUMBER</name>
= <value>INV10023</value>
= </userField>
</userFields>
[/xmlparse]

[xmlnodes = ref=3Dxml_var1][!]
= [/!][showif [name]=3Dname][GetChars = start=3D1&trim=3Dboth][value][/GetChars]=3D[/showif][showif = [name]=3Dvalue][GetChars = start=3D1&trim=3Dboth][value][/GetChars][/showif][!]
= [/!][/xmlnodes][/TEXT][!]
= [/!][/xmlnodes][!]
[/!][/xmlnodes]

USERID =3D = [USERID]<br>
INVOICENUMBER =3D = [INVOICENUMBER]






Kind regards

Stuart Tremain
Pharoah Lane Software
AUSTRALIA







On 1 Jan 2020, at 21:56, talk@webdna.us wrote:

XML Parse worked good until I have duplicate... any = suggestion...?
<userFields>
  =     <userField>
      =   <name>USERID</name>
    =     <value> USERID Value1</value>
      </userField>
  =     <userField>
      =   <name>INVOICENUMBER</name>
  =       <value>INV10023</value>
      </userField>
  =   </userFields>

On Tue, Dec = 31, 2019 at 10:02 AM <talk@webdna.us> wrote:
If you don=E2=80=99t want to run into problems = with Middle & GetChars that could be thrown out by a change in an = xml response or if you simply want something portable you should use the = native WebDNA XML processor that was specifically created for exactly = the operation you have enquired.



Kind regards

Stuart Tremain
Pharoah Lane Software
AUSTRALIA







On 30 Dec 2019, at 23:48, talk@webdna.us wrote:

Didn't get much = help for the Talk List put this works and maybe they can add it to their = website for others.... searching the webDNA website I could not find = anything recent (like 20 years ago)... hard to believe with Webcatalog = and eCommerce they never got it quite together...
Note: = "<refId>" needs to be changed to get "successful" transactions = after you run it...

[text]content=3D
<createTransactionRequest = xmlns=3D"AnetApi/xml/v1/schema/AnetApiSchema.xsd">
 = <merchantAuthentication>
    = <name>[  YOUR API LOGIN P3u95bQpv]</name>
    <transactionKey>[ YOUR TRANSACTION KEY = HZ32z3fP4hTG2]</transactionKey>
  = </merchantAuthentication>
  = <refId>123444856</refId>
  = <transactionRequest>
    = <transactionType>authCaptureTransaction</transactionType>
    <amount>5</amount>
    <payment>
    =   <creditCard>
        = <cardNumber>5424000000000015</cardNumber>
 =       = <expirationDate>2020-12</expirationDate>
  =       <cardCode>999</cardCode>
      </creditCard>
  =   </payment>
    <order>
    =  <invoiceNumber>INV-12345448</invoiceNumber>
     <description>Product = Description</description>
    = </order>
    <lineItems>
      <lineItem>
  =       <itemId>1</itemId>
  =       <name>vase</name>
  =       <description>Cannes logo 5KP3u95bQpv = </description>
        = <quantity>18</quantity>
      =   <unitPrice>45.00</unitPrice>
  =     </lineItem>
    = </lineItems>
    <tax>
      <amount>4.26</amount>
      <name>level2 tax = name</name>
      = <description>level2 tax</description>
  =   </tax>
    <duty>
      <amount>8.55</amount>
      <name>duty name</name>
      <description>duty = description</description>
    = </duty>
    <shipping>
      <amount>4.26</amount>
      <name>level2 tax = name</name>
      = <description>level2 tax</description>
  =   </shipping>
    = <poNumber>456654</poNumber>
    = <customer>
      = <id>99999456654</id>
    = </customer>
    <billTo>
      = <firstName>Ellen</firstName>
    =   <lastName>Johnson</lastName>
  =     <company>Souveniropolis</company>
      <address>14 Main = Street</address>
      = <city>Pecan Springs</city>
    =   <state>TX</state>
      = <zip>44628</zip>
      = <country>USA</country>
    = </billTo>
    <shipTo>
      = <firstName>China</firstName>
    =   <lastName>Bayles</lastName>
  =     <company>Thyme for Tea</company>
      <address>12 Main = Street</address>
      = <city>Pecan Springs</city>
    =   <state>TX</state>
      = <zip>44628</zip>
      = <country>USA</country>
    = </shipTo>
    = <customerIP>192.168.1.1</customerIP>
  =   <userFields>
      = <userField>
        = <name>MerchantDefinedFieldName1</name>
  =       = <value>MerchantDefinedFieldValue1</value>
 =     </userField>
      = <userField>
        = <name>favorite_color</name>
    =     <value>blue</value>
  =     </userField>
    = </userFields>
  </transactionRequest>
</createTransactionRequest>[/text]


[text]response=3D[tcpconnect host=3Dapitest.authorize.net&port=3D443&ssl=3DT][!]
[/!][tcpsend]POST /xml/v1/request.api = HTTP/1.0[unurl]%0D%0A[/UnURL][!]
[/!]Host: apitest.authorize.net:443[unurl]%0D%0A[/UnURL][!]
[/!]User-Agent: StoreBuilder[unurl]%0D%0A[/UnURL][!]
[/!]Content-type: = application/x-www-form-urlencoded[unurl]%0D%0A[/UnURL][!]
[/!]Content-length: = [countchars][content][/CountChars][unurl]%0D%0A[/UnURL][!]
[/!][content][unurl]%0D%0A[/UnURL][!]
[/!][/TCPSend][/tcpconnect][/text]

[response]
++++++++++++++++++++++++++++++++++++++++++++++++++++
Not sure if anyone has an easier way to = parse out the XML data and this is an example or how I do it on a google = GEO TCPConnection.... 

[text]BEFORE=3D[countchars][response][/countchars][/text]

[text]PRE=3D[convertwords = table=3Daddr][response][/convertwords][/text]

[text]AFTER=3D[countchars][PRE][/countchars][/text]

[text]END=3D[FindString = source=3D[PRE]&find=3D</result>][/text]

[text]THEFILE=3D[getchars = start=3D0&end=3D[math][END]+10[/math]][PRE][/getchars][/text]

[text]cords=3D[THEFILE][/text]
[text]STATUS=3D[Middle = StartAfter=3D<status>&EndBefore=3D</status>][cords][/Middl= e][/text]

[text]TYPEPRE=3D[Middle = StartAfter=3D<type>&EndBefore=3D<formatted_address>][cords= ][/Middle][/text]
[Showif = [TYPEPRE]^</type>][text]TYPEPRE=3D[getchars = start=3D0&EndBefore=3D</type>][TYPEPRE][/getchars][/text][/Showi= f]

[text]G_TYPE=3D[getchars = start=3D0&End=3D[math][countchars][TYPEPRE][/countchars]-8[/math]][TYP= EPRE][/getchars][/text]

[Showif = [STATUS]=3Dok]

[text]components=3D[Middle = StartAfter=3D</formatted_address>&EndBefore=3D<geometry>][= cords][/Middle][/text]
[text]componentsEND=3D[countchars][components][/countchars][/te= xt]

[text]Test1=3D[FindString = source=3D[components]&find=3D<address_component>][/text]

[text]test2=3D[FindString source=3D[getchars = start=3D[math][Test1]+22[/math]&end=3D][components][/getchars]&fin= d=3D<address_component>][/text]

[text]test3=3D[FindString source=3D[getchars = start=3D[math][Test1]+22+[Test2]+22[/math]&end=3D][components][/getcha= rs]&find=3D<address_component>][/text]



--
Brian Harrington
Auto = Glass Xpress
2655 Millersport Hwy. Suite = 1063
Getzville, NY 14068
(716) = 861-2029
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55= Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55= Bug Reporting: support@webdna.us


--
Brian = Harrington
Auto Glass Xpress
2655 Millersport Hwy. Suite 1063
Getzville, NY 14068
(716) = 861-2029
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us --Apple-Mail=_17DA2D90-DB9A-4E2D-8E9E-E6C9DC304E49-- . Stuart Tremain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[WebDNA] Nginx (2010) GuestBook example (1997) Showing Results Alphabetically in Columns (top to bottom) (2002) WCf2 and nested tags (1997) RAM variables (1997) showif and cart (1998) Errant Email. (1998) [OT] BBedit Blank Line removal (2003) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) WebCatalog2 Feature Feedback (1996) add line item context and showitems (1998) Partner Edition question ... (2003) WebCat2 Append problem (B14Macacgi) (1997) Users.db (1998) Relay link (2002) send mail problem? (1997) search for non-unique question (2001) [WebDNA] Search question (2013) PCS search results page (1998) WebCat2b13MacPlugIn - [showif][search][/showif] (1997)