Try This.
Make sure you have followed the below steps:
Login to the Play Console with your developer account.
Copy the application's public key (a base-64 string). You can find this in the "Services & APIs" section under "Licensing & In-App Billing" and replace in your code.
Make signed apk and upload (not publish) in ALPHA, and add your test account (the one you will use to test purchases) to the "testers" section of your app. Your test account CANNOT BE THE SAME AS THE PUBLISHER ACCOUNT.
Click Settings > Account details, then in the License Testing section, add the Google email addresses for your tester accounts.
Under In-app Products, create your product and make active.
Use your product id in code and make a signed build and Publish in the Alpha channel wait until the status change to "Published".
Test the app in tester account enabled device.
or this. page
https/productforums.google.com/forum/#!topic/play/U3WPa1C9SPw