Jump to content

Coinbase WHMCS?


hostdark

Recommended Posts

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);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated