Paypal redirect URL issue
Seems to all work, tested in on both using Paypal Sandbox, thank you for your help with this
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Seems to all work, tested in on both using Paypal Sandbox, thank you for your help with this
Hello Addy,
Thank you for the update.
Hi, I am using the Paypal Api's to setup a reoccurring payment system and have run into a problem on how I enter some info into rest. The Sample Request is:
a rel="nofollow"https://developer.paypal.com/docs/api/#update-a-plan/a
code
curl -v -k -X PATCH 'https://api.sandbox.paypal.com/v1/payments/billing-plans/P-94458432VR012762KRWBZEUA' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <Access-Token>" \
-d '[
{
"path": "/",
"value": {
"state": "ACTIVE"
},
"op": "replace"
}
]' /code
How do I enter this(below) into the Request fields?:
code
'[
{
"path": "/",
"value": {
"state": "ACTIVE"
},
"op": "replace"
}
]' /code
I have not come across this structure yet and can't figure out which fields that I need to create.
I think ("op" : "replace") string will be one request parameter but how do I enter the object above it?
I tried to enter ("path" : "/") string as one parameter and "value": {"state": "ACTIVE"} object as another parameter but this did not work.
Any idea on how to enter this array of objects into the request body?
Hi Matt,
You can only send this request in runtime mode(not in test mode).
So here a solution:
1 Open service settings and set "Content Type" as "JSON". http://prntscr.com/4s7fov/direct
2 Add service to the page and give datasource name "externalTest1"
3 Use following JS code to invoke service in runtime:
pre
var queryArray = [
//First object in array. You can add other.
{
"path": "/",
"value": {
"state": "ACTIVE"
},
"op": "replace"
}
];
testRest.execute({data: queryArray })
/pre
When you will test in run time you can open browser debugger "net" tab and will see following request: http://prntscr.com/4s7i27/direct
Also don't forget to set other parameters (headers) from your specifications.
Regards.
Thank you for the reply. What you have suggested works well. I have another issue with this PATCH. The URL requires an id to be placed into it. if I use this method:
I get an error returned every time.
If I remove the {URL} from service request, and paste the url directly into the service settings:
This works and returns a 200 response. But because the ID at the end of the url will be dynamic depending on the user, I can't use this method.
Is there a way to manually specify the url in Javascript without having to add extra service request items? I didn't see any reference to this in the backend services docs.
I tried
code
paypal_activate.execute({url:myUrl},{data:queryArray },{headers:{"Authorization":"Bearer"+token}});
/code
This sets the url but gives me an error "There are no Child Objects"
Thanks you
Hi Yurii,
I tried to use the method in code you gave but I see it is sending "object" for me instead of array , please see link below.
https://getsatisfaction.com/apperyio/...
Any idea how to fix that ?
I am facing the same issue, can anyone help Pease
Hello Zahid,
Let's continue our discussion here: https://getsatisfaction.com/apperyio/...