Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

PAP integration debugging ?

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
12 years 2 months ago - 12 years 2 months ago #214614 by activha
PAP integration debugging ? was created by activha
Following a post dated several months ago in which we discovered problems with PAP and IPN, we still have problems with this integration
see post

Cookies are properly set in our domains, affiliate parent are correctly retrieved in the registration process by a code that we added thanks to post 214328 but sale tracking does not occur in PAP

All integrations, data, settings are ok in CBsubs but nothing is registered in PAP when using a gateway with IPN

We tried with the dummy gateway and all was properly tracked and correct commissions inputed in PAP

Is there a way to debug this ? and find out why there is no tracking ? is there a way to pass the affiliate id that we get on the registration page to your integration ?

thanks
Last edit: 12 years 2 months ago by activha.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
12 years 2 months ago - 12 years 2 months ago #214632 by krileon
Replied by krileon on topic Re: PAP integration debugging ?
We pull the cookie PAPVisitorId for the affiliate ID. We then store it straight to the parameters of the basket and retrieve it once the status of the basket is successfully paid. You should see this stored as "postafpro_affiliateid" in the "integrations" column of _cbsubs_payment_baskets table when reviewing the row of your current basket.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 12 years 2 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
12 years 1 month ago #216431 by activha
Replied by activha on topic Re: PAP integration debugging ?
Thank you for the information.

Some of our users will have the cookie in their browsers coming from an affiliate page, but some will get a manual code with this ID

Then we need to overwrite this affiliate ID by the manual value provided on the registration form by our users who have got this ID manually and not inherited from a cookie.

Could you tell me how to do it ?

I have a cb field ready for this and need to pass it to your integration , how can I do it ?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
12 years 1 month ago - 12 years 1 month ago #216437 by krileon
Replied by krileon on topic Re: PAP integration debugging ?
As I understand you're passing the affiliate ID in the URL instead of letting PAP redirect and create a cookie? If this is the case you should be able to use CB Auto Actions in a Code action with the registration form display trigger using PHP to set the cookie PAPVisitorId with the affiliate ID using a GET substitution (e.g. [get_affiliateid]). Example of this entire usage as follows.

Type: Code
Triggers: onBeforeRegisterFormDisplay
Access: Everybody
Conditional 1: [get_affiliateid] Not Empty
Method: PHP (create_function)
Code:
Code:
cbimport( 'cb.session' ); CBCookie::setcookie( 'PAPVisitorId', urlencode( '[get_affiliateid]' ) );
Return: Silent

If you need it to be handled from a field a user completes on registration the below should also work.

Type: Code
Triggers: onStartSaveUserRegistration
Access: Everybody
Conditional 1: [cb_affiliateid] Not Empty
Method: PHP (create_function)
Code:
Code:
cbimport( 'cb.session' ); CBCookie::setcookie( 'PAPVisitorId', htmlspecialchars( '[cb_affiliateid]' ) );
Return: Silent

With the above I used a very early trigger in the registration process in hopes the cookie can be set before CBSubs takes affect so it'll see it.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 12 years 1 month ago by krileon.

Please Log in or Create an account to join the conversation.

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
12 years 1 month ago #216439 by activha
Replied by activha on topic Re: PAP integration debugging ?

krileon wrote: If you need it to be handled from a field a user completes on registration the below should also work.

With the above I used a very early trigger in the registration process in hopes the cookie can be set before CBSubs takes affect so it'll see it.


Yes this is exactly what we need, but I need a fail action also.

The cookie is already set or not by a redirect and PAP, it is stored in cb_afid which is hidden, by an auto action on before registration form display

The user while on the registration form can write another affiliate ID manually in cb_newafid field

How can I check that this cb_newafid exists in the database using DB lookup field (which is not working in ajax), then use it with your code above if it exists, and use the other cb_afid if the new one is a fake one or does not exist ?

Thanks

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
12 years 1 month ago #216440 by krileon
Replied by krileon on topic Re: PAP integration debugging ?
If cb_afid is an actual field and not just a hidden input added by code or in a delimiter field then just copy the action that acts on a field and have the first 1 check cb_afid and the second one check cb_newafid. They both already check if the value is empty or not. I don't know what to tell you in regards to DB Lookup as I didn't develop it so I don't quite know how it works exactly.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum