stefanpolzer / mpay24-laravel Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
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
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?
Hi,
I try to use your package but composer throws:
Could not find package mpay24/mpay24-laravel at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.