How can i implement payment through Paypal on Sharetribe opensource? - ruby-on-rails

i'm trying to implement payment through Paypal on the opensource version of Sharetribe (https://github.com/sharetribe/sharetribe). By default Sharetribe doesn't allow people to use Paypal with the opensource code. How can i create the transaction using the Paypal API? Thank you!

Sharetribe doesn't have Paypal enabled on open source version because using Paypal as a peer-to-peer payment solution requires certain extra steps for a business to set up with Paypal. Sharetribe has done this for their hosted websites, but can't be liable for open sourced versions.
The code is all there for Paypal, however most people are implementing Stripe Connect instead, as, even with the Paypal code, Stripe Connect is a simpler solution to get your marketplace up and running.
In short, there is no 'setting' to turn on Paypal. A lot of code is required to enable payments.
If you want a marketplace ready-to-go with payments enabled, use Sharetribe's hosted version. Otherwise, you'll need someone with solid knowledge of Ruby on Rails in order to implement Stripe Connect.

Related

Stripe iOS SDK and NodeJS API: Is there a way to create a Source from a Payment Method?

I'm using Stripe's STPPaymentContext payment options view controller as stated per Stripe's basic iOS integration guide: https://stripe.com/docs/mobile/ios/basic. This results in a Payment Method for the customer as intended.
However, I'm working with legacy code that uses Sources and Charges instead of Payment Methods and Payment Intents. The workflow of the app was designed around default sources for a customer so Payment Methods don't really work here unless I go with subscriptions or invoices, which I'll do as a last resort but hoping to avoid.
Is there a way to create a Source from the resulting Payment Method from the first step? I can then manually attach this Source to the customer and set it as the default.
The short answer is no, you cannot get a Source or Token from STPPaymentContext. That API no longer uses the legacy Stripe objects. You can read more about this change in the Stripe iOS SDK changelog.
The only way to use STPPaymentContext with Sources is to downgrade the Stripe iOS SDK to a version prior to 16.x, which is not recommended.
If possible you should update your legacy code that uses Sources and Charges to use Payment Methods and Payment Intents. Stripe provides a migration guide to help you with this.

Stripe Connect payment in iOS

We want to integrate Stripe Connect with iOS application to transfer amount from one person to person.
Let's say, I want to transfer $100 to my sister's account using Stripe Connect Standalone/Managed Account. And we also want to take business commission from sender which includes stripe commission also.
We have gone through Sharing Customers also but won't be able to find any solution for Stripe Connect with iOS SDK.
We have also checked iOS SDK.
Can anyone please guide us how to integrate Stripe Connect with iOS mobile app in above scenario?
How can we transfer payment to end customer?
Do we need to integrate through iOS SDK or web page?
Stripe's iOS and Android SDKs serve the same purpose in a mobile application as Checkout or Stripe.js do in a web application: they take payment information and produce a token in return.
Once the token has been created, it must then be sent to a backend server where it can be used in API requests sent with the secret key. You can't create charges or transfers directly from your mobile app -- that must be handled by an external server.
(Also, please note that there might be compliance issues with what you're trying to do. I recommend you reach out to Stripe's support to explain your usecase and make sure it's something that Stripe can support.)
You can easily integrate Stripe Connect with your iOS app check the following link
https://github.com/gurunglaxman0/StripeConnect-iOS
Once you connect your stripe user id with server you can create charges and application fee using Stripe Api's from backend

Use Paypal to accept payments in ASP.NET MVC

Hi I want to use Paypal to accept payments in my applications. I feel like I'm going around in circles. What I have gathered is that there is very little documentation and a lot of marketing guff that you need to wade through - no disrespect to anyone who has worked on it.
I've learned that the Restful APIs from Paypal are not full featured yet, and the classic APIs provide a richer set of features - and my merchant account is in Australia so I don't think I can use REST APIs yet.
I've got a number of questions :
What do I need to get started ? Is it essentially formatting a payload according to the documents and calling a web service or is there more to it ?
Are there any sample .net applications that use the classic API. I may have missed something but GIT repository only seems to have REST api samples - should I get this and use classic in its place or is there more to it ?
Should I be using the SDK at all ? I checked in Nuget and there are a number of SDKs - the asp.net -http://www.asp.net/web-forms/overview/getting-started/getting-started-with-aspnet-45-web-forms/checkout-and-payment-with-paypal and it doesn't talk about the SDKs ??
If I am to get the SDK which one should I start with for Classic, I'm assuming I only need the SDK for the respective functions I need. For example there is a Merchant SDK and Payments Pro SDK which has the same information on www.paypal.com/SDK
What I want to be able to do is the following:
Accept Credit Card and Paypal payments on my wedapp
Do Adaptive Payments
Establish Recurring Payments after a Credit Card and Paypal Payment
Do PreApproval
Provide Express Checkout as per Paypal requirement
Please help, there appears to be a lack of getting started guides for Paypal and MVC. If anyone has any samples that would be fantastic!
I can certainly help you with your Express Checkout requirement, and in shedding some light on the complexities of interfacing your application with PayPal.
This .NET SDK offers full support for Express Checkout functionality, as well as providing a concise readme that outlines how Express Checkout works at both high, and more precise levels of abstraction.
In terms of Express Checkout, there are 3 main terms that you should familiarise yourself with:
SetExpressCheckout
Establishes a PayPal session based on Merchant credentials, and returns an Access Token pertaining to that session.
GetExpresscheckoutDetails
Returns a definitive collection of metadata that describes the PayPal user (name, address, etc.).
DoExpressCheckoutPayment
Collects the payment by transferring the transaction amount from the User's account to the Merchant account.

Credit card payments via PayPal REST API without being PCI-compliant

Can't understand which PayPal API to use.
I have Rails app and I'd like to accept credit card recurring payments via PayPal. At first I was thinking to use Express Checkout API that supports recurring billing and can work even if a user doesn't have PayPal account. But then I saw that their official ruby gem merchant-sdk-ruby https://github.com/paypal/merchant-sdk-ruby will be deprecated:
This Classic SDK is not actively supported and will be deprecated in
the future. For full support on new integrations, please use the Ruby
Rest SDK
So I don't want to use something that will be deprecated soon. But I can't understand whether I can use REST API to accept credit cards without being PCI-compliant.
I'd like to redirect user to PayPal where he could enter his credit card info and return back to my site like in Express Checkout, but I see only examples where credit card info is collected on my site and passed to PayPal via API that implies more security headache on my site.
UPD: I found some information regarding this question in Accept a PayPal payment section of REST API documentation that is a bit odd because I expected to find it in Accept credit card payments section. They say:
Important: To receive Guest Checkout payments, which allow credit cards, ensure that PayPal Account Optional is enabled on your account
settings. For example, here is the path for US accounts:
Profile > My selling tools > Website preferences > PayPal Account Optional
But I'm still not sure whether it will work in my case. Now I have the following question:
Can I use Guest Checkout feature to accept recurring payments?
Can I test Guest Checkout in Sandbox? And if I can what credit card number to use?
Can I show by default form for entering credit card info when user gets to the PayPal site rather than for entering PayPal credentials?
Ughh... why it is so complicated?
There are couple of samples in PHP code, that could help you understand recurring payment options in REST API.
https://github.com/paypal/PayPal-PHP-SDK/tree/master/sample/billing
Or you could follow up the docs on : https://developer.paypal.com/webapps/developer/docs/api/#billing-plans-and-agreements
I will look into this specifically and get back to you
For trying it out on sandbox, you can create an account here at https://developer.paypal.com/webapps/developer/applications/myapps You need to create an app, and it would generate a valid credit card for you.
This may be very unlikely to do, but I can ask the internal team if they know of any such option.
Railscast #289 is on this. It requires that you sign up for the pro version. Looks pretty involved but he walks you through it.

Active merchant and Paypal API for recurring payment

I have few questions on paypal's recurring payments, I went trough the paypal documentation to find some answers but, it didn't help me much.
Here are the stuffs that I need to know, hope someone can help me on these.
I'm using paypal's standard payment account. So far I managed to create recurring payments with paypal by posting NVP's to paypal from merchant website to paypal.
Now I need to show recurring payment profiles on merchant web site. So that customers can cancel, modify recurring payments from merchant website without redirecting to paypal.Is this possible?
Think I should use paypal's SOAP API for this as I can't get the job done with NVP API. So I installed active merchant as described in this post. But I always get an error
This transaction is invalid. Please
return to the recipient's website to
complete your transaction using their
regular checkout flow.
from paypal and it never send me the token back.
Also I got this on my log
Security header is not
valid
Is it because I use sandbox API credentials or is it because I can't use paypal's standard account with SOAP API?
Usually the "security header is not valid" response comes from using sandbox credentials in the live environment or vice-versa. AM will use the sandbox when your Rails app is in development mode, so be sure you are using the right set of credentials.
When I was integrating PayPal's recurring payment profiles into the SaaS Rails Kit (using ActiveMerchant) I ended up just canceling a user's current profile and creating a new one when they wanted to change their subscription.

Resources