c# - PayPal DoReferenceTransaction -
i'm calling process doreferencetransaction (soap) c#. runs fine, data arrived , result in doreferencetransactionresponsetype
has no errors. details doreferencetransactionresponsedetails
ever null.
is anywhere variable enable details response filled? found xml-string in doreferencetransactionresponsedetails.any
why should exclude data xml if in doreferencetransactionresponsedetails
?
what must have transactionid
paypal.
thanks
example of request:
request = new doreferencetransactionreq(); request.doreferencetransactionrequest = new doreferencetransactionrequesttype(); request.doreferencetransactionrequest.version = "98.0"; request.doreferencetransactionrequest.doreferencetransactionrequestdetails = new doreferencetransactionrequestdetailstype(); request.doreferencetransactionrequest.doreferencetransactionrequestdetails.paymentaction = paymentactioncodetype.sale; request.doreferencetransactionrequest.doreferencetransactionrequestdetails.paymenttype = merchantpullpaymentcodetype.any; request.doreferencetransactionrequest.doreferencetransactionrequestdetails.paymentdetails = new paymentdetailstype(); request.doreferencetransactionrequest.doreferencetransactionrequestdetails.paymentdetails.ordertotal = new basicamounttype(); request.doreferencetransactionrequest.doreferencetransactionrequestdetails.paymentdetails.ordertotal.value = "100"; request.doreferencetransactionrequest.doreferencetransactionrequestdetails.paymentdetails.ordertotal.currencyid = currencycodetype.chf; request.doreferencetransactionrequest.doreferencetransactionrequestdetails.referenceid = "xxxx"; doreferencetransactionresponsetype response = service.doreferencetransaction(request);
the transaction successfull processed , can see in page overview on paypal sandbox.
you should getting response values. shouldn't null. example passing on following:
<?xml version="1.0" encoding="utf-8"?> <soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ebay:apis:eblbasecomponents" xmlns:ns2="urn:ebay:api:paypalapi"> <soap-env:header> <ns2:requestercredentials> <ns1:credentials> <ns1:username>%username%</ns1:username> <ns1:password>%password%</ns1:password> <ns1:signature>%signature%</ns1:signature> </ns1:credentials> </ns2:requestercredentials> </soap-env:header> <soap-env:body> <ns2:doreferencetransactionreq> <ns2:doreferencetransactionrequest> <ns1:version>84.0</ns1:version> <ns1:doreferencetransactionrequestdetails> <ns1:referenceid>1a381834jn903220e</ns1:referenceid> <ns1:paymentaction>sale</ns1:paymentaction> <ns1:paymenttype>any</ns1:paymenttype> <ns1:paymentdetails> <ns1:ordertotal currencyid="usd">10.00</ns1:ordertotal> <ns1:paymentaction>sale</ns1:paymentaction> </ns1:paymentdetails> <ns1:ipaddress>10.243.180.150</ns1:ipaddress> </ns1:doreferencetransactionrequestdetails> </ns2:doreferencetransactionrequest> </ns2:doreferencetransactionreq> </soap-env:body> </soap-env:envelope>
and following in api response:
array ( [name] => doreferencetransactionresponse [elements] => array ( [0] => array ( [name] => timestamp [text] => 2013-04-25t13:22:14z ) [1] => array ( [name] => ack [text] => success ) [2] => array ( [name] => correlationid [text] => 748fcba0bc2e7 ) [3] => array ( [name] => version [text] => 84.0 ) [4] => array ( [name] => build [text] => 5650305 ) [5] => array ( [name] => doreferencetransactionresponsedetails [elements] => array ( [0] => array ( [name] => amount [text] => 10.00 ) [1] => array ( [name] => avscode [text] => x ) [2] => array ( [name] => cvv2code [text] => m ) [3] => array ( [name] => transactionid [text] => 2pr97363s20425407 ) ) ) ) )