We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4966
    • 143 Posts
    I would like to register a new user but only if their credit card is accepted. I tried several ways of doing this including writing sql but none have worked. Here is partial code. It looks like it should be easy to call webloginpe register if the credit card is accepted else output message from authorize net. BTW, I'm using Authorize Net AIM.

    $response = $transaction->authorizeAndCapture();

    if ($response->approved) {
    echo "<h1>Success! The test credit card has been charged!</h1>";
    echo "Transaction ID: " . $response->transaction_id;

    //$modx->runSnippet('webLoginPE?',array(lang=>`en`,''','',''));

    } else {
    echo $response->error_message;
    }
      • 4966
      • 143 Posts
      Anyone?
        • 1343 ☆ A M B ☆
        • 2,213 Posts
        It sounds like you want SubscribeMe for Revolution, granted it changes your usergroup on payment vs registering on payment.
          Patrick | Server Wrangler
          About Me: Website | Tweets |  MODX Hosting
          • 4966
          • 143 Posts
          thanks but not using Revolution.

          I did rewrite the one portion using runSnippet but still no success.

          $response = $transaction->authorizeAndCapture();

          if ($response->approved) {
          echo "<h1>Success! The test credit card has been charged!</h1>";
          echo "Transaction ID: " . $response->transaction_id;
          echo $_POST['username'] = 'bobjones';
          $_POST['full name'] = 'bobjones';
          $_POST['email'] = '[email protected]';
          $adduser = $modx->runSnippet ('WebLoginPE?', array (
          '&type'=> 'register',
          '&regType'=> 'instant',
          '&regSuccessId' => '57',
          '&regSuccessPause' => '1',
          '&groups' => 'LoggedInUsers',
          ));