question

AlienZi avatar image
AlienZi asked

exchange item with redeem coupon

How to avoid using different exchange codes to exchange the same item repeatedly? Is there a solution?

10 |1200

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

Made Wang avatar image
Made Wang answered

Refer to Forbid abuse coupons for user - Playfab Community, as Brendan said, you can write some identification data for players when they use coupons, and then detect them before redeeming them.

1 comment
10 |1200

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

AlienZi avatar image AlienZi commented ·

As Brendan mentioned,how to know the types of coupons or how do I know if a group of coupons are of the same type?

0 Likes 0 ·
AlienZi avatar image
AlienZi answered

As Brendan mentioned,how to know the types of coupons or how do I know if a group of coupons are of the same type?

2 comments
10 |1200

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

Made Wang avatar image Made Wang commented ·

One thing to clarify is that there is no existing api to get the type of coupon, which requires you to create it manually.

For example, first, store the coupon type and the corresponding coupon on the server, such as {"First coupon":["Coupon1","Coupon2"]}.When the player redeems, look up the type corresponding to the passed in coupon in the server, and then check whether this type exists in the player's PlayerData. If it does not exist, call the api to redeem, and write {"coupon type":"coupon"} into PlayerData after the redemption is successful.

0 Likes 0 ·
AlienZi avatar image AlienZi Made Wang commented ·

OK,I see.Thank you for your detailed answer!

0 Likes 0 ·

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.