Seung Hyun Sean Lee
Seung Hyun Sean Lee

Reputation: 133

In-App Purchase Server Model, transaction related

I am trying to build an In-App Purchase Server Model. There isnt much helpful sample code for that. So I am trying to write my own. Here's my questions

  1. After the purchase is completed, my app retrieves 'completed transaction' from app store

    • (void) completeTransaction:(SKPaymentTransaction *)transaction Then my job is to send this to my server. Here, should I send the transaction object itself? or transaction.transactionReceipt string? Also how should I send it to my server? ex/ HTTP POST request?? maybe sample code would be helpful
  2. Also I read that I should encode with base64 when I send data from apple guide book. Is it when I send data from my app to server? or from my server to app store? or both?

please help me out bros~~

Upvotes: 0

Views: 314

Answers (2)

verify this link Here there is an verificationcontroller.h and .m you want to add both these files to your project.

Upvotes: 1

  NSString *jsonObjectString = [self encodeBase64:(uint8_t*)transaction.transactionReceipt.bytes
                                         length:transaction.transactionReceipt.length];

here you want to add base64 for this . And here you want to save the jsonObjectString to your server and you want to provide an sharedsecret here

Upvotes: 0

Related Questions