PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, November 15, 2022

[FIXED] how to pass name and address in laravel cashier to stripe?

 November 15, 2022     laravel-6.2, laravel-cashier, stripe-payments     No comments   

Issue

Iam using stripe through laravel cashier.when using charge method

$stripeCharge = $user->charge(100, $paymentMethod,[
          'customer' => 'test',
          'description' => 'test description',
          'amount' => 2000,
          "name"=>"kjdkjdksdsd"
]);

I got this error 'Received unknown parameter: name'. When trying to do transaction without name getting the error 'Export transactions require a customer name and address'. I tried with shipping address too.

"shipping"=> [
            'address'=>[
      "line1"=> "hjkjhjhhjj",
      "line2"=> null,
      "postal_code"=>"44424",
      "state"=> null
            ],
            "name"=> "erferwer"
          ],

but still got the same error. Anyone can help me with correct format for passing name and address in laravel cashier


Solution

This looks like you're trying to create Export charges from India. To do so, there are some requirements you must meet. Note that one of the requirements is a Customer billing address, so you will need to create a customer. Shipping address can go there as well, or directly on the charge.



Answered By - Nolan H
Answer Checked By - Candace Johnson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing