• Content count

  • Joined

  • Last visited


About thehub

  • Rank
    IPB Newbie
  1. 4.0 - File Storage

    Great stuff!! S3 support will be fantastic along with a neatly abstracted storage layer :) Suddenly scaling out is made a whole lot easier. Looking forward to this! 
  2. Address labels

  3. Custom Payment Gateway Documentation..

    I'd also logged a ticket and received a reply similar to the above suggesting posting in the Mod Development forum. Rather than starting a new thread I figured I'd add to the call to update the documentation and some of the understanding I've gained ito creating a gateway. Using the existing documentation, reflection, serialization and some guesswork I've been able to put together a very simple gateway using a "Pay Now" button similar to the already existing PayPal standard gateway. Here's some very basic "code" with comments showing any insights I've gained. Using this "bare minimum" framework I was able to get my button working (but not seamlessly enough to put into production) class gateway_payfast extends gatewayCore { function payScreen() { // Build the button html to be displayed when user selects this Gateway // Usually this would include your merchant / account details along with the transaction details in hidden fields which are posted when the button is pressed // You can get the transaction details (e.g. amount, item, name, etc. from the variables available via gatewayCore: // $this->invoice - gives you the current Nexus invoice object // I've guessed the name's of the basic properties below which map to what's stored in the database table 'nexus_invoices' // - $this->invoice->title // - $this->invoice->total // There is also customer information (e.g. email, first name, last name and all standard IPB memberdata) available via $this->invoice. This was evident when outputting the results of serialize($this->invoice) // However I could guess the property names to access the customer info // $this->transaction - gives you the current Nexus transaction ID (int) $button_html = "<INSERT BUTTON HTML HERE>" return array( 'button' => $button_html ) ; } function validatePayment() { // In the button html you would have specified a return_url which the gateway provider redirects to once the transaction has been processed // e.g. index.php?app=nexus&module=payments&section=receive&validate={key} which calls this function // Depending on your provider, certain variables would be returned here indicating the transaction status // These can be retrieved and assessed to build the return parameters for this function // Using the return params, Nexus will finalize the transaction appropriately (e.g. transaction success or fail) // Example / pseudo code // ------------------------------- // $temp_trans_status = $_REQUEST('provider_status_variable'); // if ($temp_trans_status == 'SUCCESS_INDICATOR') { // $trans_status == 'okay'; } // else { // $trans_status == 'fail'; } // $trans_id = $_REQUEST('provider_transaction_id_variable'); return array( $trans_id, $trans_status, ""); } } What would help me is further detail of what methods and properties are available via $this->invoice
  4. Gallery 4.0 - Slightly more than a sneak peek

    Great stuff Matt! Loving the clean Flickr-esk look. Such an improvement! :thumbsup: