Today I was really overwhelmed by an issue.
I was trying to send a subscription receipt to a server to make a receipt validation with Apple servers. The web service requires to send some parameters included the receipt encode into base64 string in a POST body.
After a lot of trials we've found the problem, it seems that the encoded receipt in base 64 contains characters that are encoded again by the HTTP request serializer in URL encoding.
For what I understood the behavior of the the web service was just to pack my receipt in a JSON with a password and send it to the Apple server.
The only answer we were able to receive from Apple was 21002 status.
I've read a lot of questions on stack (here, here, here about that issue and one gave me solution, on server side just replace " " with "+".
Now it works, but I'm not feeling comfortable using that, is there a way to say AFnetworking to do not url encode some parameters? Or to rencoding in the right way?
App Store receipt and base 64 encoding and AFNetworking
809 Views Asked by Andrea At
1
There are 1 best solutions below
Related Questions in IOS
- Overlapping UICollectionView in storyboard
- Cannot pod spec lint because of undeclared type errors
- Is the transactionReceipt data present in dataWithContentsOfURL?
- UIWebView Screen Fitting Issue
- ZXingObjC encoding issues
- iOS: None of the valid provisioning profiles allowed the specific entitlements
- How to hide "Now playing url" in control center
- CloudKit: Preventing Duplicate Records
- Slow performance on ipad erasing image
- Swift code with multiple NSDateFormatter - optimization
- iOS 8.3 Safari crashes on input type=file
- TTTTimeIntervalFormatter always returns strings in English
- How do I add multiple in app purchases in Swift Spritekit?
- Setup code for xibs in iOS. -awakFromNb:
- iOS Voice Over only reads out the title of any alert views
Related Questions in IN-APP-PURCHASE
- Is the transactionReceipt data present in dataWithContentsOfURL?
- How do I add multiple in app purchases in Swift Spritekit?
- Getting this message in my console in xcode "Ignoring restoreCompletedTransactionsWithApplicationUsername: because already restoring transactions"?
- implementing in app purchase on android
- Why do the purchases restore when I didn't buy any in app purchases?
- In app purchasing asks to login on viewDidLoad and pauses the whole app
- SKProduct keeps returning nil. SKPayment Transaction is not working
- Apple In app purchase receipt in wrong format
- Buy premium services in web, store purchases in CloudKit, avoid pay 30%
- UIButton error with SKPayment
- SpriteKit Game - SKScene Freezes during In-App Purchase in iOS 8.3
- Get product's Reference Name for iOS In-App-Purchase product from within App
- In App Purchases with multiple products
- Can there be multiple entry points for showing 1 In-App Purchase for iTunes?
- How app is noticed turning off a auto-renewing subscriptions from Settings > iTunes & App Store menu?
Related Questions in AFNETWORKING-2
- AFNetworking JSON RESTful Service parameters
- JSON to NSMutableArray iOS
- AFNetworking GET Parameters in body
- remote data fetching inside model object in objective c using AFNetworking
- How to call a function in Microsoft Dynamics NAV to retrieve XML using AFNetworking2
- NSOperationQueue NSOperation USER_INITIATED crash
- dataTaskWithRequest returning empty responseObject on 200s (ios 8.3 builds on ios 9 only)
- AFNetworking sending URL as post parameter
- How to upload Big file(video) using AFNetworking while application is in Background mode?
- AFNetworking downloadTaskWithRequest:progress:destination:completionHandler: not writing file to the path
- AFNetworking JSON post using Objective C returns unsupported media type
- AFNetworking POST request with array of JSON objects
- Synchronous calls in an asynchronous environment
- AFNetworking + HTTPS (Identity not verified)
- Wifi unavailable during Network request
Related Questions in SUBSCRIPTIONS
- SSRS Subscription: newly defined fails, old one works
- Subscribe to event eventhandler delegate from method without parameters
- Knockout subscription insight: detecting if disposed
- Woocommerce Subscriptions How to Remove Checkout Information
- Manage non-renewable / renewable subscriptions
- Android/RxJava, prevent multiple subscriptions of the same kind
- WooCommerce Subscriptions missing "Completed" status
- App Store receipt and base 64 encoding and AFNetworking
- Can't register subscriptions; CKError 0x19030580, "Service Unavailable"
- WooCommerce: "A subscription has been removed from your cart. Multiple subscriptions can not be purchased at the same time."
- Stripe Subscriptions - Create even if first billing attempt fails
- Instagram Subscription API always creates just 1 subscription and overwrites the other
- iOS: CKFetchNotificationChangesOperation results incomplete
- Delete subscription in observer
- The monthly purchase system as like "The Daily"
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
with AFNetworking 2.5.4 I managed to send the receipt correctly by setting the content-type of the request serializer.