Jump to content

Waqas Saeed

Member
  • Content Count

    23
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Waqas Saeed

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @brian! brilliant it resolved my issue overall. because we want to track those customers who are paying us with 3rd payment gateway. and it will not react to manual payment also. that is overall the best thing happened. I wish there could be some special hook in future that can able to return a html or javascript on successful payment attempt.
  2. Am using a callback file that redirects to the invoice page. What if I can use some kind of parameters in callback ? Could you help me know to get the values of $_GET into template ? so I can see if the purchase is valid from callback . @Kian
  3. How do we know if the customer is not refreshing the screen ? how to control the refresh ?
  4. the following script contains facebook conversion code, it works fine and also pixel is able to note the purchases but the problem appear when the user refresh the page many times. eventually, the facebook count the purchases. instead of the one that happened once after payment redirect from the gateway, the callback url returns to the invoice page directly. somehow, if we can restrict the script to count if it is redirected from only callback url only. {if $status eq "Paid" || $paymentSuccessAwaitingNotification || $paymentSuccess || $paymentInititated} {assign var=total_amt value=$total|replace:'PKR':''|replace:' ':''} <!-- Facebook Pixel Code --> {literal} <script> !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','https://connect.facebook.net/en_US/fbevents.js'); fbq('init', 'xxxxxx'); // Insert your pixel ID here. fbq('track', 'Purchase', { currency: 'PKR', value: '{/literal}{$total_amt}{literal}', }); </script> {/literal} <!-- DO NOT MODIFY --> <!-- End Facebook Pixel Code --> {/if}
  5. Am bit satisfied from this; 'ShoppingCartCheckoutOutput' works little better with facebook pixel. What about OrderPaid hooks but you are right that it does not return output. Could you suggest a way out ? @Kian
  6. @steven99 thanks, does it supports <<<HTML HTML; ? or echo to track conversion facebook conversion ?
  7. Hook: ShoppingCartCheckoutCompletePage if the user is redirected to the invoice, will it works also ?
  8. @Inetbiz am in love with your script. it good works. @cyberhostpro May I know if you can help me with this ? if am doing that it makes the interruption in redirection (to HTML invoice) after checkout. Hook code : : <?php if (!defined("WHMCS")) die("This file cannot be accessed directly"); function facebookPixelCheckOut() { $pixelID1 = "843460539109207"; $codepixel = "<script> !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','//connect.facebook.net/en_US/fbevents.js'); fbq('init', '".$pixelID1."'); fbq('track', \"InitiateCheckout\"); </script> <noscript> <img height=\"1\" width=\"1\" style=\"display:none\" src=\"https://www.facebook.com/tr?id=".$pixelID1."&ev=InitiateCheckout&noscript=1\" />"; //echo $codepixel; } //add_hook("ClientAreaPageViewInvoice",1,"facebookPixelCheckOut"); //add_hook("AfterShoppingCartCheckout",0,"facebookPixelCheckOut"); ?> AfterShoppingCartCheckout redirects to the invoice page. unfortutnely., it shows the blank screen if the above hook is enabled. 2) How to check with {if } statement in HTML invoice with tags to find out if the invoice is being viewed as client, and also logged in as admin too
  9. @Kian thanks buddy, oh! I didn't got the goodie bag . 😞 Anyways, I'm new to WHMCS code, framwork What to do here if I want this script to run. Could you help me using my code to run at the point where it can return/echo without interrupting the redirect. the point the customer completes the checkout and receives the unpaid invoice.
  10. <?php if (!defined("WHMCS")) die("This file cannot be accessed directly"); function facebookPixelCheckOut() { $pixelID1 = "843460539109207"; $codepixel = "<script> !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','//connect.facebook.net/en_US/fbevents.js'); fbq('init', '".$pixelID1."'); fbq('track', \"InitiateCheckout\"); </script> <noscript> <img height=\"1\" width=\"1\" style=\"display:none\" src=\"https://www.facebook.com/tr?id=".$pixelID1."&ev=InitiateCheckout&noscript=1\" />"; echo $codepixel; } //add_hook("ClientAreaPageViewInvoice",1,"facebookPixelCheckOut"); add_hook("AfterShoppingCartCheckout",0,"facebookPixelCheckOut"); ?> Hello. This conversion works but if user click on the button Check Out, it shows blank page to user, and after user refresh the page it shows the page. What is causing due to hook that it is bringing up the blank page. but no error.
  11. {if $status eq "Paid" || $paymentSuccessAwaitingNotification || $paymentSuccess || $paymentInititated} If am logged in as a admin it also fired, and What to add in the code if customer refreshes again and again.
  12. If we redirect using javascript window.location.replace ? Will it possibly not logout the client if customer is already signin?
  13. Is it the right method to redirect from 3rd payment back to clientarea or view invoice > else if($ResponseCode == '124'||$ResponseCode == '210') { logTransaction($gatewayParams['name'], $_POST, "Payment Pending."); ?> <script> location.replace("<?php echo $CONFIG['SystemURL'].'/viewinvoice.php?id='.$invoiceId.'&paymentpending=true'; ?>") </script>
  14. Better version of my english :-) Work Flow : Through Pay Now button, the user is redirected to the 3rd party payment method, after the successful payment the 3rd party method send back the user to the invoice page, it is the simple flow that works as other 3rd party gateways. the callback redirects the user to the e.g. URL : ... /viewinvoice.php?id=1962&paymentpending=true&paymentToken=421896182 Where is the problem ? the problem occurs if the user is redirected to login page instead of the invoice page, after the successful or not successful payment they are landed to the login page, and the user has to re-login to see either the payment is successful or not. When it is not created: if the user set the Remember Me, it does not create issues for the customer for the above problem. Please help with Solution : How to keep the user logged in for long period of time. or keeping the remember me always open for customer who are paying for invoice. or what is the issue. Please also let me know if the javascript redirection is causing the issue ? php session is 24min at this moment.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated