Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add server ACK for consumable #50

Merged

Conversation

gerard-morera
Copy link
Contributor

@gerard-morera gerard-morera commented Jun 22, 2020

馃搶 References

  • Issue: Fixes Candy Check Issue

馃幆 What is the goal?

Perform server purchases acknowledgement.

Purchases ACK is used to confirm to google play that the purchase flow happened as expected. If the ACK does not happen the purchase is refunded within 4 minutes.

If the ACK is done from the client-side and the validation to the server fails it will make users that have paid not having it's correspondent capabilities active. This candy_check new feature will let acknowledge the purchase after capabilities grant.

馃摑 How is it being implemented?

Following Candy Check patterns and calling to Google API ACK service.

@coveralls
Copy link

coveralls commented Jun 22, 2020

Coverage Status

Coverage increased (+0.2%) to 98.615% when pulling 925e398 on Badiapp:feature/add-server-ack-for-consumable into aa190df on jnbt:master.

@jnbt
Copy link
Owner

jnbt commented Jun 25, 2020

@gerard-morera Looks promising. Can you please also extend the README to describe this feature?

@christophweegen Can you please have a general review of this PR?

Copy link
Collaborator

@christophweegen christophweegen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @gerard-morera,

thanks for contributing. LGTM besides some minor typos.

As @jnbt already pointed out, documenting your feature in the README would be great, otherwise people won't even know it's there :-)

end

def call!
acknowlege!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: please rename to acknowledge!


private

def acknowlege!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: please rename to acknowledge!

let(:authorization) { CandyCheck::PlayStore.authorization(json_key_file) }

describe "#acknowledge_product_purchase" do
it "when acknowlegement succeeds" do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: please rename to acknowledgement

let(:authorization) { CandyCheck::PlayStore.authorization(json_key_file) }

describe "#call!" do
it "when acknowlegement succeeds" do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: please rename to acknowledgement

@gerard-morera gerard-morera force-pushed the feature/add-server-ack-for-consumable branch from 323b4e6 to e2ec45b Compare June 29, 2020 15:55
@gerard-morera
Copy link
Contributor Author

gerard-morera commented Jun 29, 2020

@christophweegen and @jnbt thanks for your reviews. Renamed the typo and added the Readme.

FYI; this code has already been working one week in production in my company.

@jnbt
Copy link
Owner

jnbt commented Jun 30, 2020

@christophweegen Please have a second look. If you're fine with it. Please merge and release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants