strangerstudios / pmpro-sponsored-members

Generate a discount code for a main account holder to distribute to sponsored members.
https://www.paidmembershipspro.com/add-ons/pmpro-sponsored-members/
15 stars 27 forks source link

Applying seat cost to initial payment doesn't go through in PayPal Express #72

Closed JarrydLong closed 4 years ago

JarrydLong commented 4 years ago

Replicating the issue:

  1. Setup a membership level for $0.02. No recurring payments
  2. Add in the below code to your customizations plugin
    $pmprosm_sponsored_account_levels = array(
        //set 5 seats at checkout
        4 => array(
            'main_level_id' => 4,       //redundant but useful
            'sponsored_level_id' => array(5),   //array or single id
            'seats' => 4,
            'seat_cost' => 0.03,
            'max_seats' => 25,
            'apply_seat_cost_to_initial_payment' => true,
        ),

    );
  1. Proceed to the levels page and purchase the relevant level (choose how many seats).
  2. Head on over to PayPal. If you chose 2 seats, your total should come to $0.08 ($0.02 initial + 2 seats * $0.03).
  3. Checkout with PayPal. You'll see that the $0.08 reflects on the confirmation email, PMPro Orders
  4. The value however doesn't reflect on the PayPal invoice and will only reflect $0.02 instead of $0.08

Also based on this topic: https://www.paidmembershipspro.com/forums/topic/sponsored-members-add-on-plug-in-5

Environment tested on:

  1. WordPress V5.4
  2. PMPro V2.2.6
  3. PMPro Sponsored Members V0.6.3
  4. Payment gateway set to PayPal Express on a live site.
andrewlimaza commented 4 years ago

This has been fixed AFAIK in latest version I'm working on.

andrewlimaza commented 4 years ago

This works with v0.8 release.