Closed XOlegator closed 7 years ago
It meens that your api key don't have permissions for payment methods. You should add permissions, that's all.
This error was gone away, thanks! But I still can't update my payment :-( This data I get from RetailCRM:
Array
(
[id] => 112
[status] => paid
[type] => bank-card
[externalId] => p37
[amount] => 12500
[paidAt] => 2017-07-17 21:41:33
)
This I want to send (by externalId):
Array
(
[externalId] => p37
[amount] => 12500.00
[status] => not-paid
[id] => 112
[type] => bank-card
)
It return error:
(
[statusCode:protected] => 400
[response:protected] => Array
(
[success] =>
[errorMsg] => Errors in the entity format
[errors] => Array
(
[externalId] => This external id is already set for another payment
)
)
)
And what did you not understand? This error means that you used this externalId for payment in some order (this or other)
I try to change status of existed payment by method
ordersPaymentEdit()
, but can't do it (error "Forbidden"). Example code and returned message see there - https://gist.github.com/XOlegator/5dfb60d46a4d487597d313f56cbd2697 Before that I successfully uploaded orders with payments by methodordersUpload()
. Ids in example are proper. If I try to add payment by methodordersPaymentCreate()
to order where was no payments, I have the same error.