Hi everyone, I need help to combine [1]. send exact amount to 3rd party smart contract address while sending [2]. depositing exact amount to my contract. any one have tried it before? Below is the sample of my codes that I tried but not working

Hi everyone, I need help to combine [1]. send exact amount to 3rd party smart contract address while sending [2]. depositing exact amount to my contract. any one have tried it before?
Below is the sample of my codes that I tried but not working.

constructor(address _thirdSC) payable {
owner = payable(msg.sender);
thirdSC = payable(_thirdSC);
thirdSCFee = 1 ether;
ticketPrice = 1 ether;
}
function deposit() public payable{
require(msg.value == ticketPrice,"");
payable(thirdSC).transfer(thirdSCFee); //I want this one to be auto deduct on top of the ticket price amount. 
payable(address(this)).transfer(ticketPrice);// This is the base amount for ticketPrice.
}
receive() external payable{
require(msg.value == ticketPrice,"");
payable(thirdSC).transfer(thirdSCFee); //I want this one to be auto deduct on top of the ticket price amount. 
payable(address(this)).transfer(ticketPrice);// This is the base amount for ticketPrice.
}

Hey @awesomeivan can you please format your code to make it more readable?
Also can you reformulate your question?

Hi, what I want is to combine the 2 transactions when calling deposit function on the smart contract. first is the user will transfer exact amount to the specific address(3rd contract address), second is to deposit exact amount to main contract where the user is calling deposit function.

Hi @everyone, An update for this project. kindly head over on this page if you want to contribute or be hired. spot still open. I need someone to verify and publish my smart contract on bscscan and fix any sc errors.(paid)