I try to implement paypal. I'm doing the official tutorial and now I'm stuck on "Create a Payment Resource"
Sample Request is:
curl -v https://api.sandbox.paypal.com/v1/payments/payment \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {accessToken}' \
{
"intent": "sale",
"payer": {
"payment_method": "paypal"
},
"transactions": [{
"amount": {
"total": "21.50",
"currency": "EUR",
"details": {
"subtotal": "15.00",
"tax": "2.00",
"shipping": "2.50",
"handling_fee": "1.00",
"shipping_discount": "-1.00",
"insurance": "2.00"
}
},
"description": "This is the payment transaction description.",
"custom": "This is a hidden value",
"invoice_number": "unique_invoice_number",
"soft_descriptor": "your order description",
"item_list": {
"items": [{
"name": "Item 1",
"description": "add description here",
"quantity": "2",
"price": "10.00",
"sku": "1",
"currency": "EUR"
},
{
"name": "Voucher",
"description": "discount on your order",
"quantity": "1",
"price": "-5.00",
"sku": "vouch1",
"currency": "EUR"
}
]
}
}],
"note_to_payer": "Contact us for any questions on your order.",
"redirect_urls": {
"return_url": "http://example.com/success",
"cancel_url": "http://example.com/cancel"
}
}
I changed the -{accessToken} with my access token:
curl -v https://api.sandbox.paypal.com/v1/payments/payment \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {A21AAHxasde3pBCINcYK6_VkHF2Y2M6dZIGRrvWBHKn1-0A9njg73e3KzrHAL94rVtPOOacMZzyzh-AqSagXEvGT6oY3C4UIsg}' \
{
"intent": "sale",
"payer": {
"payment_method": "paypal"
},
"transactions": [{
"amount": {
"total": "21.50",
"currency": "EUR",
"details": {
"subtotal": "15.00",
"tax": "2.00",
"shipping": "2.50",
"handling_fee": "1.00",
"shipping_discount": "-1.00",
"insurance": "2.00"
}
},
"description": "This is the payment transaction description.",
"custom": "This is a hidden value",
"invoice_number": "unique_invoice_number",
"soft_descriptor": "your order description",
"item_list": {
"items": [{
"name": "Item 1",
"description": "add description here",
"quantity": "2",
"price": "10.00",
"sku": "1",
"currency": "EUR"
},
{
"name": "Voucher",
"description": "discount on your order",
"quantity": "1",
"price": "-5.00",
"sku": "vouch1",
"currency": "EUR"
}
]
}
}],
"note_to_payer": "Contact us for any questions on your order.",
"redirect_urls": {
"return_url": "http://example.com/success",
"cancel_url": "http://example.com/cancel"
}
}
When I run this in console, I get
Trying 173.0.82.78...
* Connected to api.sandbox.paypal.com (173.0.82.78) port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 597 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / RSA_AES_256_CBC_SHA256
* server certificate verification OK
* server certificate status verification SKIPPED
* common name: api.sandbox.paypal.com (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: C=US,ST=California,L=San Jose,O=PayPal\, Inc.,OU=PayPal Production,CN=api.sandbox.paypal.com
* start date: Tue, 21 Aug 2018 00:00:00 GMT
* expire date: Thu, 20 Aug 2020 12:00:00 GMT
* issuer: C=US,O=DigiCert Inc,CN=DigiCert Global CA G2
* compression: NULL
* ALPN, server did not agree to a protocol
> GET /v1/payments/payment HTTP/1.1
> Host: api.sandbox.paypal.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> Authorization:Bearer {A21AAHxasde3pBCINcYK6_VkHF2Y2M6dZIGRrvWBHKn1-0A9njg73e3KzrHAL94rVtPOOacMZzyzh-AqSagXEvGT6oY3C4UIsg}
>
< HTTP/1.1 401 Unauthorized
< Date: Tue, 27 Nov 2018 08:33:03 GMT
< Server: Apache
< paypal-debug-id: 3711056ae62c6
< HTTP_X_PP_AZ_LOCATOR: sandbox.slc
< Paypal-Debug-Id: 3711056ae62c6
< Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D1057095003%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Tue, 27 Nov 2018 09:03:03 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
< Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT
< Vary: Authorization
< Content-Length: 83
< Connection: close
< Content-Type: application/json
<
So, why doesn't it authorize my token? Problem with syntax, or do I miss something completely relevant?
Thanks for your help
Cheers Tim
Try getting rid of the {}'s around your token value. It should just be:
Bearer A21AAHxasde3pBCINcYK6_VkHF2Y2M6dZIGRrvWBHKn1...
Related
We are deploying with Ansible scripts to Openshift 3 using oc apply. When we change template to add more environment variables, we receive a very vague error: "unrecognized type: string" and status code 500.
Setting --loglevel 10 leads to no more details:
$ /usr/local/bin/oc_v3.11.715 apply -f \"/tmp/ansible.YtEqVm_deploy/app.yml.json\" -n test-env --loglevel 10 2&> log.log
(several GET to get secret, deploymentconfigs, etc.)
...
I0127 11:49:05.455217 605 request.go:897] Request Body: {xxxxxxxx}
I0127 11:49:05.455280 605 round_trippers.go:386] curl -k -v -XPATCH -H "User-Agent: oc_v3.11.715/v1.11.0+d4cacc0 (linux/amd64) kubernetes/d4cacc0" -H "Authorization: Bearer xxxxxx" -H "Accept: application/json" -H "Content-Type: application/strategic-merge-patch+json" 'https://test-env:8443/apis/apps.openshift.io/v1/namespaces/test-app/deploymentconfigs/app'
I0127 11:49:05.466278 605 round_trippers.go:405] PATCH https://test-env:8443/apis/apps.openshift.io/v1/namespaces/test-env-app/deploymentconfigs/app 500 Internal Server Error in 10 milliseconds
I0127 11:49:05.466287 605 round_trippers.go:411] Response Headers:
I0127 11:49:05.466291 605 round_trippers.go:414] Content-Length: 118
I0127 11:49:05.466294 605 round_trippers.go:414] Date: Fri, 27 Jan 2023 09:49:05 GMT
I0127 11:49:05.466297 605 round_trippers.go:414] Audit-Id: 1d3f3398-14fc-4bfa-854b-6faf9b105680
I0127 11:49:05.466302 605 round_trippers.go:414] Cache-Control: no-store
I0127 11:49:05.466307 605 round_trippers.go:414] Content-Type: application/json
I0127 11:49:05.466321 605 request.go:897] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"unrecognized type: string","code":500}
I0127 11:49:05.466603 605 helpers.go:201] server response object: [{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "unrecognized type: string",
"code": 500
}]
F0127 11:49:05.466618 605 helpers.go:119] Error from server: unrecognized type: string
The request body is like:
{
"metadata": {
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
},
"spec": {
"template": {
"spec": {
"$setElementOrder/containers": [{
"name": "app"
}],
"containers": [{
"$setElementOrder/env": [{
"name": "OLD_VAR_1"
}, {
"name": "OLD_VAR_2"
}, {
"name": "OLD_VAR_3"
}, {
"name": "OLD_VAR_4"
}, {
"name": "NEW_VAR_1"
}, {
"name": "NEW_VAR_2"
}, {
"name": "NEW_VAR_3"
}],
"dnsPolicy": "ClusterFirst",
"env": [{
"name": "OLD_VAR_4",
"value": false
}, {
"name": "NEW_VAR_1",
"value": 10
}, {
"name": "NEW_VAR_2",
"value": 20
}, {
"name": "NEW_VAR_3",
"value": 6
}],
"name": "app",
"restartPolicy": "Always",
"terminationGracePeriodSeconds": 300
}]
}
}
}
}
OLD_VAR_x are old environment variables; we want to add NEW_VAR_[1-3]. Notice strangely that not all old vars are in env, only OLD_VAR_4, but all new vars are in env.
This also happens when we use oc patch with the same request body. Same error response.
What is wrong?
A workaround is first, deployment, fail, and add new vars in Openshift manually, and deploy in Openshift webconsole on top of the last, failed deployment. It works.
Solved by quoting the var values in the template, like:
- name: NEW_VAR_X
value: "${NEW_VAR_VALUE_X}"
No errors ever since.
I'm trying to send an envelope in DocuSign using REST API. For adding the document to envelopes I'm using multipart/form-data POST method.
I tried sending this request using POSTMAN but I'm getting a below response:
{
"errorCode": "INVALID_CONTENT_TYPE",
"message": "Content Type specified is not supported. Content-Type for part[0] must be application/json or application/xml"
}
This is my POSTMAN request:
POST /restapi/v2/accounts/****/envelopes HTTP/1.1
Host: demo.docusign.net
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Authorization: Bearer *********
Cache-Control: no-cache
Postman-Token: c0b940e1-4b6c-4848-abd1-ed5c9c712cb5
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name=""
{
"status": "sent",
"emailSubject": "Example of one recipient, type signer",
"documents": [{
"documentId": "1",
"name": "contract.pdf",
}],
"recipients": {
"signers": [{
"name": "Lisa Simpson",
"email": "lisa#email.com",
"recipientId": "1",
"routingOrder": "1",
"tabs": {
"signHereTabs": [{
"xPosition": "150",
"yPosition": "200",
"documentId": "1",
"pageNumber": "1"
}],
}
}]
}
}
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="Test.pdf"
Content-Type: application/pdf
------WebKitFormBoundary7MA4YWxkTrZu0gW--
My questions are:
Is there a way in POSTMAN to specify the Content-Type for part[0]?
What should be the key names for part[0] & part[1]?
How to pass documentid in part[1]?
I'm referring: https://docs.docusign.com/esign/restapi/Envelopes/Envelopes/create/#examples
REST API documentation
See below for a proper self-contained working DocuSign envelope using multi-part form vs multipart/form-data -
DocuSign Support Case 04093516 is closed and a Jira ticket was filed for the erroneous mention of form-data in the documentation about sending envelopes via REST API.
Hard returns and spacing are critical. Also, recommend you update email addresses to your test Gmail account, notice the same account with + can be used.
If using Postman make sure you are using "RAW" not form-data, x-www-form-urlencoded or binary. See image below:
Link here as well - https://blog.grigsbyconsultingllc.com/wp-content/uploads/Screenshot-2018-04-18-07.26.26.png
You still need headers, specifically content-type and authentication type aka :
-H 'content-type: multipart/form-data; boundary=AAA' \
-H 'x-docusign-authentication; See Stack Overflow link How should the header X-DocuSign-Authentication be used for REST and SOAP?
--AAA
Content-Type: application/json
Content-Disposition: form-data
{
"emailBlurb": "Test for CEFTAF Lab 2 Custom Fields Recipient Fields Document Fields",
"emailSubject": "Test for Dev 201 Lab 2",
"status": "created",
"notification":{
"useAccountDefaults":"false",
"reminders":{
"reminderEnabled":"true",
"reminderDelay":"2",
"reminderFrequency":"2"
},
"expirations":{
"expireEnabled":"true",
"expireAfter":"15",
"expireWarn":"1"
}
},
"compositeTemplates": [{
"inlineTemplates": [{
"sequence": "1",
"customFields": {
"textCustomFields": [
{
"fieldId": "123",
"name": "MYCustomID",
"show": "false",
"required": "false",
"value": "myId012345"
}
],
"listCustomFields": [
{
"listItems": [
"elementValue1","elementValue2","elementValue3"
],
"fieldId": "1234",
"name": "myArrayListofItems",
"show": "false",
"required": "false",
"value": "3"
}
]
},
"documents": [{
"documentId": "1",
"name": "test1.txt",
"documentFields": [
{
"name": "Test1",
"value": "value for test1"
}
],
},
{
"documentId": "2",
"name": "test2.txt"
},
{
"documentId": "3",
"name": "test3.txt"
}
],
"recipients": {
"carbonCopies": [
{
"email": "dsproservedemosoapui+Testcc#gmail.com",
"name": "David Grigsby (see all document)",
"recipientId": "3",
"routingOrder": "3"
},
{
"email": "dsproservedemosoapui+Testcc1#gmail.com",
"name": "David Grigsby (see all)",
"recipientId": "4",
"routingOrder": "4"
}
],
"signers": [{
"recipientId": "1",
"customFields": [
"Recip 1 ID 1234"
],
"name": "David Grigsby (Sees all)",
"email": "dsproservedemosoapui+Test1#gmail.com",
"routingOrder": "1",
"tabs": {
"signHereTabs": [{
"anchorString": "Sign1",
"tabLabel": "Sign Here 1"
}]
}
},
{
"recipientId": "2",
"name": "David Grigsby (sees all )",
"email": "david.grigsby#yahoo.com",
"routingOrder": "2",
"tabs": {
"signHereTabs": [{
"anchorString": "Sign2",
"tabLabel": "Sign Here 2"
}]
}
}
]
}
}]
}]
}
--AAA
Content-Type: application/txt
Content-Disposition: file; filename="test1.txt"; documentid=1
Test Document 1
Sign1 Here _______________________________ Custom1 Approve:
Sign2 Here _______________________________ Custom2 Approve:
--AAA
Content-Type: application/txt
Content-Disposition: file; filename="test2.txt"; documentid=2
Test Document 2
Sign1 Here _______________________________
--AAA
Content-Type: application/txt
Content-Disposition: file; filename="test3.txt"; documentid=3
Test Document 3
No Tabs for anyone means visbile to all by default unless excluded
--AAA--
And the difference for a PDF is below, recommend using Base64
--AAA
Content-Type: application/pdf
Content-Disposition: file; filename="f4506t.pdf"; documentid=1
Content-Transfer-Encoding: base64
JVBERi0xLjcNJeLjz9MNCjMwMSAwIG9iag08PC9MaW5lYXJpemVkIDEvTCA3NDAzMi9PIDMwMy9F
IDMzNjI2L04gMi9UIDczNjM4L0ggWyA2MzAgMjk2XT4+DWVuZG9iag0gICAgICAgICAgICAgICAg
.... pdf body bulk removed ......
o4IlmH0CxPYUYWBiYGBUB5PVDADOVQiaCmVuZHN0cmVhbQplbmRvYmoKc3RhcnR4cmVmCjg1MDUz
CiUlRU9GCg==
--AAA--
Image of Note from DocuSign Case:
I am trying to use the REST Revalidate Itinerary service provided by Sabre.If you have access to the sabre developer site, you can find the details here:
https://developer.sabre.com/docs/read/rest_apis/air/search/revalidate_itinerary
I am posting to api.sabre.com/v3.3.0/shop/flights/revalidate as instructed, but I am getting a 404 back with the message that "No service exists" at that URL.
Has anyone been able to get this to work, or does anyone know the correct URL?
Updated with the raw response, obtained using Fiddler:
HTTP/1.1 404 Not Found
date: Wed, 21 Feb 2018 17:05:39 GMT
EnvType: production
message-id: EogQto
singularityheader: appId=1448*ctrlguid=1516860998*acctguid=9e6c885b-de5c-4175-ac13-773e8d4b7ab2*ts=1519232739414*btid=16580*guid=5daa09fd-ca10-4c8b-b35c-968a410d211e*exitguid=1|1*unresolvedexitid=49225*tcop=1:2058128*cidfrom=171608*etypeorder=JMS*esubtype=JMS*cidto={[UNRESOLVED][49225]}*tcop=1:2058128
x-provider-instance-id: raf-darhlp010-8080
Content-Type: application/json;charset=UTF-8
Content-Length: 255
Server: Sabre Gateway
{"status":"Complete","reportingSystem":"RAF","timeStamp":"2018-02-21T17:05:39+00:00","type":"Application","errorCode":"WARN.RAF.APPLICATION","instance":"raf-darhlp010-8080","message":"No service exists for: /cto-darwin-raf/v3.4.0/shop/flights/revalidate"}
Here is my payload in full:
POST https: //api.havail.sabre.com/v3.4.0/shop/flights/revalidate?mode=live HTTP/1.1
Authorization: Bearer T1RLAQJ940LxYe01yXkBtjZ6g6PEJkjPfxDiW51CX1eYL52BV7ZR+vuQAACw70cYo2xd9slV8ZA8cpJFXg+4qGrxxg83PFKleE3Vm7AHTbrztkg3aHccOVLazItRcJmtR/Ohz96mz +em96HYv2n8SVBgdKTvcN1rwhBXrFsmGKY8E+LUK2wBPSQVz8kGmPW89G//EPp1igTJaaWZrJFxoq40G8SCS0HEyt3RTMNmVLtv7q0a+xuQWYJyGKpxSujRIeJzajN86YiJ7+Eck8rpyFnVOyIlKnO5fiX6C6E*
Content-Type: application/json; charset=utf-8
Host: api.havail.sabre.com
Content-Length: 1204
Expect: 100-continue
{
"OTA_AirLowFareSearchRQ": {
"POS": {
"Source": [
{
"RequestorID": {
"CompanyName": {
"Code": "TN"
},
"Type": "1",
"ID": "1"
},
"PseudoCityCode": "C94H"
}
]
},
"OriginDestinationInformation": [
{
"DepartureDateTime": "2018-03-23T08:50:00",
"OriginLocation": {
"LocationCode": "LHR"
},
"DestinationLocation": {
"LocationCode": "JFK"
},
"TPA_Extensions": {
"Flight": [
{
"OriginLocation": {
"LocationCode": "LHR"
},
"DestinationLocation": {
"LocationCode": "JFK"
},
"Airline": {
"Operating": "VS",
"Marketing": "DL"
},
"ClassOfService": "B",
"Number": 4370.0,
"DepartureDateTime": "2018-03-23T08:50:00",
"ArrivalDateTime": "2018-03-23T13:00:00",
"Type": "A"
}
]
},
"RPH": "1"
},
{
"DepartureDateTime": "2018-03-24T19:30:00",
"OriginLocation": {
"LocationCode": "JFK"
},
"DestinationLocation": {
"LocationCode": "LHR"
},
"TPA_Extensions": {
"Flight": [
{
"OriginLocation": {
"LocationCode": "JFK"
},
"DestinationLocation": {
"LocationCode": "LHR"
},
"Airline": {
"Operating": "VS",
"Marketing": "DL"
},
"ClassOfService": "B",
"Number": 4373.0,
"DepartureDateTime": "2018-03-24T19:30:00",
"ArrivalDateTime": "2018-03-25T07:30:00",
"Type": "A"
}
]
},
"RPH": "2"
}
],
"TravelerInfoSummary": {
"SeatsRequested": [
1
],
"AirTravelerAvail": [
{
"PassengerTypeQuantity": [
{
"Code": "ADT",
"Quantity": 1
}
]
}
],
"PriceRequestInformation": {
"TPA_Extensions": {}
}
}
}
}
You should probably not start using the endpoint you are using. According to the https://developer.sabre.com/resources/api_versioning it gets switched to https://api.havail.sabre.com by mid of the year. I guess you already use https?
Besides that it works for me when taking the sample payload and adjusting it for real data. Can you provide your header/payload?
Turns out it didn't like the querystring '?mode=live'. If I remove that, I get a response. We use that string in all our other REST requests to shop/flights/ but looks like it's not valid in this circumstance.
Also, thanks to Thomas for his help
I am using Paypal REST API for payments.All was working fine with sandbox credentials but when I switched to LIVE credentials.It is giving errors like this :
Request to paypal API :
{
"body": {
"intent": "sale",
"payer": {
"payment_method": "credit_card",
"funding_instruments": [
{
"credit_card_token": {
"credit_card_id": "CARD-7314506536077511MK7WL121",
"payer_id": "57ecbbed656c78519a28382c"
}
}
]
},
"transactions": [
{
"amount": {
"currency": "USD",
"total": 10
},
"description": "Payment taken from customer Neha for booking #SR1032 and to be send to SP Neha and SP paypal Id hello#y.bom"
}
]
},
"header": {
"x-pp-ads-performed": "false",
"content-length": "374",
"pp_remote_addr": "54.244.2.156",
"paypal-request-id": "2afb7a93-0cc2-4ab2-b216-45b8de908f9f",
"pp_geo_loc": "US",
"x-pp-silover": "name=LIVE3.API.1&silo_version=880&app=platformapiserv&TIME=2734681175&HTTP_X_PP_AZ_LOCATOR=",
"host": "api.paypal.com",
"accept": "application/json",
"client-auth": "No cert",
"connection": "close",
"x-pp-idempotencyid": "eabb84d3ef438_1475149730",
"x-slr-orig-script_uri": "https://api.paypal.com/v1/payments/payment/",
"x-pp-slingshot-targetapp": "platformapiserv",
"x-pp-corrid": "eabb84d3ef438",
"user-agent": "PayPalSDK/PayPal-node-SDK 1.6.9 (node v4.5.0-x64-linux; OpenSSL 1.0.2h)",
"content-type": "application/json",
"authorization": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx9T1G"
},
"additional_properties":
Response from paypal server
{
"status": 401,
"duration_time": 49,
"body": {
"message": "Unauthorized payment.",
"debug_id": "eabb84d3ef438",
"information_link": "https://developer.paypal.com/webapps/developer/docs/api/#UNAUTHORIZED_PAYMENT",
"name": "UNAUTHORIZED_PAYMENT"
},
"additional_properties": {},
"header": {
"Content-Length": "191",
"Content-Language": "*",
"CORRELATION-ID": "eabb84d3ef438",
"Date": "Thu, 29 Sep 2016 11:48:50 GMT",
"Connection": "close",
"Paypal-Debug-Id": "eabb84d3ef438",
"PROXY_SERVER_INFO": "host=dcg12javapapi7866.dcg12.slc.paypalinc.com;threadId=704",
"Content-Type": "application/json"
}
}
I've created an Orion instance based on orion-psb-image-R4.2 instance in FIWARE Lab, just updated (orion, pep, cygnus) after setting it. It is listening on internet and I have verified connevity and so.
I tried to create a simple instance with this query:
POST http:x.y.w.z:1026/v1/contextEntities/
Headers:
Content-Type: application/json
Accept: application/json
Body:
{
"id": "Sala1",
"type": "Sala",
"Attributes": [
{
"name": "temperatura",
"type": "float",
"value": "20"
},
{
"name": "humedad",
"type": "float",
"value": "80"
}
]
}
The answer received from the Web server is:
200, OK
Date: Fri, 05 Feb 2016 10:34:51 GMT
Content-Length: 132
Content-Type: application/json
But the answer from ORION is:
{
"errorCode": {
"code": "400",
"reasonPhrase": "Bad Request",
"details": "invalid payload: unknown fields"
}
}
Any idea on what I'm missing?.
Thanks & Regards.
EDIT: Sorry... that's something I already fixed. Somehow I copied it wrongly.
The previous error was "json syntax error".
That's fixed.
The error I reported remains after writing "attributes" with lower case "a".
Any other idea?
POST: HTTP://x.y.w.z:1026/v1/contextEntities/
HEADERS
Content-Type: application/json
Accept: application/json
BODY
{
"id": "Sala1",
"type": "Sala",
"attributes": [
{
"name": "temperature",
"type": "float",
"value": "20"
},
{
"name": "humidity",
"type": "float",
"value": "80"
}
]
}
Thanks in advance
Orion API is case sensitive. Thus, probably the problem is that your payload uses Attributes instead of attributes (i.e. lower-case a).