Jump to content

twikamltd

Members
  • Content count

    21
  • Joined

  • Last visited

Community Reputation

0 Neutral

About twikamltd

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. So it's definitely Worldpay pay methods being sent to the Stripe gateway in our case, I modified the Stripe gateway (don't ask how) to check for Worldpay Futurepay IDs and return as declines instead, and now the payment cron is fine. In other words, there's a logic bug somewhere else in the WHMCS code allowing this to happen.
  2. So one thing I've been able to see is: If an invoice is set to Stripe, but the client only has a different pay method saved, with a token ID for Worldpay Futurepay in our case (and yes the pay method is set to Worldpay Futurepay), then the cron still tries to use that Worldpay FP pay method with the Stripe gateway and that is causing the failure. I'm now loathed to remove all Worldpay pay methods as I've spent a couple of days making sure everything looks perfect in the database.
  3. If you just want to dump all your tokens to see if there's any weird ones. Can't find any in ours. <?php // Include WHMCS for API functions include('init.php'); $table = "tblpaymethods"; $fields = "id,userid"; $result = select_query($table,$fields); while ($data = mysql_fetch_array($result)) { // Get pay methods if client exists $command = 'GetPayMethods'; $postData = array( 'clientid' => $data['userid'], 'paymethodid' => $data['id'] ); $pm_results = localAPI($command, $postData); //print_r($pm_results); echo "PMID: ".$data['id']." token: ".$pm_results['paymethods'][0]['remote_token']. "\n"; }
  4. Same issue here. What I'm seeing is the cus_ token gets converted to the JSON version with a method added after a successful manual capture from the admin area. If the card is declined that doesn't happen though, which is to be expected. What I can't see is which it's tripping up on. I've verified the tblpaymethods, tblcreditcards and tblbankaccts tables are all clean and look ok, and also removed any paymethods which had no cus_ tokens.
  5. Hi John, Thank you for your reply, I'm aware of all that though. I need a quick way to migrate the cards to the pay method system though, as existing ones aren't being processed on the cron. Accessing the client summary page for every client isn't an option due to the sheer number of clients. There must be a file I can include and a function I can call to do that on a loop, please can you tell me what it would be?
  6. I see this has been renamed to "Custom Stripe Module Migration Question", but it's not is it? Does anyone know the internal function to be called to trigger the pay method migration for a client other than looking at the admin side client summary? I need to script it for thousands of users.
  7. So we were running 7.7.whatever the latest version was, with our own stripe module based on roudiapp, no custom templates or hooks etc. Switched to using the WHMCS stripe module, all ok as we used the cus_ in gatewayid field. Updated to 7.8.2 and we're basically crippled. When viewing a client, every client suddenly had 2 saved cards when viewed, a Worldpay futurepay and a Stripe one, as those 2 gateways are active. However, most are stripe IDs. The only way to process anything was to disable Worldpay so that clients had 1 pay method showing, however even those show as Card-XXXX and wrong expiry date. We process hundreds of payments a day, now the cron run isn't processing any at all and we're having to do them manually. This is an absolute disgrace, we've never experienced such a poorly tested, broken WHMCS upgrade, how do we fix this please?
  8. Hi Guys, Have written a file for Stripe to fire customer.source.updated webhooks at, and update the card expiry and last 4 if changed. However it doesn't actually update WHMCS at all. Wonder if anyone can help? <?php // Init WHMCS require('/home/xxxxx/public_html/init.php'); // Retrieve the request's body and parse it as JSON $input = @file_get_contents("php://input"); $event_json = json_decode($input); //$event_json->data->object->exp_month //$event_json->data->object->exp_year //$event_json->data->object->last4 //$event_json->data->object->customer // Which customer is this if(substr($event_json->data->object->customer,0,3) == 'cus'){ // Find customer ID for API call later $result = select_query( 'tblclients', 'id', array( 'gatewayid' => $event_json->data->object->customer ) ); $data = mysql_fetch_array( $result ); $customer_id = $data['id']; // Format the card details to the what WHMCS API wants as per https://developers.whmcs.com/api-reference/updateclient/ $new_exp_month = sprintf("%02d", $event_json->data->object->exp_month); $new_exp_year = $event_json->data->object->exp_year; $new_last4 = $event_json->data->object->last4; $cardExpiry = $new_exp_month.substr($new_exp_year, -2); // Update WHMCS with new card expiry details, use ***** to pad out card number $command = 'UpdateClient'; $postData = array( 'action' => 'UpdateClient', 'clientid' => $customer_id, 'expdate' => $cardExpiry 'cardnum' => '************'.$new_last4 ); $adminUsername = 'xx'; $results = localAPI($command, $postData, $adminUsername); } http_response_code(200); echo "Done:<br /><br />";print_r($results); echo "<br /><br />\$new_exp_month = ".$new_exp_month; echo "<br /><br />Local API call data: <br />"; print_r($postData); ?> Tried just limiting it to the expiry date, same thing, API call returns success but doesn't update anything.
  9. twikamltd

    New Gocardless module

    That's the mandate creation, not cancellation.
  10. twikamltd

    New Gocardless module

    It cancels it immediately at Gocardless, but it's the Gocardless webhook which tells WHMCS to delete it from the database, not the action of clicking the button.
  11. twikamltd

    New Gocardless module

    Whoops, have updated it with the .sql file to run to create the 2 tables required.
  12. twikamltd

    New Gocardless module

    No idea sorry, only ever tried it with UK DD.
  13. twikamltd

    New Gocardless module

    It should be ok, it's a copy of our live module, we've modified it a bit since posting but any problems just reply here and I'll sort it out.
  14. twikamltd

    Automatic Update - Cron Issue

    I'm getting this too on multiple installations, crons seem knackered after the 7.1 update, have opened a ticket. Makes you wonder if they even test this stuff.
  15. This module is designed for the new style Gocardless accounts/API only, where you create read/write tokens and configure multiple webhooks. There's no test mode as DD's aren't instant so might as well test with live details. It uses the new API, so if you've had your GC account upgraded, then you'll need to create new tokens and webhooks. It can handle multiple events per callback as per the API spec. Was initially based on a public module, but doesn't bear much resemblance to it anymore, and doesn't use any Gocardless provided PHP libraries. Comes with a dedicated page in the client area to create/view/cancel direct debits. Download Enjoy, any feedback/fixes appreciated.
×

Important Information

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