CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute »
  • Community Contributed Payment Processors »
  • CiviCRM 2.0.7 - changing recurring contribution details for Payjunction
Pages: [1]

Author Topic: CiviCRM 2.0.7 - changing recurring contribution details for Payjunction  (Read 5668 times)

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
CiviCRM 2.0.7 - changing recurring contribution details for Payjunction
January 13, 2009, 05:33:07 am
Hello:

  We're using CiviCRM 2.0.7 (Drupal 5.14) and have configured CiviContribute to accept recurring transactions for our
payment processor PayJunction (http://wiki.civicrm.org/confluence/display/CRMDOC/PayJunction+Configuration).

  I had 2 queries regarding changing recurring contribution details.

1 -  Now when one creates a contribution page using Payjunction payment processor and a
      user makes a recurring contribution on the Thank You page it shows the following text -

"You can modify or cancel future contributions at any time by logging in to your account. You will
receive an email receipt for each recurring contribution. The receipts will also include a link you
can use if you decide to modify or cancel your future contributions. "

The "logging in to your account" links to - http://www.example.com/civicrm/contribute/transact?_qf_ThankYou_display=true&qfKey=e75059b99a5ff5804ec402f2cb5f4865
which gives an error message -
"Sorry. A non-recoverable error has occurred.
This contribution has already been submitted. Click here if you want to make another contribution.
Return to home page."

What exactly does "logging in to your account" do ? Is is supposed to take us to our CiviCRM contact ID
and allow us to change the recurring contribution details from our civicrm contact details ?


2. Next question is regarding the Email Receipt that is sent for the recurring contribution.
    It sends an email with the following text
"Transaction #: 5461121
This is a recurring contribution. You can modify or cancel future contributions by logging in to your account at:

===========================================================
Billing Name and Address
==========================================================="

After the "your account at" it shows a blank line. This is generated from
CRM_Contribution_Form_Contribution_Base::cancelSubscriptionURL which checks for payment
processors for Paypal and Authorize.net but in case of Payjunction it returns a null. I also saw the
issue - http://issues.civicrm.org/jira/browse/CRM-2855 and went about changing the code (after
referring to the 2.1.4 files) but i'm a bit confused as to how an end user would be able to change
the recurring contribution details at the payjunction site ? (since they payjunction account details
are with the site owner and not with the end user making a contribution).


Appreciate any clarity on the above 2 points.

Thanks.

Yashesh Bhatia.





Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviCRM 2.0.7 - changing recurring contribution details for Payjunction
January 13, 2009, 06:35:29 am

this is a "my account" type page on the payjunction side. You'll need to fix the pay junction code to implement the     function cancelSubscriptionURL( )

check: CRM/Core/Payment/PayPalImpl.php for a sample implementation

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Re: CiviCRM 2.0.7 - changing recurring contribution details for Payjunction
January 14, 2009, 03:37:38 am
lobo:

 thx for the reply.. i think there's some confusion. the payment by end user is made by a credit card. the payment processor
used by the site owner is Payjunction. So would an end user making a payment using a credit card have a "My Account" page
with Payjunction ? (i think the my account page would be for the site owner but i could be wrong).



thx.

yashesh

p.s. i saw the code for Paypalimpl.php and it seems to be again going to the my account for the site owner i think.
sorry if i sound naive here but the terminology is a bit confusing.
    function cancelSubscriptionURL( ) {
        if ( $this->_paymentProcessor['payment_processor_type'] == 'PayPal_Standard' ) {
            return "{$this->_paymentProcessor['url_site']}cgi-bin/webscr?cmd=_subscr-find&alias=" .
                urlencode( $this->_paymentProcessor['user_name'] );
        } else {
            return null;
        }
    }

Sunil

  • I post frequently
  • ***
  • Posts: 131
  • Karma: 23
  • The community around a product more important than the product itself?
    • CiviCRM
Re: CiviCRM 2.0.7 - changing recurring contribution details for Payjunction
January 14, 2009, 06:44:00 am
When user did the recurring contribution, user is able to change the recurring details
Example
user did the recurring contribution for every day for period up to 5 days
after contribution we provide the link to cancel the next recurring contributions by login to account
since we have URL for PayPal std with valid arguments, so it is provided.
for authorise .net or PayJuntion put it as site url with out any arguments.

Example
        $cancelSubscriptionURL = null;
        if ( $paymentProcessor['payment_processor_type'] == 'PayPal_Standard' ) {
            $cancelSubscriptionURL = "{$paymentProcessor['url_site']}cgi-bin/webscr?cmd=_subscr-find&alias=" .
                urlencode( $paymentProcessor['user_name'] );
        } else if ( $paymentProcessor['payment_processor_type'] == 'AuthNet_AIM' ) {
            if ( $mode == 'test' ) {
                $cancelSubscriptionURL = "https://test.authorize.net";
            } else {
                $cancelSubscriptionURL = "https://authorize.net";
            }
       } else if ( $paymentProcessor['payment_processor_type'] == 'PayJunction' ) {
            if ( $mode == 'test' ) {
                $cancelSubscriptionURL = "https://demo.payjunction.com/";
            } else {
                $cancelSubscriptionURL = "https://payjunction.com/";
            }
        }
        return $cancelSubscriptionURL;

in v2.1 code block for canceled subscription URL moved to respective processor file in CRM/Core/Payment/

Sunil
The community around a product more important than the product itself?

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Re: CiviCRM 2.0.7 - changing recurring contribution details for Payjunction
January 15, 2009, 12:34:02 am
Sunil:

 Thanks for the information. My question is actually going towards a more fundamental query on the workflow.
Consider

1 - We have CiviCRM with Payjunction as the payment processor for all contribution pages
2 - Contribution page 1 is created for recurring contributions.
3 - Drupal user 'user1' makes a recurring donation on Contribution Page 1. The donation is made via a credit card.
4 - The user is however shown a link to change their recurring payment details and it's also sent in the receipt.

In the above case user1 does not have a payjunction account at all since s/he made the payment via a credit card.
In such a case the link should not be present at all. Also the text should not contain "you can change your recurring contributions at"
to. Please contact XYZ at xyz@email.com to make changes in your recurring payments.

This is my reading of the situation of making a payment using a credit card on Payjunction (also it'd apply to any other payment processor i think since
if the user can make a payment using a credit card without signing into payment framework viz paypal, payjunction). Let me know
if i'm missing a point at someplace. Appreciate your feedback.

Thanks.

Yashesh Bhatia.

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Re: CiviCRM 2.0.7 - changing recurring contribution details for Payjunction
January 15, 2009, 03:48:31 am
i was able to change the templates for the case when the payment process PayJunction.
the custom templates are in

$drupal_root/sites/all/modules/civicrm/custom_templates/CRM/Contribute/Form/Contribution

Here are the attached files.

i think this should resolve the issue for an ambiguous message when a donor makes a contribution using a credit card for
payjunction.

feedback much appreciated.

thx.

yashesh

Sunil

  • I post frequently
  • ***
  • Posts: 131
  • Karma: 23
  • The community around a product more important than the product itself?
    • CiviCRM
Re: CiviCRM 2.0.7 - changing recurring contribution details for Payjunction
January 15, 2009, 07:54:28 am
hi
Try applying attached patch using custom templates.
(because it apply to other processor also where users don't have processor user account)
it just check the processor is of recurring type and payment is through civicrm form ( direct and not through IPN like Paypal std )

Sunil
« Last Edit: January 15, 2009, 09:14:46 pm by Kurund Jalmi »
The community around a product more important than the product itself?

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Re: CiviCRM 2.0.7 - changing recurring contribution details for Payjunction
January 15, 2009, 09:21:31 pm
Sunil:

  Thanks. Thats a better patch, it works fine. There's just one bug i think in the ReceiptMessage.tpl

Here's how i've coded it.
Code: [Select]
{if $is_recur}
  {if $paymentDirect}
{ts}This is a recurring contribution. You can modify or cancel future contributions by contacting the site admin.{/ts}
  {else}
{ts}This is a recurring contribution. You can modify or cancel future contributions by logging in to your account at:{/ts}

{$cancelSubscriptionUrl}
  {/if}
{/if}
and in the attached file the code appears to be
Code: [Select]
{if $is_recur and !$paymentDirect}
 {ts}This is a recurring contribution. You can modify or cancel future contributions by logging in to your account at:{/ts}
 
 {$cancelSubscriptionUrl}
{else}
{ts}Please contact XYZ at changedonation@email.com to make changes in your recurring payments.{/ts}
{/if}

The above code would be incorrect if $is_recur is false.

Thanks.

Yashesh

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute »
  • Community Contributed Payment Processors »
  • CiviCRM 2.0.7 - changing recurring contribution details for Payjunction

This forum was archived on 2017-11-26.