vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   $this->type & 2Checkout Paid Subscription (https://vborg.vbsupport.ru/showthread.php?t=295720)

Captain Tycoon 03-03-2013 05:10 PM

$this->type & 2Checkout Paid Subscription
 
Hi everyone,

I'm pretty much almost finished coding the IPN for 2Checkout's Paid Subscriptions.

Although I'm unsure as to where I'm going wrong with this problem:

I set the $this->type to 2 when a payment is refunded which as a result disables the subscription. However, the 'state' in the 'paymenttransaction' table does not change to 2, it remains to whatever it's already set to.

Although this doesn't pose much of a problem, considering it does correctly disable the subscription, but for logging and management purposes, I'd want to see why it was disabled in the first place and be aware of who reversed payments, which can be done by knowing the state (2) is 'Reversed'.

Should setting $this->type = 2 in the appropriate place on the class_2checkout.php file automatically update the 'state' in the 'paymenttransaction' table or is there more to it?

If the transaction doesn't exist, it will INSERT the correct state along with the other data.

Any help will be highly appreciated.

--------------- Added [DATE]1362340607[/DATE] at [TIME]1362340607[/TIME] ---------------

I'm currently going around this with:
Code:

$this->registry->db->query_first("UPDATE " . TABLE_PREFIX . "paymenttransaction SET state = 2 WHERE transactionid = ".$this->transaction_id."");
Which is run when $this->type = 2; is set in class_2checkout.php

I'd like some put if anyone has any idea, on whether this is the best method and/or if it should automatically update it just by setting the this->type


All times are GMT. The time now is 03:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03528 seconds
  • Memory Usage 1,707KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete