create/integrate payment gateway plugin

Discussion in 'Payments processing' started by mohd_zahari, Jul 26, 2012.

  1. mohd_zahari

    mohd_zahari New Member

    Joined:
    Jun 26, 2012
    Messages:
    3
    hi .
    i have integrate with my payment gateway account and successful..
    so problem here is after payment complete the user account product still not active and manually approve by admin..:(
    how can i integrate IPN?
    anyone can help?please..:(

    //my sample IPN post
    class Am_Paysystem_Transaction_Yourps_Ipn extends Am_Paysystem_Transaction_Incoming
    {
    public function validateSource()
    {
    // there must be some code to validate if IPN came from payment system, and not from a "hacker"
    return true;
    }
    public function validateStatus()
    {
    // there must be code to check post variables and confirm that the post indicates successful payment transaction
    return true;
    }
    public function findInvoiceId()
    {
    // it takes invoiceId from request as sent by payment system
    return $this->request->getFiltered('invoiceId); } public function getUniqId() { // take unique transaction id from yourps IPN post return $this->request->get('psReceipt'); } public function validateTerms() { // compare our invoice payment settings, and what payment system handled // if there is difference, it is possible that redirect url was modified // before payment return ($this->request->get('vp') == $this->invoice->first_total) && ($this->request->get('sp') == $this->invoice->second_total); } }
  2. mohd_zahari

    mohd_zahari New Member

    Joined:
    Jun 26, 2012
    Messages:
    3
    seems no one answer :rolleyes: ..after try and try again.. :cool:
    finally i have done!:D
  3. antonio

    antonio New Member

    Joined:
    Aug 8, 2012
    Messages:
    1
    Hello,
    It's possible to you post how you solve this because im having the same problem.
    Thanks,
    Antonio
  4. mohd_zahari

    mohd_zahari New Member

    Joined:
    Jun 26, 2012
    Messages:
    3
    hi..
    when i reffer http://www.amember.com/docs/API/Paysystem seem something wrong at cooding
    return $this->request->getFiltered('invoiceId);
    (you should change to)return $this->request->getFiltered('invoiceId');

Share This Page