Windows Phone Server Side Receipt Validation

0 votes

Hello, we have implemented the code to validate the windows phone IAP receipt on server, however when deploying code we get the following error:

Package can not be used in custom code deployment org.w3c.dom.Node : in source com.shephertz.app42.paas.customcode.sample.SecurityWindowsPhone

Here's the code: http://codepad.org/aBIMTr0D

I understand that I can't use some libraries in Custom Code, but can you please help us choose other libraries that would work for that task?
asked Apr 6, 2015 in App42 Cloud API-BaaS by chetruscavladislav (10 points)

1 Answer

0 votes

Hello Vlad,

You can use JSON parser (org.json package) if your response is available as JSON instead of XML. Custom code currently does not have these packages in white list libraries.  However if it is a blocker for you, just write to us at support@shephertz.com to white list request for these libraries.

Let me know if it makes sense.

Himanshu Sharma

 

answered Apr 6, 2015 by hs00105 (2,005 points)
Thank you. I have contacted the support and asked to grant support for these libraries.
Hello Vlad,

We have given the access to accept those libraries in custom code. You just need to update the below line of code:

From:

Document doc = dbf.newDocumentBuilder().parse(new FileInputStream(signedData));

To:

Document doc = dbf.newDocumentBuilder().parse(signedData);

Kindly make the above changes and deploy your custom code.

Let us know if it helps.

Himanshu Sharma
Thank you so much! It's working awesome.
Great to hear that your query has been resolved. Let us know if you need further assistance regarding this. Also we will closing your support ticket, if your query has been completely resolved.

Thanks,
Himanshu Sharma
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...