Difference between ChannelInitiatedBilling vs MerchantInitiatedBillingSingleAgreement - ruby-on-rails

I'm trying to integrate paypal in a e-commerce site on rails.I'm working on a existing code.While going through code I found two types of BillingType on configuration file, I found teo types of ChannelInitiatedBilling and MerchantInitiatedBillingSingleAgreement.
What is the basic difference between them? Any appreciation will be appreciated.
EDIT 1
While using ChannelInitiatedBilling I'm getting this error
Channel not enabled for channel initiated billing.
While using MerchantInitiatedBillingSingleAgreement I'm getting this error
Merchant not enabled for reference transactions

The billing type is of two types :
MerchantInitiatedBilling : PayPal creates a billing agreement for each transaction associated with buyer
MerchantInitiatedBillingSingleAgreement : PayPal creates a single billing agreement for all transactions associated with buyer.
Do you have a link that supports ChannelInitiatedBilling ? May be its deprecated.

ChannelInitiatedBilling is actually working. I contacted PayPal and they said they have to enable this feature against the account you are using. Regardless of sandbox or live.
They said there is not document for ChannelInitiatedBilling at the moment.
I have had my accounts enabled and everything works well.
So, if you see Channel not enabled for channel initiated billing. message, contact PayPal to enable it for you.

Related

ios Stripe payment(Account to Account Transfer)

I am making an application in Objective-C(iOS). I want to transfer some amount from my account to the other account using my application.
Case: The transfers will be user specific.
1.There will be a user who will post his need for money.
2.The other person who wants to help him will contact him in personal chat.
3.There will be a payment option from where the donator will send money to the person in need.
Please help if anybody is having knowledge about it, as I haven't worked with stripe before.
Thanks in advance.
The first step would be setting up Stripe
https://www.youtube.com/watch?v=NdszUvzroxQ
The tutorial uses Heroku which handles the backend side of the payments.
Here is the documentation https://devcenter.heroku.com
Just incase you're looking for a way to do this with Firebase, check out my answer here Swift Firebase Stripe Connect
The next step would be altering your Stripe project to work for Stripe Connect
The documentation for Stripe connect is here https://stripe.com/docs/connect
You basically need to setup your account to allow for users to sign up as 'Connected accounts' that can receive payments. Your stripe account takes the payment and then dishes out to the connected account accordingly, it needs to be setup in the node server.
Stripe has an example project that uses Stripe connect which is what you're looking for, this handles marketplace style payments.
Take a look at their project. The concept is that users can sign up online and be accepted for payments.
Here is the project https://github.com/stripe/stripe-connect-rocketrides
and the demo website https://rocketrides.io

Paypal chained Payment Ios MPL Issue

Currently ios team is having an issue with chained payment in the app,the server team
needs an order id to be set as tracking id for tracking the payment.But ios team says
that they cant give a tracking id as there is no option to give tracking id in the sdk
mobile payment library.
Ios team says like after every chained payment transaction in the app
it generates a pay key after a succesful transaction and a coorelationId for a failed transaction
But it does not have a tracking id option.
Server team says like they cant implement
an ipn listener to update the db without the tracking id (Order Id).
I have been stuck with this issue for days can someone please help me out on this? It would be of great help
As said by your iOS team
Paypal MPL you will not get any ‘tracking id
‘ or some other information which you will get when integrate paypal
in the web.
every chained payment transaction in the app it generates a pay key
and payment status after a succesful transaction and a coorelationId
for a failed transaction
This is correct, i have also faced this issue as it only send paykey no other information
If you want to track for the any id you can send the paykey to the server and from the server they may call the API to get more information and tracking id which you may use,
for more information regarding this api refer this link: https://developer.paypal.com/docs/classic/api/adaptive-payments/PaymentDetails_API_Operation/ , check PaymentDetailsRequest which takes ‘payKey’ as mentioned in the step 3 in their doc
I Have managed to resolve the issue.For fetching the adaptive payment details,i am using the PaymentDetails API as mentioned by Pyro above.The only remaining issue was how will i track the transaction in the IPN listener .As of right now to my knowledge,IOS sdk doesn't offer a way to pass tracking Id ,so i exploited the memo field to pass in my id and i am able to retrieve this at my server side.I know this is a hack but am not left with much options.This link guided me to this workaround
https://github.com/paypal/PayPal-iOS-SDK/issues/67
If anyone knows a better way ,please do share.I hope this helps someone.

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.

Issues in PayPal live transaction via PayPal iOS SDK

I am developing an iOS application for iPad, version 7.x. We Need to perform PayPal transaction via the application. We included PayPal iOS SDK and referring their sample code to perform the transaction.
The sample code is placed here
There are enough funds in the customer account
Also, we have proper Client ID and secret key where funds needs to be transferred.
Both payee and payer have live accounts.
Transaction via their Sandbox account was sucess
Upon debugging the code, we found that we are able to create the payment. However, we get error while the payment is about to be approved.
Here are the error details
PayPal SDK: Request has failed with error: UNKNOWN_ERROR - System error (UNKNOWN_ERROR). Please try again later. (400) | PayPal Debug-ID: 3e8087cbf6bd1 [live, PayPal iOS SDK 2.1.2]
Is there any specific configuration which we need to include in our code for making live transaction?
Or is there specific configuration that needs to be done, in one of the accounts?
Or is there something missing the sample code provided by PayPal iOS SDK? Please advice.
The issue is that you are not using the correct ClientID. The client ID you are using is not associated with an active App from yoiur developer portal. To correct this, please go into the developer portal and either use a different client ID from a different 'active' app or create a new app.
We discussed this issue with PayPal Technical Support team, and here was the FIX:
We’ve found the issue is actually not with buyer account, some flag was not updated for merchant account "XXX#YYY.com” due to a bug which had in our system at the time it was created.
The fastest workaround to resolve this would be if you could please add another email to same account "XXX#YYY.com”.
Steps to add another email address to "XXX#YYY.com” :
Please login to the PayPal account.
Click on Profile—> Email address. Add another email address.
This solved our issue.

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