Closed sathiyad closed 5 years ago
Check config, you might have missed adding.
Ref : https://github.com/anandsiddharth/laravel-paytm-wallet#configuring
@anandsiddharth I checked it still getting the same error.
steps I have done.
bootstrap\app.php
since I am using Lumen.config\services.php
<?php
return array(
'paytm-wallet' => [
'env' => 'local',
'merchant_id' => 'paytmTestID',
'merchant_key' => 'paytmTestKey',
'merchant_website' => 'mysite.com',
'channel' => 'WEB',
'industry_type' => 'Retail',
],
);
controller code in here.
public function initiatePay(Request $request){
$payTMwallet = PaytmWallet::with('receive');
$payTMwallet->prepare([
'order' => 123,
'user' => 11111,
'mobile_number' => '77777 77777',
'email' => 'some@email.com',
'amount' => '10',
'callback_url' => 'http://LocalCalbackURL'
]);
return $payTMwallet->receive();
}
still getting the same error
MID missing: This attribute is not passed. It is a mandatory attribute
In Lumen, services not registered by default. After adding the following line of code in bootstrap\app.php
It works.
$app->configure('services');
Getting the error message for the following code,
Which return an HTML page and which automatically submit and return this error. http://i.prntscr.com/UQMIJb55S26WYwCJ1GjmYg.png