Have reviewed your install. The PHP in your auto action isn't functional. Things like the following are not valid.
Code:
$basket = $variables->getCurrentBasket();
$payment = $variables->getPayment();
$variables is an array of variables sent by the trigger. They increment from left to right. This is all shown under the Global tab for the onCPayAfterPaymentStatusChange trigger. Specifically the following.
Code:
var1 = &$user
var2 = &$paymentBasket
var3 = &$subscriptions
var4 = $unifiedStatus
var5 = $previousUnifiedStatus
var6 = $occurrences
var7 = $autorecurring_type
var8 = $autorenew_type
So for example your PHP should just be the following.
Code:
$basket = $variables['var2'];
As for the below. That function does not exist.
Code:
$payment = $variables->getPayment();
You should see this information with examples in the trigger fieldset under the Global tab. As for your query auto action you're trying to substitute in things that do not exist.
Code:
(
'[USER_ID]',
'[INVOICE_ID]',
'[PLAN_ID]',
'[INVOICE_NO]',
'[TRANSACTION_ID]',
'paid',
UTC_TIMESTAMP(),
'[DATE_PAID]',
'[ADDRESS_COUNTRY]',
'[CURRENCY]',
'[TOTAL_PRICE]',
'[TAX_AMOUNT]',
'[TOTAL_PRICE]',
'paypal',
'autoaction'
);
The only substitution here that's valid is [user_id]. You need to retrieve the rest of that information from variables. So that query is probably failing depending on the structure of the table. Especially datetime columns since you're basically trying to set its value to a non-datetime string since the substitution [DATE_PAID] doesn't exist. This is specifically why I was instructing you to test with an Email action. It helps confirm everything is working to pinpoint the problem.
Based off the above you're needing payment data from like 3 different tables. A basket contains multiple payment items. So getting plan id doesn't make sense. There could be 3 plans in a basket or 3 plans in a payment. The best I can provide is the following. var2 being a payment basket object isbasically just a row in the _cbsubs_payment_baskets database table. So what information you see there you can easily retrieve with substitutions.
Code:
(
'[user_id]',
'[var2_invoice]',
# '[PLAN_ID]', this doesn't exist in _cbsubs_payment_baskets as a basket can contain multiple plans
# '[INVOICE_NO]', this is redundant to INVOICE_ID
'[var2_txn_id]',
'paid',
UTC_TIMESTAMP(),
'[var2_time_paid]',
'[var2_address_country]', # is the full country need or country code? if code use [var2_address_country_code]
'[var2_mc_currency]',
'[var2_mc_gross]',
'[var2_tax]', # this isn't guaranteed and can be NULL
# '[TOTAL_PRICE]', this is redundant to TOTAL_PRICE
'paypal',
'autoaction'
);
I don't really know what to suggest at this point. I don't know what information is supposed to be vital to this table or why this is necessary given CBSubs > Payments view. If you need plan id for example then you need to log an entry per-plan so that would be subscription state change and not payment basket state change and if you're needing that then using CBSubs SQL Actions will be the by far simplest solution since it has CBSubs substitutions that can get a bunch of the information you're needing.