CBsubs trigger order

5 years 2 months ago #310090 by krileon
Replied by krileon on topic CBsubs trigger order

If the auto action is set to trigger on Completed, Processed and also Pending, will it mean that it will fire twice or maybe three times ?

Yes.

One for the first pending state and the second time for the Completed state for instance ?

Correct.

and if yes how can we avoid this to get only ONE outside invoice ?

I recommend whatever you're using to generate your invoices check if the invoice already exists or not before creating it.

For instance setting first payment to 180 € and recurring ones to 144 € and using the OnCpayAfterPaymentStatusUpdate sends only 144 as payment_gross or mc_gross to our API for invoicing with the attached code.

Those will always be the amount the basket paid. You can grab the recurring amount from mc_amount3.

Does it mean that this is not the correct trigger to use ?

That event fires anytime the payment state changes for a basket. I'm guessing it's the one you need to use, but there's also onCPayUserStateChange for when a users subscription state changes. onCPayUserStateChange however doesn't come with the basket object and only has the subscription object.


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 to join the conversation.

5 years 2 months ago #310091 by activha
Replied by activha on topic CBsubs trigger order
Well I see that's not very easy to implement from our side to have a correct and easy invoicing system based on all this.

Do you have news on Beat work regarding invoicing ? I thought he was supposed to bring something new a few months ago

Please Log in to join the conversation.

5 years 2 months ago #310096 by krileon
Replied by krileon on topic CBsubs trigger order

Do you have news on Beat work regarding invoicing ?

No, the planned improvement is generating an invoice for recurring payments. As invoices are tied to baskets it's a massive change. I'll be honest we don't yet know the best way to approach this yet and have discussed it several times. There's massive risk in altering this behavior so we're trying to be careful about it. As the ticket for this doesn't contain private data I've moved it to the public CBSubs tracker.

forge.joomlapolis.com/issues/6647


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.165 seconds

Facebook Twitter LinkedIn