Jump to content

UrDrive

Clients
  • Posts

    22
  • Joined

  • Last visited

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by UrDrive

  1. 1 minute ago, Sonya* said:

    Try to add

    
    $invoice->original_invoice = 0;

     

    Thank you for your reply, I actually just fixed it by saving the invoice first and then marking it as paid.

     

    <?php
    require $_SERVER['DOCUMENT_ROOT'] . '/community/init.php';
    
    \IPS\Session\Front::i();
    	
    $member = \IPS\Member::loggedIn();
    
    $package = \IPS\nexus\Package::load( 26 ); 
    
    $invoice = new \IPS\nexus\Invoice;
    $invoice->member = \IPS\Member::load( $member->member_id );
    $invoice->currency = "USD";
    $invoice->title = $package->title;
    $invoice->total = $package->price();
    $item = $package->createItemForCart( $package->price() ); 
    $invoice->addItem( $item );
    $invoice->save();
    
    $invoice->markPaid();
    ?>

     

  2. I am trying to create an Invoice with a Regular Product Purchase (No Renewal, Lifetime Purchase, No Shipping Required) when someone calls an external php script however, it is failing due to 

    Quote

    INSERT INTO `nexus_purchases` ( `ps_active`, `ps_start`, `ps_renewal_price`, `ps_renewal_currency`, `ps_invoice_pending`, `ps_invoice_warning_sent`, `ps_member`, `ps_name`, `ps_app`, `ps_type`, `ps_item_id`, `ps_custom_fields`, `ps_original_invoice`, `ps_tax`, `ps_extra`, `ps_show` ) VALUES ( true, 1606777260, 0, '', 0, false, 1, 'TEST DONT BUY', 'nexus', 'package', 26, '[]', NULL, 0, 'null', 1 )
    IPS\Db\Exception: Column 'ps_original_invoice' cannot be null (1048)
    #0 /var/www/html/community/system/Db/Db.php(948): IPS\_Db->preparedQuery('/*community::co...', Array)
    #1 /var/www/html/community/system/Patterns/ActiveRecord.php(487): IPS\_Db->insert('nexus_purchases', Array)
    #2 /var/www/html/community/system/Node/Model.php(2389): IPS\Patterns\_ActiveRecord->save()
    #3 /var/www/html/community/applications/nexus/sources/Invoice/Invoice.php(1800): IPS\Node\_Model->save()
    #4 /var/www/html/community/website/licencekeys/activate.php(16): IPS\nexus\_Invoice->markPaid()
    #5 {main}

     

    My Script

    require $_SERVER['DOCUMENT_ROOT'] . '/community/init.php';
    
    \IPS\Session\Front::i();
    	
    $member = \IPS\Member::loggedIn();
    
    $package = \IPS\nexus\Package::load( 26 ); 
    
    $invoice = new \IPS\nexus\Invoice;
    $invoice->member = \IPS\Member::load( $member->member_id );
    $invoice->currency = "USD";
    $invoice->title = $package->title;
    $invoice->total = $package->price();
    $item = $package->createItemForCart( $package->price() ); 
    $invoice->addItem( $item );
    $invoice->markPaid();
    $invoice->save();

     

  3. 7 minutes ago, Stuart Silvester said:

    This was reported as a bug and is fixed in an upcoming release (most likely beta 11)

    Have any clue what code I have to change to fix it? I could go hunting for it too, it just seems unusual.

  4. I'm trying to write a Notifications API since the current Rest API returns older notifications first.

     

    When writing my API, it returns invalid titles and member groups however it is returning the correct object.

     

    Quote
    
    Array
    (
        [title] => 7b0f102e25645147e708442f4b2812b9
        [url] => IPS\Http\Url\Friendly Object
            (
                [base] => front
                [seoTemplate] => warn_view
                [seoTitles] => Array
                    (
                        [0] => jojojod
                    )
    
                [friendlyUrlComponent] => profile/141353-jojojod/warnings/307
                [isInternal] => 1
                [isFriendly] => 1
                [seoPagination] => 
                [url:protected] => https://maverickcheats.net/community/profile/141353-jojojod/warnings/307/
                [data] => Array
                    (
                        [scheme] => https
                        [host] => maverickcheats.net
                        [port] => 
                        [user] => 
                        [pass] => 
                        [path] => /community/profile/141353-jojojod/warnings/307/
                        [query] => 
                        [fragment] => 
                    )
    
                [queryString] => Array
                    (
                    )
    
                [hiddenQueryString] => Array
                    (
                        [app] => core
                        [module] => system
                        [controller] => warnings
                        [do] => view
                        [id] => 141353
                        [w] => 307
                    )
    
            )
    
        [content] => 
        [author] => IPS\Member Object
            (
                [_data:protected] => Array
                    (
                        [member_id] => 74283
                        [member_group_id] => 6
                        [skin] => 13
                        [warn_level] => 
                        [warn_lastwarn] => 0
                        [language] => 1
                        [restrict_post] => 0
                        [bday_day] => 
                        [bday_month] => 
                        [bday_year] => 
                        [msg_count_new] => 0
                        [msg_count_total] => 17
                        [msg_count_reset] => 1596377006
                        [msg_show_notification] => 0
                        [last_visit] => 1596370628
                        [last_activity] => 1596377012
                        [mod_posts] => 0
                        [auto_track] => {"content":0,"comments":0,"method":"immediate"}
                        [temp_ban] => 0
                        [mgroup_others] => 11,9,10
                        [members_profile_views] => 922
                        [members_day_posts] => 0,0
                        [notification_cnt] => 0
                        [pp_last_visitors] => {"25281":1595956752,"199208":1595964795,"140406":1596069964,"3572":1596207866,"199435":1596220237}
                        [pp_main_photo] => monthly_2020_07/imported-photo-74283.png.c522adf4d210d46469ae15bc96696abe.png
                        [pp_main_width] => 
                        [pp_main_height] => 
                        [pp_thumb_photo] => monthly_2020_07/imported-photo-74283.thumb.png.2b46a5eed94eac91b0ac8df5a85c5b2a.png
                        [pp_thumb_width] => 
                        [pp_thumb_height] => 
                        [pp_setting_count_comments] => 1
                        [pp_reputation_points] => 6
                        [pp_photo_type] => custom
                        [signature] => <div></div>
                        [pconversation_filters] => 
                        [pp_customization] => 
                        [timezone] => Europe/London
                        [pp_cover_photo] => monthly_2020_02/83246.jpg.7eb1b724cb0206eea8e3155e21b41ffe.jpg
                        [profilesync] => {"photo":{"handler":3,"ref":"4d9b8bc44038ce8d7c7762fd7bf85ffc","error":null}}
                        [profilesync_lastsync] => 1596330970
                        [allow_admin_mails] => 1
                        [members_bitoptions2] => 6161
                        [create_menu] => {"menu_key":1396789933,"menu":{"member_status":{"link":"https:\/\/maverickcheats.net\/community\/index.php?app=core&module=status&controller=ajaxcreate","title":"status_update","flashMessage":"saved","extraData":{"data-ipsdialog-remotesubmit":true,"data-ipsDialog":true,"data-role":"updateStatus"}},"announcement":{"link":"https:\/\/maverickcheats.net\/community\/modcp\/announcements\/?action=create","title":"add_announcement","extraData":{"data-ipsDialog":true}},"topic":{"link":"https:\/\/maverickcheats.net\/community\/submit\/","extraData":{"data-ipsDialog":true,"data-ipsDialog-size":"narrow"},"title":"select_forum"}}}
                        [members_disable_pm] => 0
                        [marked_site_read] => 1595333533
                        [pp_cover_offset] => 140
                        [acp_skin] => 13
                        [acp_language] => 1
                        [member_title] => 
                        [member_posts] => 53
                        [member_last_post] => 1596370774
                        [member_streams] => 
                        [photo_last_update] => 1594846237
                        [mfa_details] => {"authy":{"id":214208428,"setup":true},"onetouch":{"id":"ef07c3b0-b6f6-0138-852b-0acd7e35ef1b","time":1596377038}}
                        [failed_mfa_attempts] => 0
                        [permission_array] => 
                        [cm_credits] => {"USD":"0.00"}
                        [cm_no_sev] => 0
                        [cm_return_group] => 3
                        [idm_block_submissions] => 0
                        [completed] => 1
                        [cjdml_exclude] => 0
                        [cjdml_exclude_note] => 
                        [HWID] => 04D8-A824-558B-DC97-FC58-051B-9A0A-3915
                        [HWID_Resets] => 3
                    )
    
                [_new:protected] => 
                [changed] => Array
                    (
                    )
    
                [skipCloneDuplication] => 
            )
    
        [unread] => 1
    )
    try
    {
    	$row = \IPS\Notification\Inline::constructFromData( \IPS\Db::i()->select( '*', 'core_notifications', 'member=' . $_GET['member_id'] . ' AND read_time IS NULL' )->first() );
    }
    catch( \UnderflowException $e )
    {
    	// error handling here - unable to find transaction
    }
    
    try
    {
    	if (method_exists( $row, 'getData' ) )
    	{
    		$ourData = $row->getData();
    		
    		print_r($ourData);
    	}
    	else
    	{
    		$ourData = array();
    	}
    }
    catch( \LogicException $e )
    {
    	$ourData = array();
    }

     

  5. IPS\brilliantdiscord\RateLimit\RateLimitedException::0


    #0 /var/www/html/community/init.php(820) : eval()'d code(57): IPS\brilliantdiscord\_RateLimit::limitHandle('guilds/{guild.i...', '632299403591548...', Object(Closure))
    #1 /var/www/html/community/system/Theme/Theme.php(847) : eval()'d code(150): IPS\brilliantdiscord_hook_member->discordMember()
    #2 /var/www/html/community/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_brilliantdiscord_front_invites->accept(Object(IPS\brilliantdiscord\Invite), Object(IPS\Http\Url\Friendly), Object(IPS\brilliantdiscord\LoginHandler), Array, Object(IPS\Http\Url\Friendly), Object(IPS\Http\Url\Friendly), false, false)
    #3 /var/www/html/community/applications/brilliantdiscord/modules/front/xinvites/invite.php(73): IPS\Theme\_SandboxedTemplate->__call('accept', Array)
    #4 /var/www/html/community/system/Dispatcher/Controller.php(96): IPS\brilliantdiscord\modules\front\xinvites\_invite->manage()
    #5 /var/www/html/community/applications/brilliantdiscord/modules/front/xinvites/invite.php(47): IPS\Dispatcher\_Controller->execute()
    #6 /var/www/html/community/system/Dispatcher/Dispatcher.php(152): IPS\brilliantdiscord\modules\front\xinvites\_invite->execute()
    #7 /var/www/html/community/index.php(13): IPS\_Dispatcher->run()
    #8 {main}

  6. I have your Duplicate Logger Application, I noticed this today.

    LinoyR shows an alt called Linoy

    Linoy shows an alt called LinoyR

     

    Anyway to change this?
    Duplicates like this will fill the table up quickly and make it harder to sort through new duplicates and this is annoying.

    image.thumb.png.8ae84a62dc9f682e147f9c5c6ef87791.pngLinoy

×
×
  • Create New...