File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -202,4 +202,12 @@ public function get(): SubscriptionPurchase
202
202
203
203
return $ this ->googleGetResponse ;
204
204
}
205
+
206
+ /**
207
+ * @throws GuzzleException
208
+ */
209
+ public function cancel (): EmptyResponse
210
+ {
211
+ return $ this ->createSubscription ()->cancel ();
212
+ }
205
213
}
Original file line number Diff line number Diff line change @@ -116,4 +116,18 @@ public function test_it_handles_the_21007_error_from_the_app_store()
116
116
117
117
$ this ->assertTrue ($ response ->getStatus ()->isValid ());
118
118
}
119
+
120
+ /** @test */
121
+ public function cancel_google_subscription (): void
122
+ {
123
+ $ this ->expectNotToPerformAssertions ();
124
+
125
+ $ client = GoogleClientFactory::mock (new Response ());
126
+
127
+ Subscription::googlePlay ($ client )
128
+ ->packageName ('com.twigano.fashion ' )
129
+ ->id ($ this ->itemId )
130
+ ->token ($ this ->token )
131
+ ->cancel ();
132
+ }
119
133
}
You can’t perform that action at this time.
0 commit comments