Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch google-play-billing-validator@2.1.3 for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/google-play-billing-validator/index.js b/node_modules/google-play-billing-validator/index.js
index ccc86bf..6a149ae 100644
--- a/node_modules/google-play-billing-validator/index.js
+++ b/node_modules/google-play-billing-validator/index.js
@@ -34,7 +34,7 @@ Verifier.prototype.verifySub = function (receipt) {
this.options.body = "";
this.options.json = false;
- let urlPattern = "https://www.googleapis.com/androidpublisher/v3/applications/%s/purchases/subscriptions/%s/tokens/%s";
+ let urlPattern = "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/%s/purchases/subscriptionsv2/tokens/%s";
if ("developerPayload" in receipt) {
urlPattern += ":acknowledge";
this.options.body = {
@@ -43,7 +43,7 @@ Verifier.prototype.verifySub = function (receipt) {
this.options.method = 'post';
this.options.json = true;
}
- let finalUrl = util.format(urlPattern, encodeURIComponent(receipt.packageName), encodeURIComponent(receipt.productId), encodeURIComponent(receipt.purchaseToken));
+ let finalUrl = util.format(urlPattern, encodeURIComponent(receipt.packageName), encodeURIComponent(receipt.purchaseToken));
return this.verify(finalUrl)
};
This issue body was partially generated by patch-package.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
google-play-billing-validator@2.1.3for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.