Why use same functions twice while create and executing payment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hii Im new to paypal payment gateway integration , i had install paypal php sdk via composer , then when i was checking sample codes ,
i was reading create payment code http://paypal.github.io/PayPal-PHP-SDK/sample/doc/payments/CreatePaymentUsingPayPal.html
and executing payment http://paypal.github.io/PayPal-PHP-SDK/sample/doc/payments/ExecutePayment.html
in Both Cases while creating and executing payment both using same function again and agian , please tell me the reason what is the need to use it again and again
$transaction = new Transaction();
$amount = new Amount();
$details = new Details();
$details->setShipping(1.2)
->setTax(1.3)
->setSubtotal(17.50);
$amount->setCurrency('USD');
$amount->setTotal(20);
$amount->setDetails($details);
$transaction->setAmount($amount);
$execution->addTransaction($transaction);
when i remove above from my execute method , its giving me same response with our without this code , as i have already implemented it createpayment method.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- What is the order of execution for latest Rest APIs for paypal payment ecomerce site in REST APIs
- Sending addtional information aout payment to API Session in REST APIs
- Paypal Integration Client Side in SDKs
- godaddy with payment paypal but can't function in PayPal Payments Standard
- After 3DS2 OTP verification page, Is payment completed or what, how to fetch response in REST APIs