hostdark Posted April 29, 2015 Share Posted April 29, 2015 I am attempting to fix an issue within the bitcoin module since WHMCS does not provide one; however, I am receiving this issue: Transaction List: /http://gyazo.com/e9a61a84b3438d7d36f6e9b454ad8e96.png Gateway Log: /http://gyazo.com/19794219634b947df37bcc1f01428483.png The invoice is marked as paid, but the gateway log is missing, as is the transaction list payment method. The code is below; $json = json_decode($HTTP_RAW_POST_DATA); $invoice_id = checkCbInvoiceID($invoice_id,$GATEWAY["name"]); # Checks invoice ID is a valid invoice number or ends processing // skipping code that is not needed for this ticket # Successful # [url]http://docs.whmcs.com/API:Update_Invoice[/url] - add BTC currency conversion in invoice notes $command = "updateinvoice"; $values["invoiceid"] = $invoice_id; #changeme $values["notes"] = "BTC:{$total_btc_cents}; > USD:{$total_native_cents};"; #changeme $results = localAPI($command,$values,$adminuser); //addInvoicePayment($invoice_id,$trans_id,$amount,$fee,$gatewaymodule); # Apply Payment to Invoice: invoiceid, transactionid, amount paid, fees, modulename $command = "addinvoicepayment"; $values["invoiceid"] = $invoice_id; $values["transid"] = $trans_id; $values["amount"] = $amount; $values["fees"] = $fee; $values["gateway"] = $GATEWAY['name']; $results = localAPI($command,$values,$adminuser); logTransaction($GATEWAY["name"],$json,"Successful"); # Save to Gateway Log: name, data array, status I have tried adding this piece, but this piece of code changed nothing. $command = "addtransaction"; $values["invoiceid"] = $invoice_id; $values["description"] = "Bitcoin Payment"; $values["amountin"] = $amount; $values["fees"] = $fee; $values["paymentmethod"] = $GATEWAY['name']; $values["transid"] = $trans_id; $values["date"] = date("d/m/Y"); $results = localAPI($command,$values,$adminuser); 0 Quote Link to comment Share on other sites More sharing options...
hostdark Posted April 29, 2015 Author Share Posted April 29, 2015 Nevermind, resolved the issue. Actually decided to recode quite a bit so I published it in a git at https://github.com/fanta8897/whmcs-coinbase 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.