A resource representing a Payer that funds a payment For paypal account payments, set payment method to 'paypal'.
(Optional) Lets you specify item wise information
Use this optional field to set additional payment information such as tax, shipping charges etc.
Lets you specify a payment amount. You can also specify additional details such as shipping, tax.
Specify a payee with that user's email or merchant id Merchant Id can be found at https://www.paypal.com/businessprofile/settings/
A transaction defines the contract of a payment - what is the payment for and who is fulfilling it.
Set the urls that the buyer must be redirected to after payment approval/ cancellation.
A Payment Resource; create one using the above types and intent set to 'sale'
For Sample Purposes Only.
Create a payment by calling the 'create' method
passing it a valid apiContext.
(See bootstrap.php for more on ApiContext
)
The return object contains the state and the
url to which the buyer must be redirected to
for payment approval
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
The API response provides the url that you must redirect the buyer to. Retrieve the url from the $payment->getApprovalLink() method
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
Create Third Party Payment using PayPal as payment method
This sample code demonstrates how you can process a PayPal Account based Payment with a third party paypal account. API used: /v1/payments/payment