0

I have a Stripe account which already has a platform.It's already done with OAuth and the Api returns me access_token etc.My question is.Payum bundle makes payment with stripe.js or stripe checkout but payment with Stripe's Platform is different.How can I make payment through Stripe's Platform with PayumBundle (I need PayumBundle).?Here is a simple doc

\Stripe\Stripe::setApiKey(PLATFORM_SECRET_KEY);
\Stripe\Charge::create(array(
  'amount' => 1000,
  'currency' => 'usd',
  'source' => {TOKEN},
  'destination' => {CONNECTED_STRIPE_ACCOUNT_ID}
));

what TOKEN is this? Is it a current transaction token or the token which OAuth has given me during connection?

Hazarapet Tunanyan
  • 2,809
  • 26
  • 30

1 Answers1

0

Token is the token from Stripe.js / Stripe Checkout. Source is the credit card / payment method to charge, hence it is the token from Stripe.js/Checkout.

Connected_Stripe_Account_ID is the stripe_user_id / account id you obtained from the oAuth connection

Matthew Arkin
  • 4,460
  • 2
  • 27
  • 28
  • But Why Do I need to type a card again? I am already connected to the platform.All I need to do, is to click on 'pay', it will redirect me to stripe's payment (to logged account),and user will not type a card again, he/she only clicks pay. Even if I use it by that way, How do I make it with PayumBundle.? – Hazarapet Tunanyan Aug 17 '15 at 14:56
  • When you click on Pay, you shouldn't be redirect to Stripe's URL, at most you'd get a pop up. When you click pay the customer should be asked to enter their credit card information not to log into to Stripe. The connected account is to send money to not take money from. – Matthew Arkin Aug 17 '15 at 15:22
  • I think you have seen how paypal makes payment.I click on pay button,it redirects me to paypal page where I don't type any card nubmer or something else.I only log in and click pay.My card number and other things were already filled to form..isn't it right? – Hazarapet Tunanyan Aug 17 '15 at 15:25
  • Stripe doesn't support redirecting customers to Stripe's URL for payment. Payment info gets collected on your site using Stripe.js / Stripe Checkout. Stripe.js/Checkout will provide you a token that you send to your server-side code that you use for payment. – Matthew Arkin Aug 17 '15 at 15:28
  • Does It mean, the user has to type card details every time he wants to pay? If I have created a connection (Stripe platform),Can't I transfer money between stripe's account not to type card details every time? – Hazarapet Tunanyan Aug 17 '15 at 15:40
  • You'd only use Stripe Connect if you want to pay other people. Your users would only have Stripe accounts if they want to receive funds for goods they sell or services they provide. You can use Stripe customers to securely save a customer's payment information in your Stripe account and then you can charge the customer as you wish. https://stripe.com/docs/tutorials/charges#saving-credit-card-details-for-later – Matthew Arkin Aug 17 '15 at 15:47