• Resolved cr42yd

    (@cr42yd)


    Hello,

    i found your post ( link ) for multible paypal accounts.

    I insert the snippet code from github forum into the plugin “My Custom Functions” and changed the form ID and the email to my form ID and the “second” paypal email.

    But its not working. If the paypal checkout opens, the normal papypal adress is still the same like in the frontend from ur plugin.

    Can u help me?

    Sry for my bad english 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter cr42yd

    (@cr42yd)

    ok i think i found the problem. We need an paypal buisness account for it. Is there a fix to use normal papyal acc?

    Plugin Author Devin Walker

    (@dlocc)

    @cr42yd – The snippet should still work fine and you shouldn’t have to have a PayPal business account for it to work. You should simply have two separate PayPal Standard accounts.

    Can you share the snippet you have in place so I can test and see if it works on my end?

    Thread Starter cr42yd

    (@cr42yd)

    Hello,
    thats the snippet i got from github:

    <?php
    /**
    * Multiple PayPal Standard Accounts
    *
    * Modify the paypal business email on a per form basis.
    * This allows you to create separate donation forms per paypal “business” aka nonprofit cause.
    *
    * @param $paypal_args
    * @param $payment_data
    *
    * @return array $paypal_args
    */
    function my_custom_multiple_paypal_accounts( $paypal_args, $payment_data ) {
    $form_id = isset( $payment_data[‘post_data’][‘give-form-id’] ) ? $payment_data[‘post_data’][‘give-form-id’] : ”;
    // If this form is ID ‘144’ then we customize the email for it.
    if(‘144’ === $form_id ) {
    // Customize the email address for this form’s email
    $paypal_args[‘business’] = ‘mypaypal@email.com’;
    }
    // Always return the paypal args.
    return $paypal_args;
    }
    add_filter( ‘give_paypal_redirect_args’, ‘my_custom_multiple_paypal_accounts’, 10, 2 );

    I changed the 144 from “if(‘144’ === $form_id )” to my form id 2595.
    Also changed ‘mypaypal@email.com’ to ‘myemail@myemail.com’
    But still got the paypal adress from plugin backend if i press the paypal donate button from form “2595”.

    Thx for help

    Plugin Author Devin Walker

    (@dlocc)

    Hey @cr42yd – I just tested and on my end again and the snippet it worked as I expect it to. Try removing the if statement entirely to see if that works for all forms. If not, perhaps the “My Custom Functions” plugin doesn’t have that snippet activated?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Paypal Multible Account issue’ is closed to new replies.