Enhance payment processing by adding VAT number handling and updating transaction retrieval logic. Refactor user role migration script for improved role assignments and streamline software tool functionality with maintenance mode checks and UI updates.
This commit is contained in:
@@ -29,6 +29,7 @@ $payment_provider = $post_content['payment_provider'] ?? $user_data['payment_pro
|
||||
$item_price = $user_data['item_price'] ?? null; // Price without VAT
|
||||
$tax_amount = $user_data['tax_amount'] ?? 0; // VAT amount
|
||||
$payment_amount = $user_data['payment_amount'] ?? null; // Total including VAT
|
||||
$vat_number = $user_data['vat_number'] ?? null; // VAT number
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// STEP 1: Get equipment data from serial_number
|
||||
@@ -328,8 +329,8 @@ try {
|
||||
$partner_product = json_encode(array("salesid"=>$partner->salesid,"soldto"=>$partner->soldto), JSON_UNESCAPED_UNICODE);
|
||||
|
||||
$sql = 'INSERT INTO transactions (txn_id, payment_amount, tax_amount, payment_status, payer_email, first_name, last_name,
|
||||
address_street, address_city, address_state, address_zip, address_country, account_id, payment_method, accounthierarchy, created)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
|
||||
address_street, address_city, address_state, address_zip, address_country, account_id, payment_method, accounthierarchy, created, vat_number)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?)';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([
|
||||
$txn_id,
|
||||
@@ -347,7 +348,8 @@ try {
|
||||
$serial_number,
|
||||
$payment_method_id, // 0 = Mollie, 1 = PayPal
|
||||
$partner_product,
|
||||
date('Y-m-d H:i:s')
|
||||
date('Y-m-d H:i:s'),
|
||||
$vat_number
|
||||
]);
|
||||
|
||||
// Get the database ID
|
||||
|
||||
Reference in New Issue
Block a user