Closed (works as designed)
Project:
Pay
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2011 at 11:38 UTC
Updated:
17 Jun 2011 at 16:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
paul.dambra commentedSo when you add a payment method it shows in the list with a blank label.
Clicking edit on that added method displays a form without saved values.
Filling in and saving that form duplicates the entry (although I didn't enter identical values so...)
Comment #2
paul.dambra commented$values as passed to save in pay.inc =>
... (Array, 19 elements)
pay_method_gateway_sagepay_direct (Array, 13 elements)
op (String, 11 characters ) Save values
submit (String, 11 characters ) Save values
form_build_id (String, 37 characters ) form-b86f272f149c0ec2b2ba392a2eaa1a2e
form_token (String, 32 characters ) a39c557af29dd1c533ba840b5e22537b
form_id (String, 21 characters ) pay_admin_method_form | (Callback) pay_admin_method_form();
title (String, 4 characters ) test
description (String, 4 characters ) test
min_amount (String, 0 characters )
max_amount (String, 0 characters )
pay_form_action (String, 8 characters ) complete
permissions (Array, 1 element)
payment_types (Array, 9 elements)
gateway_testmode (Integer) 1
sagepay_vendorname (String, 4 characters ) test
sagepay_vendor_tx_code_prefix (String, 4 characters ) test
sagepay_system (String, 10 characters ) SIMULATION
sagepay_currency (String, 3 characters ) GBP
sagepay_tx_type (String, 7 characters ) PAYMENT
Krumo version 0.2a | http://krumo.sourceforge.net Called from C:\Programming\drupal-6.22\sites\all\modules\contrib\pay\includes\handlers\pay.inc, line 268
Comment #3
paul.dambra commentedyou can see here title and description aren't carried in via __construct($values)
after running __construct($vales) =>
... (Object) pay_method_gateway_sagepay_direct
SagePayRequest (Object) SagePayVspDirectPost
payment_types (Array, 0 elements)
gateway_testmode (Boolean) TRUE
gateway_supports_ach (Boolean) FALSE
gateway_supports_cc (Boolean) TRUE
gateway_supports_recurring (Boolean) FALSE
payment_type (NULL)
cc_type (NULL)
cc_number (NULL)
cc_ccv2 (NULL)
cc_exp_month (NULL)
cc_exp_year (NULL)
cc_issue_number (NULL)
pmid (NULL)
title (NULL)
description (NULL)
min_amount (NULL)
max_amount (NULL)
pay_form_action (String, 8 characters ) complete
total (NULL)
status (Integer) 1
first_name (NULL)
last_name (NULL)
mail (NULL)
billto (Array, 0 elements)
table (String, 10 characters ) pay_method
key (String, 4 characters ) pmid
permissions (Array, 1 element)
handler (String, 33 characters ) pay_method_gateway_sagepay_direct
form_values (Array, 19 elements)
Krumo version 0.2a | http://krumo.sourceforge.net Called from C:\Programming\drupal-6.22\sites\all\modules\contrib\pay\includes\handlers\pay.inc, line 270
Comment #4
paul.dambra commentedThis is because there are no set_title and set_description methods.
Comment #5
paul.dambra commentedAm relatively new to OO php but the call to $this->__construct($values) in function save was confusing me as it didn't seem to populate the values. As a result I've added set_values method that is called from the constructor and from the save method.
This now saves the title and description to the database.
the admin page doesn't display them but I'll look at that next.
I've attached my patch for the pay.inc file
Comment #6
paul.dambra commentedand now I've followed it all the way through it was my module at fault... apologies and facepalm