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

[ovh/order] deprecated API is not letting new project creation - payWithRegisteredPaymentMean returns paymentMean not found #301

Closed
andy108369 opened this issue Sep 9, 2022 · 0 comments

Comments

@andy108369
Copy link

The API call payWithRegisteredPaymentMean is deprecated.

An attempt to create a Public Cloud Project with payWithRegisteredPaymentMean returns paymentMean not found (404).

https://api.us.ovhcloud.com/console/#/me/order/%7BorderId%7D/payWithRegisteredPaymentMean~POST

image

Code

## Variables
variable "project_description" {
  description = "OVH Cloud Project Description"
  default = "Staging"
}


###

data "ovh_order_cart" "cart" {
  ovh_subsidiary = "US"
  description    = "Use the US OVH cart by default"
}

data "ovh_order_cart_product_plan" "cloud" {
  cart_id        = data.ovh_order_cart.cart.id
  #price_capacity = "renew"
  price_capacity = "installation"
  product        = "cloud"
  #plan_code      = "project"
  #plan_code      = "project-eu"
  plan_code      = "credit"
}

resource "ovh_cloud_project" "cloud" {
  ovh_subsidiary = data.ovh_order_cart.cart.ovh_subsidiary
  description    = var.project_description
  #payment_mean   = "default-payment-mean"
  payment_mean   = "fidelity"
  #payment_mean   = "ovh-account"

  plan {
    duration     = data.ovh_order_cart_product_plan.cloud.selected_price.0.duration
    plan_code    = data.ovh_order_cart_product_plan.cloud.plan_code
    pricing_mode = data.ovh_order_cart_product_plan.cloud.selected_price.0.pricing_mode
  }
}

Logs

2022-09-09T10:22:10.183+0200 [INFO]  provider.terraform-provider-ovh_v0.20.0: 2022/09/09 10:22:10 [DEBUG] Will pay order 3456621: timestamp=2022-09-09T10:22:10.183+0200
2022-09-09T10:22:10.184+0200 [INFO]  provider.terraform-provider-ovh_v0.20.0: 2022/09/09 10:22:10 [DEBUG] OVH API Request Details:
---[ REQUEST ]---------------------------------------
POST /1.0/me/order/3456621/payWithRegisteredPaymentMean HTTP/1.1
Host: api.us.ovhcloud.com
User-Agent: Go-http-client/1.1
Content-Length: 54
Accept: application/json
Content-Type: application/json;charset=utf-8
X-Ovh-Timestamp: 1662711729
Accept-Encoding: gzip

{
 "paymentMean": "fidelityAccount",
 "paymentMeanId": null
}
-----------------------------------------------------: timestamp=2022-09-09T10:22:10.184+0200
2022-09-09T10:22:10.772+0200 [INFO]  provider.terraform-provider-ovh_v0.20.0: 2022/09/09 10:22:10 [DEBUG] OVH API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 404 Not Found
Connection: close
Transfer-Encoding: chunked
Access-Control-Allow-Headers: X-Ovh-Timestamp, X-Ovh-Consumer, X-Ovh-Application, X-Ovh-Signature, X-Ovh-Session, Authorization, Content-Type
Access-Control-Allow-Methods: POST
Access-Control-Allow-Origin: *
Cache-Control: no-cache, no-store
Content-Type: application/json; charset=utf-8
Date: Fri, 09 Sep 2022 08:22:10 GMT
Server: nginx
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Iplb-Instance: 28738
X-Xss-Protection: 1; mode=block

23
{
 "message": "paymentMean not found"
}
0


-----------------------------------------------------: timestamp=2022-09-09T10:22:10.771+0200
2022-09-09T10:22:10.782+0200 [ERROR] vertex "ovh_cloud_project.cloud" error: Could not order cloud project: "calling Post /me/order/3456621/payWithRegisteredPaymentMean:\n\t \"Error 404: \\\"paymentMean not found\\\"\""
╷
│ Error: Could not order cloud project: "calling Post /me/order/3456621/payWithRegisteredPaymentMean:\n\t \"Error 404: \\\"paymentMean not found\\\"\""
@yomovh yomovh added Product: Order Status: Coming Soon The feature will hit GA usually in less than 2 months Type: Bug labels Mar 6, 2023
@yomovh yomovh added Status: Released 0.29.0 and removed Status: Coming Soon The feature will hit GA usually in less than 2 months labels Mar 27, 2023
@yomovh yomovh closed this as completed Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants