     ///
     /// - parameter productID: The product ID String for the product to validate.
     /// - parameter sharedSecret: The shared secret when using auto-subscriptions.
+    /// - result handler: Called when the validation has completed. Will return the success state of the validation and an optional dictionary for further receipt validation if successfull.
     public static func validate(forIdentifier productIdentifier: String, sharedSecret: String?, handler: @escaping (Bool, [String: AnyObject]?) -> ()) {
         transactionProductIdentifier = productIdentifier
         

        /// It is still better than not doing any validation at all.
        /// If you will use your own server than just will have to adjust this last bit of code to only send to your server and than connect to
        /// apple production/sandbox for there.
        ///
        /// - parameter forURL: The url to handle the receipt request.
        /// - parameter data: The playload data for the request.
        handleRequest(forURL: RequestURL.appleProduction.rawValue, data: payloadData) { (isSuccess, status, response) in
            guard !isSuccess else {
                print("Receipt validation passed in production mode, unlocking product(s)")

private extension SwiftyReceiptValidator {
    
    /// Check if app bundle ID is matching with receipt bundle ID
    static func isAppBundleIDMatching(withReceipt receipt: AnyObject) -> Bool {
        let receiptBundleID = receipt[SwiftyReceiptValidatorInfoKey.bundle_id.rawValue] as? String ?? "NoReceiptBundleID"
        let appBundleID = Bundle.main.bundleIdentifier ?? "NoAppBundleID"
