Reputation: 187
I have redirected my customers to PayPal payment gateway by using the following form. It’s working properly.
<form:input path="cmd" id="cmd" name="cmd" type="hidden" />
<form:input path="business" id="business" name="business" type="hidden" />
<form:input path="password" id="password" name="password" type="hidden" />
<form:input path="custom" id="custom" name="custom" type="hidden" />
<form:input path="item_name" id="item_name" name="item_name" type="hidden" />
<form:input path="amount" id="amount" name="amount" type="hidden" />
<form:input path="currencyCode" type="hidden" name="currency_code" value="EUR" />
<form:input path="rm" id="rm" name="rm" type="hidden" />
<%-- <form:input path="returnUrl" id="return" name="return" type="hidden" /> --%>
<input type="hidden" name="return" value="${paymentForm.returnUrl}" />
<form:input type="hidden" name="cancel_return" path="cancel_return" />
<form:input type="hidden" name="cert_id" path="certId" />
<!-- <input type="submit" value="Proceed with Payment" id="submit2" name="SUBMIT2"/> -->
</form:form>
Now I want to Implement the following features
Thanks in Advance,
Lakshmi Priya.K
Upvotes: 2
Views: 515
Reputation: 19356
Sounds like you'll want to implement an authorization & capture flow. For Website Payments Standard (and PayPal API-based products), you'll want to specify a 'payment action'.
By default, all transactions are marked as 'Sale', which means they're settled right away.
By setting a 'payment action' of 'authorization', the transactions creates an authorization on the buyer's funding source. PayPal guarantees a default honour period on authorization of three days.
Authorizations are valid for 29 days, however, after 3 days we can no longer guarantee the funds will always be available.
To set a payment action in Payments Standard, you will pass;
<input type="hidden" name="paymentaction" value="authorization">
For API-based payments, I would recommend verifying it against the API reference of the product you're attempting to integrate.
For more information on authorizations, take a look at 'Using Authorization & Capture' on the developer portal.
Upvotes: 2