Hi,
I am trying to submit XML values via a form using jQuery. I then need to process the returned XML. I am testing using the following jQuery:
- $(document).ready(function(){
- jQuery('input#process_card').click(function(){
- $.post("https://secure2.epdq.co.uk:11500", $("#testform"), function(data){
- jQuery('.confirm').hide();
- });
- });
- });
and the following HTML form:
- <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" id="testform">
- <input type="hidden" name="CLRCMRC_XML" value='<EngineDocList>
- <DocVersion>1.0</DocVersion>
- <EngineDoc>
- <ContentType>OrderFormDoc</ContentType>
- <User>
- <Name>URAdmin</Name>
- <Password>TT2Access</Password>
- <ClientId DataType="S32">49868</ClientId>
- </User>
- <Instructions>
- <Pipeline>Payment</Pipeline>
- </Instructions>
- <OrderFormDoc>
- <Mode>P</Mode>
- <Id>01</Id>
- <Consumer>
- <Email>john@urbanriver.com</Email>
- <BillTo>
- <Location>
- <Address>
- <FirstName>John</FirstName>
- <LastName>Barker</LastName>
- <Street1>113 Borough Road</Street1>
- <Street2></Street2>
- <Street3></Street3>
- <City>Jarrow</City>
- <StateProv>Tyne and Wear</StateProv>
- <PostalCode>NE32</PostalCode>
- <Country>826</Country>
- </Address>
- </Location>
- </BillTo>
- <ShipTo>
- <Location>
- <Address>
- <FirstName>Jane</FirstName>
- <LastName>Smith</LastName>
- <Street1>22 High Street</Street1>
- <Street2></Street2>
- <Street3></Street3>
- <City>Northampton</City>
- <StateProv>Northants</StateProv>
- <PostalCode>NN1 1NN</PostalCode>
- <Country>826</Country>
- </Address>
- </Location>
- </ShipTo>
- <PaymentMech>
- <CreditCard>
- <Type DataType="S32">1</Type>
- <Number>4921819895586270</Number>
- <Expires DataType="ExpirationDate" Locale="826">07/12</Expires>
- <IssueNum></IssueNum>
- <StartDate DataType="StartDate">04/09</StartDate>
- <Cvv2Indicator>1</Cvv2Indicator>
- <Cvv2Val>703</Cvv2Val>
- </CreditCard>
- </PaymentMech>
- </Consumer>
- <Transaction>
- <Type>Auth</Type>
- <CurrentTotals>
- <Totals>
- <Total DataType="Money" Currency="826">1</Total>
- </Totals>
- </CurrentTotals>
- <CardholderPresentCode DataType="S32">7</CardholderPresentCode>
- <PayerSecurityLevel DataType="S32"></PayerSecurityLevel>
- <PayerAuthenticationCode></PayerAuthenticationCode>
- <PayerTxnId></PayerTxnId>
- </Transaction>
- </OrderFormDoc>
- </EngineDoc>
- </EngineDocList>' />
- <input type="button" value="go" name="process_card" id="process_card">
- <input type="reset" value="reset">
- </form>
I am tring to submit the form to the URL https://secure2.epdq.co.uk:11500. It is not working.
Any help is greatly appreciated.
Thanks
-John