Re: [WebDNA] Authorize working connection...

This WebDNA talk-list message is from

2020


It keeps the original formatting.
numero = 114986
interpreted = N
texte = 2614 --0000000000004c3ff8059b1f59e3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable XML Parse worked good until I have duplicate... any suggestion...? USERID USERID Value1 INVOICENUMBER INV10023 On Tue, Dec 31, 2019 at 10:02 AM wrote: > If you don=E2=80=99t want to run into problems with Middle & GetChars tha= t 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 wa= s > specifically created for exactly the operation you have enquired. > > http://webdna.us/page.dna?numero=3D283 > > > Kind regards > > Stuart Tremain > Pharoah Lane Software > AUSTRALIA > webdna@plsoftware.com.au > > > > > > > > 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 cou= ld > 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 afte= r > you run it... > > ++++++++++++++++++++++++++++++++++++ > [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] > > > [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 i= s > 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][/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&EndBefore=3D][cords][/Middle][/text] > > [text]TYPEPRE=3D[Middle > StartAfter=3D&EndBefore=3D][cords][/Middle][/tex= t] > [Showif [TYPEPRE]^][text]TYPEPRE=3D[getchars > start=3D0&EndBefore=3D][TYPEPRE][/getchars][/text][/Showif] > > [text]G_TYPE=3D[getchars > start=3D0&End=3D[math][countchars][TYPEPRE][/countchars]-8[/math]][TYPEPR= E][/getchars][/text] > > [Showif [STATUS]=3Dok] > > [text]components=3D[Middle > StartAfter=3D&EndBefore=3D][cords][/Middle]= [/text] > [text]componentsEND=3D[countchars][components][/countchars][/text] > > [text]Test1=3D[FindString > source=3D[components]&find=3D][/text] > > [text]test2=3D[FindString source=3D[getchars > start=3D[math][Test1]+22[/math]&end=3D][components][/getchars]&find=3D][/text] > > [text]test3=3D[FindString source=3D[getchars > start=3D[math][Test1]+22+[Test2]+22[/math]&end=3D][components][/getchars]= &find=3D][/text] > > > > -- > 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.u= s > > > --------------------------------------------------------- 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.u= s --=20 Brian Harrington Auto Glass Xpress 2655 Millersport Hwy. Suite 1063 Getzville, NY 14068 (716) 861-2029 www.Auto-Glass-Xpress.com --0000000000004c3ff8059b1f59e3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
XML Parse worked good until=C2=A0I have duplicate... any s= uggestion...?
<userFields>
=C2=A0 =C2=A0 =C2=A0 <userField&= gt;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <name>USERID</name>
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 <value> USERID Value1</value>
=C2= =A0 =C2=A0 =C2=A0 </userField>
=C2=A0 =C2=A0 =C2=A0 <userField&= gt;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <name>INVOICENUMBER</name>=C2=A0 =C2=A0 =C2=A0 =C2=A0 <value>INV10023</value>
=C2=A0= =C2=A0 =C2=A0 </userField>
=C2=A0 =C2=A0 </userFields>
<= /div>

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 thr= own out by a change in an xml response or if you simply want something port= able you should use the native WebDNA XML processor that was specifically c= reated for exactly the operation you have enquired.



Kind regards
<= div>
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 t= his works and maybe they can add it to their website for others.... searchi= ng 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 to= gether...
Note: "<refId>" needs to be changed to get &q= uot;successful" transactions after you run it...

<= div>++++++++++++++++++++++++++++++++++++
[text]content= =3D
<createTransactionRequest xmlns=3D"AnetApi/xml/v1/schema/Ane= tApiSchema.xsd">
=C2=A0 <merchantAuthentication>
=C2=A0= =C2=A0 <name>[=C2=A0 YOUR API LOGIN P3u95bQpv]</name>
=C2= =A0 =C2=A0 <transactionKey>[ YOUR TRANSACTION KEY HZ32z3fP4hTG2]</= transactionKey>
=C2=A0 </merchantAuthentication>
=C2=A0 <= refId>123444856</refId>
=C2=A0 <transactionRequest>
= =C2=A0 =C2=A0 <transactionType>authCaptureTransaction</transaction= Type>
=C2=A0 =C2=A0 <amount>5</amount>
=C2=A0 =C2=A0 &= lt;payment>
=C2=A0 =C2=A0 =C2=A0 <creditCard>
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 <cardNumber>5424000000000015</cardNumber>
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 <expirationDate>2020-12</expirationDate&g= t;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <cardCode>999</cardCode>
= =C2=A0 =C2=A0 =C2=A0 </creditCard>
=C2=A0 =C2=A0 </payment><= br>=C2=A0 =C2=A0 <order>
=C2=A0 =C2=A0 =C2=A0<invoiceNumber>= INV-12345448</invoiceNumber>
=C2=A0 =C2=A0 =C2=A0<description&g= t;Product Description</description>
=C2=A0 =C2=A0 </order>=C2=A0 =C2=A0 <lineItems>
=C2=A0 =C2=A0 =C2=A0 <lineItem><= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 <itemId>1</itemId>
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 <name>vase</name>
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 <description>Cannes logo 5KP3u95bQpv </description>
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 <quantity>18</quantity>
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 <unitPrice>45.00</unitPrice>
=C2=A0 =C2=A0= =C2=A0 </lineItem>
=C2=A0 =C2=A0 </lineItems>
=C2=A0 =C2= =A0 <tax>
=C2=A0 =C2=A0 =C2=A0 <amount>4.26</amount>=C2=A0 =C2=A0 =C2=A0 <name>level2 tax name</name>
=C2=A0 = =C2=A0 =C2=A0 <description>level2 tax</description>
=C2=A0 = =C2=A0 </tax>
=C2=A0 =C2=A0 <duty>
=C2=A0 =C2=A0 =C2=A0 &= lt;amount>8.55</amount>
=C2=A0 =C2=A0 =C2=A0 <name>duty n= ame</name>
=C2=A0 =C2=A0 =C2=A0 <description>duty descriptio= n</description>
=C2=A0 =C2=A0 </duty>
=C2=A0 =C2=A0 <s= hipping>
=C2=A0 =C2=A0 =C2=A0 <amount>4.26</amount>
= =C2=A0 =C2=A0 =C2=A0 <name>level2 tax name</name>
=C2=A0 =C2= =A0 =C2=A0 <description>level2 tax</description>
=C2=A0 =C2= =A0 </shipping>
=C2=A0 =C2=A0 <poNumber>456654</poNumber&= gt;
=C2=A0 =C2=A0 <customer>
=C2=A0 =C2=A0 =C2=A0 <id>999= 99456654</id>
=C2=A0 =C2=A0 </customer>
=C2=A0 =C2=A0 <= ;billTo>
=C2=A0 =C2=A0 =C2=A0 <firstName>Ellen</firstName>= ;
=C2=A0 =C2=A0 =C2=A0 <lastName>Johnson</lastName>
=C2= =A0 =C2=A0 =C2=A0 <company>Souveniropolis</company>
=C2=A0 = =C2=A0 =C2=A0 <address>14 Main Street</address>
=C2=A0 =C2= =A0 =C2=A0 <city>Pecan Springs</city>
=C2=A0 =C2=A0 =C2=A0 &= lt;state>TX</state>
=C2=A0 =C2=A0 =C2=A0 <zip>44628</z= ip>
=C2=A0 =C2=A0 =C2=A0 <country>USA</country>
=C2=A0= =C2=A0 </billTo>
=C2=A0 =C2=A0 <shipTo>
=C2=A0 =C2=A0 = =C2=A0 <firstName>China</firstName>
=C2=A0 =C2=A0 =C2=A0 <= ;lastName>Bayles</lastName>
=C2=A0 =C2=A0 =C2=A0 <company>= ;Thyme for Tea</company>
=C2=A0 =C2=A0 =C2=A0 <address>12 Ma= in Street</address>
=C2=A0 =C2=A0 =C2=A0 <city>Pecan Springs= </city>
=C2=A0 =C2=A0 =C2=A0 <state>TX</state>
=C2= =A0 =C2=A0 =C2=A0 <zip>44628</zip>
=C2=A0 =C2=A0 =C2=A0 <= country>USA</country>
=C2=A0 =C2=A0 </shipTo>
=C2=A0 = =C2=A0 <customerIP>192.168.1.1</customerIP>
=C2=A0 =C2=A0 &l= t;userFields>
=C2=A0 =C2=A0 =C2=A0 <userField>
=C2=A0 =C2=A0= =C2=A0 =C2=A0 <name>MerchantDefinedFieldName1</name>
=C2=A0= =C2=A0 =C2=A0 =C2=A0 <value>MerchantDefinedFieldValue1</value>=
=C2=A0 =C2=A0 =C2=A0 </userField>
=C2=A0 =C2=A0 =C2=A0 <use= rField>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <name>favorite_color</na= me>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <value>blue</value>
= =C2=A0 =C2=A0 =C2=A0 </userField>
=C2=A0 =C2=A0 </userFields>= ;
=C2=A0 </transactionRequest>
</createTransactionRequest>= ;[/text]


[text]response=3D[tcpconnect host=3Dapitest.authorize.net&port= =3D443&ssl=3DT][!]
[/!][tcpsend]POST /xml/v1/request.api HTTP/1.0[Un= URL]%0D%0A[/UnURL][!]
[/!]Host: apitest.authorize.net:443[UnURL]%0D%0A[/UnURL][!= ]
[/!]User-Agent: StoreBuilder[UnURL]%0D%0A[/UnURL][!]
[/!]Content-ty= pe: application/x-www-form-urlencoded[UnURL]%0D%0A[/UnURL][!]
[/!]Conten= t-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 TCP= Connection....=C2=A0

[text]BEFORE=3D[countchars][r= esponse][/countchars][/text]

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

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

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

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

[text]cords=3D[THEF= ILE][/text]

[text]STATUS=3D[Middle StartAfter=3D<status>&E= ndBefore=3D</status>][cords][/Middle][/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][/tex= t][/Showif]

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

[= Showif [STATUS]=3Dok]

[text]components=3D[Middle StartAfter=3D</f= ormatted_address>&EndBefore=3D<geometry>][cords][/Middle][/tex= t]
[text]componentsEND=3D[countchars][components][/countchars][/text]
[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]&find= =3D<address_component>][/text]

[text]test3=3D[FindString sourc= e=3D[getchars start=3D[math][Test1]+22+[Test2]+22[/math]&end=3D][compon= ents][/getchars]&find=3D<address_component>][/text]



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

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

--
=
Brian Harrington
Auto Glass Xpress
2655 M= illersport Hwy. Suite 1063
Getzville, NY 14068
(716) 86= 1-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 --0000000000004c3ff8059b1f59e3-- . 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)
2614 --0000000000004c3ff8059b1f59e3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable XML Parse worked good until I have duplicate... any suggestion...? USERID USERID Value1 INVOICENUMBER INV10023 On Tue, Dec 31, 2019 at 10:02 AM wrote: > If you don=E2=80=99t want to run into problems with Middle & GetChars tha= t 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 wa= s > specifically created for exactly the operation you have enquired. > > http://webdna.us/page.dna?numero=3D283 > > > Kind regards > > Stuart Tremain > Pharoah Lane Software > AUSTRALIA > webdna@plsoftware.com.au > > > > > > > > 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 cou= ld > 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 afte= r > you run it... > > ++++++++++++++++++++++++++++++++++++ > [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] > > > [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 i= s > 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][/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&EndBefore=3D][cords][/Middle][/text] > > [text]TYPEPRE=3D[Middle > StartAfter=3D&EndBefore=3D][cords][/Middle][/tex= t] > [Showif [TYPEPRE]^][text]TYPEPRE=3D[getchars > start=3D0&EndBefore=3D][TYPEPRE][/getchars][/text][/Showif] > > [text]G_TYPE=3D[getchars > start=3D0&End=3D[math][countchars][TYPEPRE][/countchars]-8[/math]][TYPEPR= E][/getchars][/text] > > [Showif [STATUS]=3Dok] > > [text]components=3D[Middle > StartAfter=3D&EndBefore=3D][cords][/Middle]= [/text] > [text]componentsEND=3D[countchars][components][/countchars][/text] > > [text]Test1=3D[FindString > source=3D[components]&find=3D][/text] > > [text]test2=3D[FindString source=3D[getchars > start=3D[math][Test1]+22[/math]&end=3D][components][/getchars]&find=3D][/text] > > [text]test3=3D[FindString source=3D[getchars > start=3D[math][Test1]+22+[Test2]+22[/math]&end=3D][components][/getchars]= &find=3D][/text] > > > > -- > 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.u= s > > > --------------------------------------------------------- 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.u= s --=20 Brian Harrington Auto Glass Xpress 2655 Millersport Hwy. Suite 1063 Getzville, NY 14068 (716) 861-2029 www.Auto-Glass-Xpress.com --0000000000004c3ff8059b1f59e3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
XML Parse worked good until=C2=A0I have duplicate... any s= uggestion...?
<userFields>
=C2=A0 =C2=A0 =C2=A0 <userField&= gt;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <name>USERID</name>
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 <value> USERID Value1</value>
=C2= =A0 =C2=A0 =C2=A0 </userField>
=C2=A0 =C2=A0 =C2=A0 <userField&= gt;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <name>INVOICENUMBER</name>=C2=A0 =C2=A0 =C2=A0 =C2=A0 <value>INV10023</value>
=C2=A0= =C2=A0 =C2=A0 </userField>
=C2=A0 =C2=A0 </userFields>
<= /div>

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 thr= own out by a change in an xml response or if you simply want something port= able you should use the native WebDNA XML processor that was specifically c= reated for exactly the operation you have enquired.



Kind regards
<= div>
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 t= his works and maybe they can add it to their website for others.... searchi= ng 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 to= gether...
Note: "<refId>" needs to be changed to get &q= uot;successful" transactions after you run it...

<= div>++++++++++++++++++++++++++++++++++++
[text]content= =3D
<createTransactionRequest xmlns=3D"AnetApi/xml/v1/schema/Ane= tApiSchema.xsd">
=C2=A0 <merchantAuthentication>
=C2=A0= =C2=A0 <name>[=C2=A0 YOUR API LOGIN P3u95bQpv]</name>
=C2= =A0 =C2=A0 <transactionKey>[ YOUR TRANSACTION KEY HZ32z3fP4hTG2]</= transactionKey>
=C2=A0 </merchantAuthentication>
=C2=A0 <= refId>123444856</refId>
=C2=A0 <transactionRequest>
= =C2=A0 =C2=A0 <transactionType>authCaptureTransaction</transaction= Type>
=C2=A0 =C2=A0 <amount>5</amount>
=C2=A0 =C2=A0 &= lt;payment>
=C2=A0 =C2=A0 =C2=A0 <creditCard>
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 <cardNumber>5424000000000015</cardNumber>
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 <expirationDate>2020-12</expirationDate&g= t;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <cardCode>999</cardCode>
= =C2=A0 =C2=A0 =C2=A0 </creditCard>
=C2=A0 =C2=A0 </payment><= br>=C2=A0 =C2=A0 <order>
=C2=A0 =C2=A0 =C2=A0<invoiceNumber>= INV-12345448</invoiceNumber>
=C2=A0 =C2=A0 =C2=A0<description&g= t;Product Description</description>
=C2=A0 =C2=A0 </order>=C2=A0 =C2=A0 <lineItems>
=C2=A0 =C2=A0 =C2=A0 <lineItem><= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 <itemId>1</itemId>
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 <name>vase</name>
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 <description>Cannes logo 5KP3u95bQpv </description>
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 <quantity>18</quantity>
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 <unitPrice>45.00</unitPrice>
=C2=A0 =C2=A0= =C2=A0 </lineItem>
=C2=A0 =C2=A0 </lineItems>
=C2=A0 =C2= =A0 <tax>
=C2=A0 =C2=A0 =C2=A0 <amount>4.26</amount>=C2=A0 =C2=A0 =C2=A0 <name>level2 tax name</name>
=C2=A0 = =C2=A0 =C2=A0 <description>level2 tax</description>
=C2=A0 = =C2=A0 </tax>
=C2=A0 =C2=A0 <duty>
=C2=A0 =C2=A0 =C2=A0 &= lt;amount>8.55</amount>
=C2=A0 =C2=A0 =C2=A0 <name>duty n= ame</name>
=C2=A0 =C2=A0 =C2=A0 <description>duty descriptio= n</description>
=C2=A0 =C2=A0 </duty>
=C2=A0 =C2=A0 <s= hipping>
=C2=A0 =C2=A0 =C2=A0 <amount>4.26</amount>
= =C2=A0 =C2=A0 =C2=A0 <name>level2 tax name</name>
=C2=A0 =C2= =A0 =C2=A0 <description>level2 tax</description>
=C2=A0 =C2= =A0 </shipping>
=C2=A0 =C2=A0 <poNumber>456654</poNumber&= gt;
=C2=A0 =C2=A0 <customer>
=C2=A0 =C2=A0 =C2=A0 <id>999= 99456654</id>
=C2=A0 =C2=A0 </customer>
=C2=A0 =C2=A0 <= ;billTo>
=C2=A0 =C2=A0 =C2=A0 <firstName>Ellen</firstName>= ;
=C2=A0 =C2=A0 =C2=A0 <lastName>Johnson</lastName>
=C2= =A0 =C2=A0 =C2=A0 <company>Souveniropolis</company>
=C2=A0 = =C2=A0 =C2=A0 <address>14 Main Street</address>
=C2=A0 =C2= =A0 =C2=A0 <city>Pecan Springs</city>
=C2=A0 =C2=A0 =C2=A0 &= lt;state>TX</state>
=C2=A0 =C2=A0 =C2=A0 <zip>44628</z= ip>
=C2=A0 =C2=A0 =C2=A0 <country>USA</country>
=C2=A0= =C2=A0 </billTo>
=C2=A0 =C2=A0 <shipTo>
=C2=A0 =C2=A0 = =C2=A0 <firstName>China</firstName>
=C2=A0 =C2=A0 =C2=A0 <= ;lastName>Bayles</lastName>
=C2=A0 =C2=A0 =C2=A0 <company>= ;Thyme for Tea</company>
=C2=A0 =C2=A0 =C2=A0 <address>12 Ma= in Street</address>
=C2=A0 =C2=A0 =C2=A0 <city>Pecan Springs= </city>
=C2=A0 =C2=A0 =C2=A0 <state>TX</state>
=C2= =A0 =C2=A0 =C2=A0 <zip>44628</zip>
=C2=A0 =C2=A0 =C2=A0 <= country>USA</country>
=C2=A0 =C2=A0 </shipTo>
=C2=A0 = =C2=A0 <customerIP>192.168.1.1</customerIP>
=C2=A0 =C2=A0 &l= t;userFields>
=C2=A0 =C2=A0 =C2=A0 <userField>
=C2=A0 =C2=A0= =C2=A0 =C2=A0 <name>MerchantDefinedFieldName1</name>
=C2=A0= =C2=A0 =C2=A0 =C2=A0 <value>MerchantDefinedFieldValue1</value>=
=C2=A0 =C2=A0 =C2=A0 </userField>
=C2=A0 =C2=A0 =C2=A0 <use= rField>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <name>favorite_color</na= me>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <value>blue</value>
= =C2=A0 =C2=A0 =C2=A0 </userField>
=C2=A0 =C2=A0 </userFields>= ;
=C2=A0 </transactionRequest>
</createTransactionRequest>= ;[/text]


