A Java library to validate Apple Receipts Based on work done in gdx-pay. Intended to be simple to modify and use.
/** Your end use might look something like this */
public class FooApplePaymentController {
/** Use sandbox, no password, and logging */
private static final AppleReceiptValidator validator = new AppleReceiptValidator(true, null, true);
public FooApplePaymentController(){
}
/** Receiving a subscription update from Apple */
public void receiveUpdate(){
/** Depends on your framework */
String fooUpdate = getRequestAsJson(...);
if(!validator.isValid(fooUpdate)){
//Error handling here
}
/** Your business logic here */
}
}
TODO (pom.xml & maven)