Community
 
 
 

CloudPortal Business Manager 2.x

324 seguidores
 
Avatar
Administrator

CPBM BSS API - Payments

Avatar

CPBM BSS API - Payments

Dear everyone

 

I'm trying to create a new payment via the BSS API in CPBM. I followed the tutorial by Tariq Iqbal (Thank you for this nice tutorial!!) and reading the data works well.

 

However, when I try to create a payment, I always receive: [{"message":"User not found","code":400,"args":null}] Even via root, or via account.

 

Trying with root:

POST: /accounts/e64e403b-3341-4220-8fd8-8c8320f889a7/payments.json

DATA: _=1410854194165&apiKey=asdfDerTuasdfQGoTasdfsm3tBcYho1t-adfdjK4VMC2xgsJEKuh-r0xIasdfgfHw3asdfG6adsfjSso1yJkQ&uuid=185a0b85-67fb-4fdd-91af-9283f2e2383c&amount=200&signature=qWmYLztasdf%2BvZj5yjRasdfyXZ4%3D

 

Does the UUID in the post data mean a user uuid?

 

Trying with account:

POST: /account/payments.json

DATA: _=1410854372889&apiKey=anotherapikeyQGoTasdfsm3tBcYho1t-adfdjK4VMC2xgsJEKuh-r0xIasdfgfHw3asdfG6adsfjSso1yJkQ&amount=200&signature=qWmYLztasdf%2BvZj5yjRasdfyXZ4%3D

 

In both cases the log says:

[2014-09-16 10:01:05.272] INFO  catalina-exec-4              com.citrix.cpbm.api.security.APIAuthenticationProcessingFilter    Entering into doFilterInternal()

[2014-09-16 10:01:05.272] INFO  catalina-exec-4              com.citrix.cpbm.api.filters.ApiValidationHelper                   Entering into validateRequest()

[2014-09-16 10:01:05.576] INFO  catalina-exec-4              com.citrix.cpbm.api.security.APIAuthenticationProcessingFilter    exiting from doFilterInternal()

 

Is there a bug in the api or do I need to consider something which is not described in the edocs?

We are using the CPBM v2.3.1

 

 

Thanks!


Thomas Martinovic MEMBERS
2 comentários
0
 
 

Comentário oficial

Avatar
Administrator
Avatar

Found the error:

 

Do not send the signature in the post-data

 

Send it with the url:

 

URL:

http:// 10.225.0.61:8080/portal/api/accounts/e64e403b-3341-4220-8fd8-8c8320f889a7/payments.json?signature=ODn9yY%2FTuCUGuj0Bj6jhMNC5LTg%3D

 

Post:

_=1411111660329&amount=500.00&apiKey=<apikKeyhere>

 

 

Got a 201 (Created)

 

 

Thank you for your attention!


Thomas Martinovic MEMBERS
Ações de comentário Permalink

Por favor, entrar para comentar.

 
 

Previous 2 comentários

Avatar
Administrator
Avatar

CPBM BSS API - Payments

Hello,

 

I found my error in my script (a typo mixed with wrong sorting)

 

 

So i am now standing infront of a '401 (Unauthorized)' as root-user and as the tenant-owner.

 

 

Any idea?

 

 

 

 

Thomas


Thomas Martinovic MEMBERS
Ações de comentário Permalink

Top Contributors