Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Join Date
    Mar 2007
    Posts
    250
    Plugin Contributions
    6

    Default Re: Opaya PI (formerly sagepay) Integration woes

    Thought i'd carry on down the line of a seperate form to get over the sagepay.js eventlistener submit.

    Button click initiates the form, which gets the post info that i want back from opayo, and sends it to a file as below:

    Code:
       
    <form name="opayo" id="opayo" target="output_frame" onsubmit="return checkout();"  action="/includes/modules/pages/checkout_payment/opayo.php"method="post" > 
        <button id="card-button" type="click" hidden></button></form>
    </form>
    <iframe name="output_frame" src="" id="output_frame" width="0" height="0">
    </iframe>

    in the /includes/modules/pages/checkout_payment/opayo.php there is just a line to grab the info and write to session, but the session value isn't being written.
    Any ideas to overcome? As soon as session can be grabbed, module will be working as desired.

    Code:
    ///get the post card identifier from opayo
    $_SESSION['card-identifier'] =$_POST['card-identifier'];

    the onsubmit="return checkout();" simply calls the requestsubmit method to proceed to confirmation page

    Code:
     function checkout(){
      document.forms["checkout_payment"].requestSubmit();   
     }

  2. #12
    Join Date
    Mar 2007
    Posts
    250
    Plugin Contributions
    6

    Default Re: Opaya PI (formerly sagepay) Integration woes

    ok, so digging into the intricacies of javascript forms.... found out that the onsubmit fires before the action, so the call was being made to goto next page and was loading before the post data had returned to place into the session, so was never seen. quite hard to find during debug as when checking if the post page was getting the response, it of course was...

    so just added a short time wait to the function


    Code:
      function checkout(){
       setTimeout(() => {   document.forms["checkout_payment"].requestSubmit(); }, 1500);
     }

  3. #13
    Join Date
    Mar 2007
    Posts
    250
    Plugin Contributions
    6

    Default Re: Opaya PI (formerly sagepay) Integration woes

    Happy to report had this up and running really well for a month now on 2 different sites and both the applepay express checkout button (auto account creaction etc), and the PI form are working well. I'll spend some time to get packaged up and will submit for upload.

  4. #14
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,751
    Plugin Contributions
    124

    Default Re: Opaya PI (formerly sagepay) Integration woes

    Thank you! This will be useful for UK users.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v157 Sagepay / Opaya payments option?
    By BeePud in forum Addon Payment Modules
    Replies: 0
    Last Post: 6 Feb 2021, 04:10 PM
  2. v154 Official Sagepay Integration - PHP Warning: Illegal string offset 'id'
    By mikemc24 in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 17 Aug 2017, 07:00 AM
  3. v155 Sagepay Form Integration [Support Thread]
    By wilt in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 1 Jan 2016, 05:51 PM
  4. v139h SagePay and Sage50 integration
    By christospur in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 3 Dec 2012, 07:42 PM
  5. GPay (formerly GunPay)
    By MaDd0g in forum Addon Payment Modules
    Replies: 0
    Last Post: 12 Jun 2010, 02:04 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR