Step 4 - Build your service to get the PayID and URL - Called PayPalPayment. This was the trickiest challenge to get around. Here's what my service ended up looking like - It's very much like Max's service - however - this is what it looks like in the new builder, and here are the 'hints' to using it - working it with the new builder:
a. I was not able to get this service to 'test' - because I could not get data into the total and currency fields shown in image 4 below. So - in order to get the response set up correctly - I borrowed a tip that Max shows later in his demo. I went to the PayPal API link (shown above) - found the sample response - copied it into the builder in image 4 below (just copy and paste) - and then clicked the 'Import as Response' button.
For convenience - when you set up your service - after you've finished with images 1 - 4 below - you will want to set up the response. I've saved the sample text on my web server here: (just copy and paste it into your builder - and click import as response button).
http://the-software-studio.com/javasc...
b. Be sure to pay attention to the 'Types' at right. They are important - I could not get the service to execute correctly - until I ended up with this structure in my request body (image 4).
Code: Select all
[url=https://d2r1vs3d9006ap.cloudfront.net/s3_images/1187749/Step4-1.png?1428876190][img]https://d2r1vs3d9006ap.cloudfront.net/s3_images/1187749/Step4-1_inline.png?1428876190[/img] [/url]
and your response page should look like this - when collapsed most of the way (Remember you created the response by importing the sample response above...)
Once you're done setting up your service - like Max did in the tutorial - you're now ready to execute this service. I am assuming that no one will use these posts - without first listening to the tutorial Max has here:
https://www.youtube.com/watch?v=1w-_z...
Next step - Step 5 - Execute the service you just set up