Page 6 of 6

Paypal redirect URL issue

Posted: Thu Jul 10, 2014 3:57 pm
by Bad Addy

Seems to all work, tested in on both using Paypal Sandbox, thank you for your help with this :)


Paypal redirect URL issue

Posted: Thu Jul 10, 2014 4:05 pm
by Evgene Karachevtsev

Hello Addy,

Thank you for the update.


Paypal redirect URL issue

Posted: Tue Sep 30, 2014 4:57 pm
by Matt6607699

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 suggestions?
Thanks Image Image


Paypal redirect URL issue

Posted: Wed Oct 01, 2014 2:43 pm
by Matt6607699

Any idea on how to enter this array of objects into the request body?


Paypal redirect URL issue

Posted: Wed Oct 01, 2014 10:27 pm
by Yurii Orishchuk

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 = [
&#47;&#47;First object in array&#46; You can add other&#46;
{
"path": "/",
"value": {
"state": "ACTIVE"
},
"op": "replace"
}
];

testRest&#46;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.


Paypal redirect URL issue

Posted: Fri Oct 03, 2014 3:01 pm
by Matt6607699

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:
Image Image Image

I get an error returned every time.

Image

If I remove the {URL} from service request, and paste the url directly into the service settings:
Image

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&#46;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


Paypal redirect URL issue

Posted: Tue Jun 02, 2015 3:41 pm
by Alvi

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 ?


Paypal redirect URL issue

Posted: Fri Oct 07, 2016 9:27 am
by xahid09

I am facing the same issue, can anyone help Pease


Paypal redirect URL issue

Posted: Tue Oct 11, 2016 10:15 am
by Serhii Kulibaba

Hello Zahid,

Let's continue our discussion here: https://getsatisfaction.com/apperyio/...