voltrue2 / in-app-purchase

A Node.js module for in-App-Purchase for iOS, Android, Amazon and Windows.
http://iap.gracenode.org
Other
1.04k stars 286 forks source link

support for Facebook Payment Lite #264

Open MoonCha opened 5 years ago

MoonCha commented 5 years ago

I worked on In App Purchase for Facebook web game, and made an in-house in-app-purchase module to validate Facebook Payments Lite receipt.

I used the module about an year, and it seems work well.

If you're interested in supporting Facebook Payments Lite, I'd like to make a PR.

voltrue2 commented 5 years ago

Hello,

That would be awesome! Let's make it happen. Looking forward to your PR

Cheers!

MoonCha commented 5 years ago

I'm glad you like it! I'll make PR in a few days.

voltrue2 commented 5 years ago

Awesome! I am looking forward to it.

Cheers!

MoonCha commented 5 years ago

I've completed revising in-house facebook module to be used as public module and writing some tests.

However, I'm having difficulty in finding sample receipt for test and its validation token.

I tested with my live product's receipt and token, but I can't show them to public.

I think we can choose two ways to resolve this problem:

  1. mocking validation api call to facebook server
  2. create dummy facebook app and get receipt and token

I'm trying to solve the problem with second method, but it is taking much time than I expected (error in creating dummy app with payments: https://developers.facebook.com/support/bugs/457554184814501).

You can preview the changes in forked repository: https://github.com/MoonCall/in-app-purchase/tree/facebook_payment_lite

If you have any opinions or found something wrong, please notify me.

I'll make PR after the problem is resolved.

MoonCha commented 4 years ago

Finally Facebook resolved the issue above, thus I could put real test data in my commits. I'll make PR soon.