How to add a custom payment page & options

Discussion in 'Tips and tricks' started by vladmedv, Jan 23, 2015.

  1. vladmedv

    vladmedv New Member

    Joined:
    Jan 18, 2015
    Messages:
    26
    Likes Received:
    23
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    frm.mwz likes this.
  2. dodgedesigns

    dodgedesigns Member

    Joined:
    Jun 9, 2016
    Messages:
    49
    Likes Received:
    22
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    How are you handling the csrf_token piece? Being hard coded in the file you gave out wont validate it.

    Error 400!
    The CSRF token could not be verified.

    EDIT: This resolved itself automatically, I dont have an explanation as to why.
     
    Last edited: May 3, 2017
  3. Tasti

    Tasti New Member

    Joined:
    May 12, 2018
    Messages:
    12
    Likes Received:
    3
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    While i appreciate the effort and everything. Can't someone just upload a complete workup, for us to just edit, and make our own preferences to, instead of us having to redo everything.
     
  4. andyweaver

    andyweaver New Member

    Joined:
    May 2, 2019
    Messages:
    8
    Likes Received:
    0
    S.E:
    2019-11-01 05:19:25
    L.T:
    Regular
    L.C:
    1
    Hi Guys having issues with step 2 replacing "the _addMenuItems() method from PagesExt.php file with this code." because as you can see here http://prntscr.com/nxt322 this is what have before i replace the code and when i do actually replace the code http://prntscr.com/nxt3tn the only thing i get on the sidebar is this: http://prntscr.com/nxt3gg

    The other problem i have is i went ahead and ignored that part and carried on so i created the html page etc however when i click the order now button, it brings up the payment options but then when i click proceed to checkout it simply redirects me back to the /customer/index.php/pages so im at a loss guys

    Any help would be appreciated.
     
    Last edited: Jun 5, 2019
  5. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,354
    Likes Received:
    2,406
    @andyweaver - let's take this one issue at a time.
    The _addMenuItems looks correct to me. Can you add here your entire extension in a zip file so i can see it entirely and test it in a dev?
     
  6. andyweaver

    andyweaver New Member

    Joined:
    May 2, 2019
    Messages:
    8
    Likes Received:
    0
    S.E:
    2019-11-01 05:19:25
    L.T:
    Regular
    L.C:
    1
    Hi
    Please find attached.

    The redirect issue i have fixed as it was a javascript issue in my html template, removed that and all fixed but the first problem which u can find the zip file attached is still there.
     

    Attached Files:

  7. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,354
    Likes Received:
    2,406
    checking
     
  8. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,354
    Likes Received:
    2,406
    Okay, so here's what happens in my dev once i add and enable this extension:
    Screenshot 2019-06-05 16.48.39.png
    So it is working perfectly fine as far as i can see.

    Do you have other extensions that alter the menu, which might conflict ?
     
  9. andyweaver

    andyweaver New Member

    Joined:
    May 2, 2019
    Messages:
    8
    Likes Received:
    0
    S.E:
    2019-11-01 05:19:25
    L.T:
    Regular
    L.C:
    1
  10. andyweaver

    andyweaver New Member

    Joined:
    May 2, 2019
    Messages:
    8
    Likes Received:
    0
    S.E:
    2019-11-01 05:19:25
    L.T:
    Regular
    L.C:
    1
  11. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,354
    Likes Received:
    2,406
    @andyweaver - nah, something has to be off there. Open a ticket and include backend url and logins and also ftp access so i can see what is going on.
     
  12. Nick Thacke

    Nick Thacke New Member

    Joined:
    Aug 29, 2019
    Messages:
    24
    Likes Received:
    4
    S.E:
    2020-02-27 13:39:18
    L.T:
    Regular
    L.C:
    1
    This is great! Thanks for putting it all together, vladmedv!

    The only question I have is that I notice that the "Purchase" button says "Purchase" even when I have already purchased a package. The old way changed the button text to "This is your current package." Is there a way to add that code back in?

    Thanks!
     

Share This Page