Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. <?
  2.  
  3. $customerId = "";
  4. $cardId = "";
  5. $stripeAccountId = "";
  6.  
  7. $amount = 100;
  8.  
  9. $token = \Stripe\Token::create(array(
  10. "customer" => $customerId,
  11. "card" => $cardId,
  12. ), array(
  13. "stripe_account" => $stripeAccountId
  14. )
  15. );
  16.  
  17. $charge = \Stripe\Charge::create(array(
  18. "amount" => $amount,
  19. "currency" => "USD",
  20. "description" => "Payment Test",
  21. "source" => $token->id,
  22. ), array(
  23. "stripe_account" => $stripeAccountId,
  24. )
  25. );
  26.  
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement