hi,
I'm using something similar as in the activemerchant book from
peepcode where I've got:
http://pastie.org/491800
class Transaction
...
def cim_charge(amount, payment_detail, options = {})
process('charge_cim', amount) do |gw|
gw.create_customer_profile_transaction(
:transaction => {
:customer_profile_id => payment_detail.profile_id,
:customer_payment_profile_id =>
payment_detail.payment_profile_id,
:type => :auth_capture,
:amount => amount
}
)
end
end
private
def process(action, amount = nil)
self.amount = amount
self.action = action
gateway = Gateway.get vendor_id
begin
response = yield gateway
self.success = response.success?
self.reference = response.authorization
self.message = response.message
self.params = response.params
self.test = response.test?
rescue ActiveMerchant::ActiveMerchantError => e
self.success = false
self.reference = nil
self.message = e.message
self.params = {}
self.test = gateway.test?
end
if not self.save
raise self.error_str
end
self
end
end
The transaction.message I get at the end is this:
"The 'AnetApi/xml/v1/schema/
AnetApiSchema.xsd:customerPaymentProfileId' element is invalid - The
value '' is invalid according to its datatype 'AnetApi/xml/v1/schema/
AnetApiSchema.xsd:numericString' - The Pattern constraint failed."
What does that mean in this context?