08 2024
This commit is contained in:
parent
04d677d37a
commit
bfa3bb1df4
1191 changed files with 637397 additions and 10619 deletions
|
|
@ -27,10 +27,9 @@ namespace App\Http\Controllers\Pay;
|
|||
use App\Http\Controllers\Controller;
|
||||
use App\Models\PaymentTransaction;
|
||||
use App\Models\ShoppingPayment;
|
||||
use App\Services\MyLog;
|
||||
use App\Services\Payone;
|
||||
use Illuminate\Http\Request;
|
||||
use Util;
|
||||
use Yard;
|
||||
|
||||
|
||||
class PayoneController extends Controller
|
||||
|
|
@ -45,6 +44,7 @@ class PayoneController extends Controller
|
|||
private $default = [];
|
||||
|
||||
private $personalData = [];
|
||||
private $aboInitPayment = [];
|
||||
|
||||
private $method = [];
|
||||
private $prepayment = [];
|
||||
|
|
@ -54,6 +54,8 @@ class PayoneController extends Controller
|
|||
private $deliveryData = [];
|
||||
|
||||
|
||||
|
||||
|
||||
// private $payment_method;
|
||||
private $urls = [];
|
||||
|
||||
|
|
@ -95,8 +97,14 @@ class PayoneController extends Controller
|
|||
"amount" => $amount, // amount in smallest currency unit, i.e. cents
|
||||
"currency" => $currency,
|
||||
"param" => $this->shopping_order->id,
|
||||
|
||||
];
|
||||
//init Abo
|
||||
if($this->shopping_order->is_abo){
|
||||
$this->aboInitPayment = [
|
||||
'recurrence'=>'recurring',
|
||||
'customer_is_present'=>'yes'
|
||||
];
|
||||
}
|
||||
|
||||
$this->shopping_payment = ShoppingPayment::create([
|
||||
'shopping_order_id' => $this->shopping_order->id,
|
||||
|
|
@ -106,6 +114,8 @@ class PayoneController extends Controller
|
|||
'reference' => $this->reference,
|
||||
'amount' => $amount,
|
||||
'currency' => $currency,
|
||||
'is_abo' => $this->shopping_order->is_abo,
|
||||
'abo_interval' => $this->shopping_order->abo_interval,
|
||||
'mode' => $this->shopping_order->mode,
|
||||
]);
|
||||
|
||||
|
|
@ -222,7 +232,7 @@ class PayoneController extends Controller
|
|||
"wallettype" => "",
|
||||
'onlinebanktransfertype' => "",
|
||||
"request" => "authorization",
|
||||
"pseudocardpan" => $ret['cc']['pseudocardpan']
|
||||
"pseudocardpan" => $ret['cc']['pseudocardpan'],
|
||||
//"xid" => "3-D Secure transaction ID"
|
||||
];
|
||||
}
|
||||
|
|
@ -230,14 +240,14 @@ class PayoneController extends Controller
|
|||
}
|
||||
|
||||
public function onlyPaymentResponse(){
|
||||
$request = array_merge($this->default, $this->personalData, $this->deliveryData, $this->method, $this->prepayment, $this->urls);
|
||||
$request = array_merge($this->default, $this->personalData, $this->deliveryData, $this->method, $this->aboInitPayment, $this->prepayment, $this->urls);
|
||||
$response = Payone::sendRequest($request);
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function ResponseData(){
|
||||
|
||||
$request = array_merge($this->default, $this->personalData, $this->deliveryData, $this->method, $this->prepayment, $this->urls);
|
||||
$request = array_merge($this->default, $this->personalData, $this->deliveryData, $this->method, $this->aboInitPayment, $this->prepayment, $this->urls);
|
||||
//RECHNUNG MIV
|
||||
if($this->shopping_payment->clearingtype === 'fnc' && $this->shopping_payment->onlinebanktransfertype === 'MIV'){
|
||||
|
||||
|
|
@ -336,14 +346,25 @@ class PayoneController extends Controller
|
|||
|
||||
|
||||
if($response['status'] === 'PENDING'){
|
||||
var_dump($response);
|
||||
MyLog::writeLog(
|
||||
'payone',
|
||||
'error',
|
||||
'Error:1000 Status PENDING App\Http\Controllers\Pay\PayoneController::ResponseData response status PENDING',
|
||||
$response
|
||||
);
|
||||
die();
|
||||
//txid
|
||||
//Payment process ID (PAYONE)
|
||||
//userid
|
||||
//Debtor ID (PAYONE)
|
||||
}
|
||||
die("error");
|
||||
MyLog::writeLog(
|
||||
'payone',
|
||||
'error',
|
||||
'Error:1001 Der Zahlungsanbieter ist nicht erreichbar, die Zahlung konnte nicht durchgeführt werden. App\Http\Controllers\Pay\PayoneController::ResponseData error no response status',
|
||||
$response
|
||||
);
|
||||
abort(403, 'Der Zahlungsanbieter ist nicht erreichbar, die Zahlung konnte nicht durchgeführt werden. Bitte versuchen Sie es später erneut. Fehlercode: 1001');
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -365,7 +386,6 @@ class PayoneController extends Controller
|
|||
return Payone::sendRequest($request);
|
||||
}
|
||||
|
||||
|
||||
public function checkBankAccount($data, $amount, $currency, $shopping_user)
|
||||
{
|
||||
$this->shopping_user = $shopping_user;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue