question

brendan avatar image
brendan asked

Item Coupons

Info
started a topic on Mon, 07 September 2015 at 6:53 AM

Hi everyone!

We want implement a rewarding system using the coupons generated with the coupon generator tool.

We are trying to get an item using a coupon and the API call RedeemCoupon, passing the coupon code and the catalog name where is the item but the item is not added to the user inventory :(

What are making wrong?

Thanks

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

10 Comments
Info said on Mon, 07 September 2015 at 8:04 AM

Finally it works, but always says that the following error "Coupon code not found". I'm using the coupon codes generated by the coupon generator tool...


Info said on Mon, 07 September 2015 at 8:36 AM

Now The API call RedeemCoupon always return the following error: "Coupon code not found" but I'm using a code generated by the coupon generator tool...


Brendan Vanous said on Mon, 07 September 2015 at 11:08 AM

We're looking into an issue with Coupon Generation right now, and we'll update as soon as we have more info.

Brendan


Brendan Vanous said on Tue, 08 September 2015 at 10:00 PM

The issue has been tracked down and a fix is in test now. Once everything checks out, we'll be able to ship it live it in our next deployment window.

Brendan


Brendan Vanous said on Wed, 09 September 2015 at 10:47 PM

Okay, the fix for coupons is now live. Let us know if you're still seeing any issues.

Brendan


Info said on Fri, 11 September 2015 at 2:03 AM

Hi Brendan,

I check it but the problem persists with the same error. I check the code step by step and before call PlayFabHTTP.Post(PlayFabSettings.GetURL()+"/Client/RedeemCoupon", serializedJSON, "X-Authorization", AuthKey, callback); on your function RedeemCoupon the data (CouponCode and CatalogVersion) are correct.

I don't know if is because I don't use the function correctly or beacuse the playfab system of our account not save the coupon codes for the catalog item.

I call the RedeemCoupon function using this function:

 public void UseCoupon(string code, string catalog, PlayFab.PlayFabClientAPI.RedeemCouponCallback onRedeemCouponSuccess, ErrorCallback onRedeemCouponFail)

        {

            RedeemCouponRequest request = new RedeemCouponRequest();



            request.CatalogVersion = catalog;

            request.CouponCode = code;



            PlayFab.PlayFabClientAPI.RedeemCoupon(request, onRedeemCouponSuccess, onRedeemCouponFail);

        }

The callback functions only show a debug with the result of the operation.

Jonathan


Brendan Vanous said on Sun, 13 September 2015 at 2:05 PM

I just tested the flow of getting a coupon code from the Game Manager, then signing a player into my test title and using that coupon with Client/RedeemCoupon, and it was successful, so we need to get a bit more info to debug:

Could you let me know the exact steps you're using to get the coupon code, the Title ID you're using, and the values being passed in for CatalogVersion and CouponCode?

Brendan


Info said on Mon, 14 September 2015 at 1:27 AM

Hi Brendan,

For get the coupon code I go to our Game Manager->Promotions->Coupons. Then I select an item from one of the catalogs, select the number of coupons and then click on "Generate Coupons" button. A csv file with the coupons is downloaded to my computer.

Then in the game a enter the code and call the RedeenCoupon function with the following data:

  • CouponCode: 1wa-zusc-6rg ( I get it from an input textfield)

. Catalog: Test

The title ID of our game is 6AA2

Thanks


Info said on Mon, 14 September 2015 at 1:40 AM

Hi Brendan,

Right now i check it again and it works! :)


Brendan Vanous said on Mon, 14 September 2015 at 1:45 AM

Glad to hear it. If you run into any other problems with this, please do let us know.

Brendan

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.