coronalabs / corona-docs

Corona documentation, source for https://docs.coronalabs.com/
MIT License
21 stars 27 forks source link

Update Needed to Amazon IAP Documentation for Native Builds #70

Open Colin-Morgan opened 4 years ago

Colin-Morgan commented 4 years ago

I just received an email from Amazon that they have updated the syntax for the AndroidManifest.xml related to IAP, and in looking into the issue I noticed that the IAP documentation would need to be updated as well. The old code reads:

<receiver android:name = "com.amazon.device.iap.ResponseReceiver">
    <intent-filter>
        <action android:name = "com.amazon.inapp.purchasing.NOTIFY"
            android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY"/>
    </intent-filter>
</receiver>

Amazon's updated code moves android:permission out of <intent-filter>:

<receiver android:name = "com.amazon.device.iap.ResponseReceiver"
      android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY">
    <intent-filter>
      <action android:name = "com.amazon.inapp.purchasing.NOTIFY" />
    </intent-filter>
  </receiver>
marksolar2d commented 4 years ago

I received this too. Also note...

What do you need to do?

  1. Check permission element: In the AndroidManifest.xml find the element android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY". If the element is in the action element move it to the receiver element as suggested above.
  2. Check if consumable receipt is already fulfilled: If you sell consumables as an in-app benefit in your app, implement checks to make sure you don’t fulfill a previously fulfilled receipt. Check your back-end server to see if the receipt has been fulfilled previously. This is described in our SampleIAPConsumablesApp (in the examples directory in the SDK) and our external documentation.