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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stripeinitialization.ps1 #53

Open
xXMrNidaXx opened this issue Jun 1, 2023 · 3 comments
Open

stripeinitialization.ps1 #53

xXMrNidaXx opened this issue Jun 1, 2023 · 3 comments

Comments

@xXMrNidaXx
Copy link

Getting error when applying this:
$monetizationModels = Invoke-WebRequest -Uri $ApimGatewayUrl/billing/monetizationModels -Headers @{"Ocp-Apim-Subscription-Key"=$ApimSubscriptionKey} | ConvertFrom-Json
-or-
$apimProducts = Invoke-WebRequest -Uri $ApimGatewayUrl/billing/products -Headers @{"Ocp-Apim-Subscription-Key"=$ApimSubscriptionKey} | ConvertFrom-Json

Response status code does not indicate success: 301 (Moved Permanently)

@HowardvanRooijen
Copy link
Collaborator

Are you still getting this error with the latest changes?

@enrique-ochoa
Copy link

Getting a similar error when initializing the products in Stripe:

ConvertFrom-Json: C:\GitRepos\azure-api-management-monetization\payment\stripeInitialisation.ps1:91:28
Line |
91 | -d "active=true" | ConvertFrom-Json
| ~~~~~~~~~~~~~~~~
| Conversion from JSON failed with error: Error parsing boolean value. Path '', line 1, position 1.

Has anyone dealt with this error?

@enrique-ochoa
Copy link

Nevermind. I used a wrong stripe key with initialization. After updating it, things worked as expected.

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

No branches or pull requests

3 participants