Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paypal_processor docs #10

Open
fallingsprings opened this issue Dec 8, 2015 · 2 comments
Open

paypal_processor docs #10

fallingsprings opened this issue Dec 8, 2015 · 2 comments

Comments

@fallingsprings
Copy link
Contributor

Page: http://docs.couchcms.com/tags-reference/paypal_processor.html

Documentation is missing one of the available variables: pp_custom.

Also missing on the PayPal overview page:
http://docs.couchcms.com/concepts/paypal.html

@cheesypoof
Copy link
Member

I am not familiar with this functionality, could you confirm @kksidd?

@fallingsprings
Copy link
Contributor Author

The paypal_button tag accepts "custom" as a parameter and paypal_processor sets "pp_custom" as a variable. I'm not sure about the cart addon.

couch/tags.php, line 4627:

        function paypal_button( $params, $node ){
            global $CTX, $FUNCS, $PAGE;
            if( count($node->children) ) {die("ERROR: Tag \"".$node->name."\" is a self closing tag");}

            extract( $FUNCS->get_named_vars(
                        array(
                              'image'=>'',
                              'processor'=>'',
                              'show_shipping'=>'0',
                              'return_url'=>'',
                              'cancel_url'=>'',
                              'custom'=>''
                              ),
                        $params)
                   );

couch/tags.php, line 4768:

// Set paypal variables in context
$CTX->set( 'pp_item_name', $_POST['item_name'] );
$CTX->set( 'pp_item_number', $_POST['item_number'] );
$CTX->set( 'pp_quantity', $_POST['quantity'] );
$CTX->set( 'pp_mc_gross', $_POST['mc_gross'] );
$CTX->set( 'pp_mc_currency', $_POST['mc_currency'] );
$CTX->set( 'pp_txn_id', $_POST['txn_id'] );
$CTX->set( 'pp_receiver_email', $_POST['receiver_email'] );
$CTX->set( 'pp_payer_email', $_POST['payer_email'] );
$CTX->set( 'pp_first_name', $_POST['first_name'] );
$CTX->set( 'pp_last_name', $_POST['last_name'] );
$CTX->set( 'pp_payer_business_name', $_POST['payer_business_name'] );
$CTX->set( 'pp_custom', $_POST['custom'] );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants