I'm following a tutorial from the paypal documentation to make it possible to pay through paypal. Here is the code I'm trying to implement. However when I run the code it won't show me the amount that is supposed to be payed while it is set in the transaction through the code.
Does anyone know what needs to happen for this to work? Is the example either not complete or not up to date?
I figured out what was wrong. For the transaction to work something additional must be added to the paypal link.
When returned from paypal the link you have to navigate to to pay looks like this
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-3WC762911Y9384932
however an additional parameter is needed for paypal to show the price that was set. To do so the following parameter needs to be added &useraction=commit
The entire link would look like this
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=commit&token=EC-3WC762911Y9384932
Related
I have a one HTML JSP form with accordion. I w want to implement a "Save as draft" feature in that form. Can any body help me?
Thanks I got the solution for this and thanks to you for response.
for this we have to set the status flag in the database. and liferay give the by default this method WorkflowConstant.STATUS_DRAFT by default it will take 2 check your status value if it is same then it will store in db as draft otherwise submitted.enter image description here
"Save as draft" simply means the workflow status is assigned the value of DRAFT. Portlets like WebContentDisplay know to only show journal articles that have APPROVED (published) status.
Correspondingly when you go to edit the article, it will pull the DRAFT version instead of starting a new edit.
So there is nothing magical here, it is just regular code to do the appropriate thing based upon the status of the entity.
I am currently looking at a system that implements the PayPal api. As a part of this I need to get the feeAmt() which is the fee that is paid to paypal for processing the payment.
From the documentation that I have looked at it appears that I have to implement the getExpressCheckoutDetailsReq() method in order to get the information that I want however no matter what I have tried I am struggling to do this. I should also let you know that I am currently developing my application using Java so using this is going to be best.
If any more explanation is needed please don't hesitate to ask and I will do my best to amend the post :)
GetExpressCheckoutDetails does not include the fee because at that point no payment has been made yet. That's the 2nd of 3 calls for Express Checkout, and until the final call is made there is no fee.
The fee amount would actually come in that final call's response: DoExpressCheckoutPayment. It will come in the PAYMENTINFO_n_FEEAMT parameter, where n is the number of the payment (0,1,2,etc.) Most likely it'll be 0 unless you're working with parallel payments.
Alternatively, you can use Instant Payment Notification (IPN) to get details about transactions, including the fee, in real-time when transactions are completed on your PayPal account.
Yet another option would be to use the GetTransactionDetails API to pull data for an individual transaction which would include the fee in a FEEAMT parameter. Maybe that's the one you were initially thinking of..??
http://pastebin.com/5Nvn1uSB this is my xhtml
http://pastebin.com/fqwiRQER this is home there is the code for menuitems that dont work...
http://pastebin.com/Phun7EKS this is registration with connection to db... but doesn't work at all not even running it
Well, I see lots of issues here. First, your description of what's happening is non-existent. It's pretty hard to help you when all you provide is code without a good description of your environment, what you expect to happen and what's actually happening.
Also, it would be helpful to know what steps you have already taken to debug your code.
That said, based on a quick read of your code, your p:commandButton is using an actionListener instead of an action which I believe is the correct attribute.
Lastly, you're using raw text fields from your web page to directly build an SQL statement. This opens you up to all kinds of code injection exploits that you probably want to avoid. You'd be better off using something like JPA as an abstraction layer that allows you to persist objects.
This is more of a general design question I guess...
I have an Ajax application that displays a table listing purchase orders.
Each order has a checkbox next to it
The idea is to check some of them, then press a button and a JavaScript function will start, pulling out the "checked" ones and passing them server side.
Right now the best I could come up with is giving each check-box a "value" attribute with the ACTUAL ORDER identifying number. So when they are collected, and passed to the controller, I can just use the values to query the database for the exact orders.
But I have a nagging feeling that this is not secure and not the most efficient way to do this.
So I would love to hear the better ideas.
Thanks in advance.
If the orders list can see only certain user, I dont see anything bad in your pattern.
In other hand, if someone could get this id and do request with it(for example - to delete order), you can always chack the permissions on server-side.
secure, in what way wouldn't that be secure ? does it matter the clients get to see those id's ?
Certain users shouldn't be able to pass any purchase order to the server ?
Yes, I think my last question is your answer.
And about it being inefficient; is there a performance problem with your approach ?
Can somebody please show me resources that would let me make REST calls from my Android Phone to Amazon?
I need to get Item details for that Item.
I tried to look for documentation but I really couldn't find it. I am sorry if this has been answered before but I couldn't find the answer.
Thank you.
Have a look at http://docs.amazonwebservices.com/AWSECommerceService/latest/GSG/ImplementinganA2SRequest.html for starters? This doesn't use REST though. The ItemLookup API call should be the one you need with a ResponseGroup of ItemAttributes.
You'll need to get set up with access keys - see http://docs.amazonwebservices.com/AWSECommerceService/latest/GSG/GettinganAWSAccessKeyID.html for that.
Not sure if there are any Android-specific issues that you should be aware of