Giter Club home page Giter Club logo

mpay24-laravel's People

Contributors

stefanpolzer avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

mpay24-laravel's Issues

"Undefined variable: name" when setting 'BillingAddr' object

Hi,

I have set up the Order object while following the mPAY24 docs. Now as a last step I wanted to fill the BillingAddr object, but when I try to submit the order, before I get forwarded to the payment page, Laravel throws:

ErrorException (E_NOTICE)
Undefined variable: name

error

my pay function:

public function pay(Request $request) {
      $cart = Cart::content();
      $mpay24 = app()->mpay24;
      $mdxi   = app()->mpay24order;

      // dd($cart);

      $mdxi->Order->Tid                   = "1";
      $mdxi->Order->Price                 = Cart::total();

      $mdxi->Order->BillingAddr->setMode("ReadOnly");
      $mdxi->Order->BillingAddr->Name     = 'George';
      $mdxi->Order->BillingAddr->Email    = '[email protected],';
      $mdxi->Order->BillingAddr->Phone    = '3334444555';
      $mdxi->Order->BillingAddr->Street   = 'Foo Street';
      $mdxi->Order->BillingAddr->Zip      = '999';
      $mdxi->Order->BillingAddr->City     = 'Foo City';
      $mdxi->Order->BillingAddr->Country  = 'Foo Country';

      $mdxi->Order->URL->Success      = 'http://mysite.com/success';
      $mdxi->Order->URL->Error        = 'http://mysite.com//error';
      $mdxi->Order->URL->Confirmation = 'http://mysite.com//confirmation';

      $paymentPageURL = $mpay24->paymentPage($mdxi)->getLocation(); // redirect location to the payment page
      return redirect()->to($paymentPageURL);
}

if I comment out the BillingAddr part, the payment gets forwarded to mPAY24, but obviously this is not what I want.

Btw when I open Mpay24Order at line 75, I can't see any refrence to $name.
What could be wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.