Skip to content

Commit 476b14f

Browse files
committedFeb 25, 2012
Restore ability to edit ITransact and Ogone payment drivers. Ensure that all forms use CSRF tokens.
1 parent 02bb3a9 commit 476b14f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎lib/WebGUI/Shop/PayDriver.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ sub getEditForm {
372372

373373
my $form = WebGUI::FormBuilder->new($self->session);
374374
$form->addField( "submit", name => "send" );
375+
$form->addField( 'csrfToken', name => 'csrfToken' );
375376

376377
$self->getDoFormTags('editSave', $form);
377378
$form->addField( "hidden",
@@ -657,7 +658,6 @@ sub www_edit {
657658
return $session->privilege->insufficient() unless $session->user->isAdmin;
658659

659660
my $form = $self->getEditForm;
660-
$form->addField( 'csrfToken', name => 'csrfToken' );
661661
$form->addField( "submit", name => "send" );
662662

663663
return '<h1>' . $i18n->get('payment methods') . '</h1>' . $form->toHtml;

‎lib/WebGUI/Shop/PayDriver/ITransact.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ sub www_edit {
577577
return $session->privilege->insufficient() unless $admin->canManage;
578578

579579
my $form = $self->getEditForm;
580-
$form->submit;
580+
$form->addField( "submit", name => "send" );
581581

582582
##Form to let the user log into their ITransact account from here.
583583
my $terminal = WebGUI::HTMLForm->new($session, action=>"https://secure.paymentclearing.com/cgi-bin/rc/sess.cgi", extras=>'target="_blank"');
@@ -596,7 +596,7 @@ sub www_edit {
596596
.'<b>https://'.$session->config->get("sitename")->[0]
597597
.'/?shop=pay;method=do;do=processRecurringTransactionPostback;paymentGatewayId='.$self->getId.'</b>';
598598

599-
return $admin->getAdminConsole->render($form->print.$output, $i18n->get('payment methods','PayDriver'));
599+
return $admin->getAdminConsole->render($form->toHtml.$output, $i18n->get('payment methods','PayDriver'));
600600
}
601601

602602
#-------------------------------------------------------------------

‎lib/WebGUI/Shop/PayDriver/Ogone.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ sub www_edit {
424424
my $output = '<br />';
425425
$output .= sprintf $i18n->get('ogone setup'), $processUrl, $processUrl;
426426

427-
return $admin->getAdminConsole->render($form->print.$output, $i18n->get('payment methods','PayDriver'));
427+
return $admin->getAdminConsole->render($form->toHtml.$output, $i18n->get('payment methods','PayDriver'));
428428
}
429429

430430
#-------------------------------------------------------------------

0 commit comments

Comments
 (0)
Please sign in to comment.