if (!
empty($checkData['checkPayment'
]['sErrorMessages'
]) ||
empty($checkData['sProcessed'
])) { $this->
View()->
assign('sErrorFlag',
$checkData['checkPayment'
]['sErrorFlag'
]);
$this->
View()->
assign('sErrorMessages',
$checkData['checkPayment'
]['sErrorMessages'
]);
$this->
forward('shippingPayment'
);
return;
} // Save payment method details to db
if ($checkData['sPaymentObject'
] instanceof BasePaymentMethod
) { $checkData['sPaymentObject'
]->
savePaymentData(Shopware()->
Session()->
get('sUserId'
),
$this->
Request());
} // Save the payment info
$customerData =
Shopware()->
Modules()->
Admin()->
sGetUserData();
if (!\
is_array($customerData)) { throw new RuntimeException('Could not get customer data'
);
} $previousPayment =
$customerData['additional'
]['user'
]['paymentID'
];
$previousPayment =
$this->admin->
sGetPaymentMeanById($previousPayment);
if ($previousPayment['paymentTable'
]) {