How to Perform Payment Refund in Payum bundle using stripe and Paypal? - payum

i would like to do the Payment Refund using Payum Bundle, how can i do payment refund with Stripe and Paypal using Payum bundle?
Thank you.

This feature was not implemented yet. Where in theory it is easy to implement (1-2 days).
What has to be done:
You have to create payum's request: RefundRequest and two payum's actions which support the request (can manage it). In the action you have to put payment specific refund logic. It may require some changes in statuses as refund status is not present yet too.
The refund action can be added to the bundle to ease future use.

Related

How use PayPal API Request Money?

I need to use Request Money by PayPal. I have problem with find the best Paypal API (SOAP/REST) for this. After that i need sometimes refund this transfer.
Can somebody help me to ?
I want to see if there is a way to automate the PayPal request money part.
This is a PHP web application.
A sample payment link :
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=YOUR_PAYPAL_EMAIL&amount=10&currency_code=USD&item_name=test
Edit the value of each variable and you would be able to generate a payment link on your demand. You may also check below link for more details of PayPal Payment Standard 's variables.
https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
You can send PayPal Invoices to people using the Invoicing APIs. For that you may be interested in our PayPal class library for PayPal, which makes those API calls very quick and easy.
Alternatively, you could build a more simplified money request by just generating a PayPal Standard payment URL using the variables outlined here. Then you could have that URL be a link from any button or trigger you want.

Paypal Payout Webhooks

I'm unable to find documentation by PayPal about how it handles webhooks for payouts. Are payouts treated the same as payments, so that a completed payout will initiate a payment completed webhook? In general, do payments and payouts translate to each other doing webhooks; or are there intricacies and gotchas someone from the paypal team could explain to me?
In a webhook perspective, the payouts transactions and sale transactions are not exactly the same thing. The payout event will be added into the webhooks supported event type list but not yet at this moment.
https://developer.paypal.com/webapps/developer/docs/integration/direct/rest-webhooks-overview/#event-type-support
So the classic IPN will still be your consideration of handling the "call-backs", for payouts and even other transaction types under RESTful API
Steps To work on payout:
go to paypal developers account and login using business account
Create new app and get client, secret etc
create some personal accounts.
Go to https://github.com/paypal/Payouts-PHP-SDK to get sample code. Update your credentials and it will work.
If you want a running code, go to https://www.voizacinc.com/ and submit inquiry. You will get working code.

Create paypal form which handles both recurring and one off payments

Wanted to know if paypal allowed this functionality within one form or if I have to create two separate forms in order to obtain this functionality. Currently building a donation widget for a client per their request.
If there are any documentation regarding this within paypal a link would be greatly appreciated.
Cheers.
You can do that no problem. Just build your form with options for one-time or recurring payments, and then use the Express Checkout API to process the checkout accordingly.
If you're working with PHP you can take a look at my class library for PayPal, which will make the Express Checkout API calls very simple for you.
The calls you'd be utilizing are:
SetExpressCheckout
GetExpressCheckoutDetails
DoExpressCheckoutPayment (for one-time payments)
CreateRecurringPaymentsProfile (for subscriptions)

paypal one time login during paypal payment

I need a help regarding paypal.
That is. Once I have logged in with paypal and made payment, Then for another payment no login will be asked, Direct payment will be done using paypal. Please comment your suggestions. Thanks in Advance.
You have a couple of options for this.
First, you could take a look at Preapproval, which is part of the Adaptive Payments platform. It allows users to create a Preapproval profile that your application can then use to trigger payments at any time without further approval as long as the payment fits within the guidelines of the preapproval profile.
Another option would be to look into Express Checkout with Reference Transactions. This would give you a little bit more flexibility and would be more in line what you're asking for, I think. Users would agree during their first payment with you to allow you to auto-charge this same account in the future. Then you would use DoReferenceTransaction to trigger future payments based on that "billing agreement" which is what it would be called that way.
I would recommend going with Express Checkout, and you might want to look at Digital Goods, too, which just adds some more functionality with quicker PayPal checkout in various ways.
It's all handled through a few simple API calls, so don't let all the info scare you.
My PHP class library for PayPal will make all of the API calls very simple for you regardless of which method you choose. Again, though, I'd recommend Express Checkout.

Which paypal method should be used for direct / indirect payment?

I am working on one website which has 2 mode of payment for already generated invoice by website.
Method 1. User log in to site, click on invoice and Pay. For this method i have to follow which method where user come back to site with additional parameter i have sent?
Method 2. If user has provided his credit card details, then with help of cronjob / schedule task, payment should be processed and it should notify to website (IPN). For this method i have to follow which method? This is not recurring payment.
Thank you
You could use the DoDirectPayment API for both. This would allow you to process a charge at the time the buyer is checking out, or later through your cron job. Keep in mind that the DoDirectPayment API will only let the buyer pay with a credit card though. If you are wanting the buyer to be able to pay with their PayPal account as well, then you would need to also use Express Checkout.