Results 1 to 3 of 3

Thread: Custom Payment on Advert (Final Value Fee)

  1. #1
    Thread Starter
    Expired Customer pacificblue's Avatar
    Join Date
    Jan 2014
    Location
    United Kingdom
    Posts
    8
    Thanks
    0
    Thanked 2 Times in 1 Post

    Custom Payment on Advert (Final Value Fee)

    I'm after some advice... The pricing model I'm going to use for Classipress is free listings with a Final Value fee to obtain contact details for the buyer.
    To keep this thread simple, the work has been done to make Classipress work this way, by integrating a moderated user messaging plugin.
    We will know when an offer is made and can offer that the seller pays the Final Value Fee to obtain contact details of the buyer.

    I need to utilise the Payments API to create a payment against the advert. I've found the code in step 3 and propose to use it on a custom payment page, modifying it:

    $order = appthemes_new_order();
    $order->add_item( CP_FINAL_VALUE_FEE, $final_value_fee, $post_id ); // Add CP_FINAL_VALUE_FEE to add_theme_support 'app-payments'
    do_action( 'appthemes_create_order', $order );

    echo html( 'h3', __( 'Payment', APP_TD ) );
    echo html( 'p', __( 'Please wait while we redirect you to our payment page.', APP_TD ) );
    echo html( 'p', html( 'small', __( '(Click the button below if you are not automatically redirected within 5 seconds.)', APP_TD ) ) );
    cp_js_redirect( "Custom thank you Page URL", __( 'Continue to Payment', APP_TD ) );

    I'd also have to add support to payments.php with accompanying code to update a custom field Final_Value_Fee_Paid

    add_action( 'appthemes_transaction_completed', 'cp_payments_handle_finalvaluefee_completed' );
    add_action( 'appthemes_transaction_activated', 'cp_payments_handle_finalvaluefee_activated' );

    Am I heading in the right direction? I don't want to start until I'm sure I won't cause problems anywhere else or have missed something.

    Many thanks

    John

  2. #2
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,098
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Rolf Hassel (Samcy)

  3. #3
    Thread Starter
    Expired Customer pacificblue's Avatar
    Join Date
    Jan 2014
    Location
    United Kingdom
    Posts
    8
    Thanks
    0
    Thanked 2 Times in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: December 12th, 2013, 12:01 PM
  2. ClassiPress 3.1 Final released!!
    By bellboy in forum ClassiPress General Discussion
    Replies: 39
    Last Post: July 21st, 2011, 11:16 PM
  3. 3.1 final bug
    By itsme in forum ClassiPress General Discussion
    Replies: 11
    Last Post: July 17th, 2011, 08:49 AM
  4. expected final release
    By spymare in forum ClassiPress General Discussion
    Replies: 15
    Last Post: July 10th, 2011, 08:23 AM