[text]response=3D[tcpconnect host=3Dapitest.authorize.net&port= =3D443&ssl=3DT][!]
[/!][tcpsend]POST /xml/v1/request.api HTTP/1.0[Un= URL]%0D%0A[/UnURL][!]
[/!]Host: apitest.authorize.net:443[unurl]%0D%0A[/UnURL][!= ]
[/!]User-Agent: StoreBuilder[unurl]%0D%0A[/UnURL][!]
[/!]Content-ty= pe: application/x-www-form-urlencoded[unurl]%0D%0A[/UnURL][!]
[/!]Conten= t-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 TCP= Connection....=C2=A0

[text]BEFORE=3D[countchars][r= esponse][/countchars][/text]

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

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

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

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

[text]cords=3D[THEF= ILE][/text]

[text]STATUS=3D[Middle StartAfter=3D<status>&E= ndBefore=3D</status>][cords][/Middle][/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][/tex= t][/Showif]

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

[= Showif [STATUS]=3Dok]

[text]components=3D[Middle StartAfter=3D</f= ormatted_address>&EndBefore=3D<geometry>][cords][/Middle][/tex= t]
[text]componentsEND=3D[countchars][components][/countchars][/text]
[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]&find= =3D<address_component>][/text]

[text]test3=3D[FindString sourc= e=3D[getchars start=3D[math][Test1]+22+[Test2]+22[/math]&end=3D][compon= ents][/getchars]&find=3D<address_component>][/text]



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

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

--
=
Brian Harrington
Auto Glass Xpress
2655 M= illersport Hwy. Suite 1063
Getzville, NY 14068
(716) 86= 1-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 --0000000000004c3ff8059b1f59e3-- . Brian Harrington

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:

Dubble Sku's in a Database (1999) Formatting ModDate (2000) Email Problem (1997) [WebDNA] New list (2008) Great product and great job ! (1997) Practice runs ? (1997) Adding content advice needed (1998) urls (2005) Re:Help name our technology! (1997) [ShowIf] a either fields are blank (1998) Strange errors in error log (1998) Database Structure? (1998) fieldType=num (1997) creator code (1997) Grant, please help me ... (1997) Error Log.db --however (1997) Email notification to one of multiple vendors ? (1997) carriage returns in data (1997) Images (2000) E-Mail (1998)