Skip to content

Commit 960e93b

Browse files
author
Nick Schmidt
committed
Add acknowledge_product_purchase method to Acknowledger
1 parent 8500c32 commit 960e93b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

lib/candy_check/play_store.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
require "candy_check/play_store/product_acknowledgements/acknowledgement"
88
require "candy_check/play_store/product_acknowledgements/response"
99
require "candy_check/play_store/subscription_purchases/subscription_verification"
10+
require "candy_check/play_store/subscription_acknowledgements/acknowledgement"
11+
require "candy_check/play_store/subscription_acknowledgements/response"
1012
require "candy_check/play_store/verification_failure"
1113
require "candy_check/play_store/verifier"
1214
require "candy_check/play_store/acknowledger"

lib/candy_check/play_store/acknowledger.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ def acknowledge_product_purchase(package_name:, product_id:, token:)
1414
)
1515
acknowledger.call!
1616
end
17+
18+
def acknowledge_subscription_purchase(package_name:, subscription_id:, token:)
19+
CandyCheck::PlayStore::SubscriptionAcknowledgments::Acknowledgement.new(
20+
package_name: package_name,
21+
subscription_id: subscription_id,
22+
token: token,
23+
authorization: @authorization,
24+
).call!
25+
end
1726
end
1827
end
1928
end

0 commit comments

Comments
 (0)