card-io / card.io-iOS-SDK

card.io provides fast, easy credit card scanning in mobile apps
Other
2.29k stars 554 forks source link

newbie: integrating paypal and cardio #98

Closed stefanbund closed 9 years ago

stefanbund commented 9 years ago

Just posted a question to stack: http://stackoverflow.com/questions/29016665/newbie-need-help-integrating-paypal-ios-sdks-with-card-io

I am ok implementing cardio scanning, and getting payment card number. However, I need help in sending card details along to paypal to finalize a payment (single payment).

Paypal provides its own native CC entry form, which obscures the payment card details from my app. This is desirable. However, how can I send the CC details from cardio to paypal, once it's scanned in?

dgoldman-pdx commented 9 years ago

@stefanbund is there a reason that you wish to bring up the card.io view controller on your own?

You can instead let the PayPal-iOS-SDK handle this for you. By default, if you create and present a PayPalPaymentViewController, it will offer the user the choices of PayPal and Pay with Card. Choosing the latter brings up card.io and then submits the payment to PayPal.

If you're not seeing the Pay with Card option, then take a look at the PayPalConfiguration you are passing when creating the PayPalPaymentViewController. Be sure that the PayPalConfiguration property acceptCreditCards is set to YES.

dgoldman-pdx commented 9 years ago

@stefanbund feel free to reopen this issue if you'd like to discuss further.

dharmikvyas commented 9 years ago

Hello sir, I also have small issue using card.io and paypal integration. I want to scan cards, So I included both paypal (for paypal payment) and card Io. It gives duplication issue. SO I removed card.io. Paypal includes functionality of scanning in sdk. But I want to use scanning of card and get card details in my view controller. How Can I do that? Please help.

dgoldman-pdx commented 9 years ago

@dharmikvyas if you use the PayPal iOS SDK, you will get card.io scanning automatically.

If you are having problems with this, please open an issue in the PayPal iOS SDK repository.

dharmikvyas commented 9 years ago

No, I don't have problem with scanning. I want to scan card when User clicks button in my ViewController Screen/Custom screen. It currently included in Paypal Screen.

Like I want to scan card, get that details into app, pay using another banking gateways (local)

dgoldman-pdx commented 9 years ago

Oh, I see. So you want to have one user flow that involves PayPal, but another flow that uses card.io to provide the card information back to your app for processing.

The PayPal iOS SDK includes all of the card.io header files. So you should still be able to call card.io directly, as I gather you were previously doing.

dgoldman-pdx commented 9 years ago

Glad you worked it out, @dharmikvyas!

hagile commented 9 years ago

@stefanbund , have you ever found a work around for this? @dgoldman-ebay , sir, you're still unclear on to the question, question was simple, we're using latest PayPal iOS SDK, once we take user cc information, it'll comes here, - (void)userDidProvideCreditCardInfo:(CardIOCreditCardInfo )info inPaymentViewController:(CardIOPaymentViewController )paymentViewController what will be the next step once we're here?

dgoldman-pdx commented 9 years ago

@hagile you can start by calling into the PayPal iOS SDK, and let that SDK give the user the option of providing a credit card. Then the credit card information will be sent directly to PayPal for processing.

But if you instead call directly into the card.io SDK to directly obtain credit card information, as it sounds like you are doing, then you have bypassed the PayPal iOS SDK. You now have credit card information, which you are welcome to forward to whatever payment service you wish. However, if you wish to forward this information to PayPal for processing, the PayPal iOS SDK cannot help you with this task.

hagile commented 9 years ago

@dgoldman-ebay, oh that was a oouch, that means, as I've cc information form card.io, I can't pass it to PayPal sdk to complete a payment? if this is true, we're only having PayPal for payment, how do I take cc information directly in PayPal? And yes, thanks for the quick response ! :+1:

dgoldman-pdx commented 9 years ago

@hagile if you are using PayPal to handle all payments, then you do not need to call card.io directly. You should instead call into the PayPal iOS SDK, as described here.

hagile commented 9 years ago

I guess, setting acceptCardInfo to YES will do the trick?

dgoldman-pdx commented 9 years ago

If you mean _payPalConfiguration.acceptCreditCards = YES;, then yes, that is correct.

hagile commented 9 years ago

oh yes, this is. :+1: Thank you so much.

mitesh1301 commented 8 years ago

@dgoldman-ebay i am following this discussion.i also use Card-io for payment integration.My question is same do i able to proceed further after i am getting information from Card-io with PayPal final payment.

if yes then how can i pass this information to the PayPal iOS SDK. i also recheck this line of code in my application _payPalConfiguration.acceptCreditCards = YES;

However, if you wish to forward this information to PayPal for processing, the PayPal iOS SDK cannot help you with this task.

if its so then i think i should drop Card-Io from my application. i just want to confirm this.

Looking for your reply

dgoldman-pdx commented 8 years ago

@mitesh1301 if I am understanding you correctly, then yes - you should drop the card.io-iOS-SDK from your application, and use only the PayPal-iOS-SDK (which already includes its own copy of card.io).

mitesh1301 commented 8 years ago

@dgoldman-ebay Thanks for quick reply. so now i have confusion related to PayPal-iOS-SDK. As you mention it has inbuilt card.io copy. I am not that much familiar with that. Can you explain it in some more detail like how i can get that? Also does that resolve my problem i.e. scan card information and proceed further with paypal?

Looking for your reply

dgoldman-pdx commented 8 years ago

@mitesh1301 if you integrate the PayPal-iOS-SDK, and you leave _payPalConfiguration.acceptCreditCards set to YES (which is the default value for this property), then when you present a PayPalPaymentViewController (as described here) the user will be given the option of paying with a credit card. If they choose that option, then the card.io scanner will appear. Their credit card information will then be processed by PayPal.

mitesh1301 commented 8 years ago

Hay dgoldman-ebay, thanks for your reply and from that i am able to solve the problem. thanks

dgoldman-pdx commented 8 years ago

Glad to hear it, @mitesh1301!