<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Ruby cim_trx.get_payment_profile always returns nil for street_address in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ruby-cim-trx-get-payment-profile-always-returns-nil-for-street/m-p/33217#M17743</link>
    <description>&lt;P&gt;Hi Joy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Read my original post again. &amp;nbsp;The transaction is clearly not nil, because I can view the address in the XML:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;puts payment_profile_response.xml.to_xml&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is the&amp;nbsp;&lt;SPAN&gt;payment_profile_response.payment_profile.billing_a&lt;/SPAN&gt;&lt;SPAN&gt;ddress.street_address that is always nil.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Feb 2013 22:28:07 GMT</pubDate>
    <dc:creator>jemminger</dc:creator>
    <dc:date>2013-02-25T22:28:07Z</dc:date>
    <item>
      <title>Ruby cim_trx.get_payment_profile always returns nil for street_address</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ruby-cim-trx-get-payment-profile-always-returns-nil-for-street/m-p/33151#M17681</link>
      <description>&lt;P&gt;suppose I retrieve a payment profile like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; payment_profile_response = cim_trx.get_payment_profile '11243870', '12229069'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The street address is present in the response xml at /getCustomerPaymentProfileResponse/paymentProfile/billTo/address. &amp;nbsp;This is verified by&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; puts payment_profile_response.xml.to_xml&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However if I try to get that street address from the profile, it is always nil:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.9.3p286 :021 &amp;gt; payment_profile_response.payment_profile.billing_address.street_address&lt;BR /&gt;=&amp;gt; nil&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's the problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Feb 2013 00:04:00 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ruby-cim-trx-get-payment-profile-always-returns-nil-for-street/m-p/33151#M17681</guid>
      <dc:creator>jemminger</dc:creator>
      <dc:date>2013-02-23T00:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ruby cim_trx.get_payment_profile always returns nil for street_address</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ruby-cim-trx-get-payment-profile-always-returns-nil-for-street/m-p/33216#M17742</link>
      <description>&lt;P&gt;Hi jemminger ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The most likely problem is the order of execution that you are using. As is noted in the rubydocs for the get_payment_profile method, "&lt;EM&gt;If this transaction has already been run, this method will return nil.&lt;/EM&gt;" You must be sure that you are not trying to read the response after the fact.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Joy&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2013 22:22:34 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ruby-cim-trx-get-payment-profile-always-returns-nil-for-street/m-p/33216#M17742</guid>
      <dc:creator>Joy</dc:creator>
      <dc:date>2013-02-25T22:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Ruby cim_trx.get_payment_profile always returns nil for street_address</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ruby-cim-trx-get-payment-profile-always-returns-nil-for-street/m-p/33217#M17743</link>
      <description>&lt;P&gt;Hi Joy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Read my original post again. &amp;nbsp;The transaction is clearly not nil, because I can view the address in the XML:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;puts payment_profile_response.xml.to_xml&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is the&amp;nbsp;&lt;SPAN&gt;payment_profile_response.payment_profile.billing_a&lt;/SPAN&gt;&lt;SPAN&gt;ddress.street_address that is always nil.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2013 22:28:07 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ruby-cim-trx-get-payment-profile-always-returns-nil-for-street/m-p/33217#M17743</guid>
      <dc:creator>jemminger</dc:creator>
      <dc:date>2013-02-25T22:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Ruby cim_trx.get_payment_profile always returns nil for street_address</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ruby-cim-trx-get-payment-profile-always-returns-nil-for-street/m-p/33220#M17746</link>
      <description>&lt;P&gt;Hi jemminger ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We haven't heard of anyone else having this problem, perhaps someone else on the forums has encountered it and can suggest a solution for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Joy&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2013 23:37:57 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ruby-cim-trx-get-payment-profile-always-returns-nil-for-street/m-p/33220#M17746</guid>
      <dc:creator>Joy</dc:creator>
      <dc:date>2013-02-25T23:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Ruby cim_trx.get_payment_profile always returns nil for street_address</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ruby-cim-trx-get-payment-profile-always-returns-nil-for-street/m-p/33255#M17781</link>
      <description>&lt;P&gt;This is reproducible 100% of the time:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;require 'rubygems'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;require 'authorize-net'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;def transaction&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; AuthorizeNet::CIM::Transaction.new('secret', 'secret', :gateway =&amp;gt; :test)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;end&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;# Create a new Customer&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;profile = AuthorizeNet::CIM::CustomerProfile.new(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; :email =&amp;gt; 'test@example.com',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; :id =&amp;gt; "Account_#{Time.now.to_i}"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;response = transaction.create_profile(profile)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;customer_id = response.profile_id&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;# Create a Payment Profile for the customer&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;credit_card = AuthorizeNet::CreditCard.new('4111111111111111', '0120')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;billing_address = AuthorizeNet::Address.new(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; :first_name =&amp;gt; 'Joe',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; :last_name =&amp;gt; 'Blow',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; :street_address =&amp;gt; '1234 Main St.',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; :city =&amp;gt; 'Here',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; :state =&amp;gt; 'ST',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; :zip =&amp;gt; '90210'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;payment_profile = AuthorizeNet::CIM::PaymentProfile.new(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; :billing_address =&amp;gt; billing_address,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; :payment_method =&amp;gt; credit_card&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;response = transaction.create_payment_profile(payment_profile, customer_id)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;payment_profile_id = response.payment_profile_id&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;# Now let's look that Payment Profile up&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;payment_profile_response = transaction.get_payment_profile payment_profile_id, customer_id&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;xml = payment_profile_response.xml.to_xml&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;street_address = payment_profile_response.payment_profile.billing_address.street_address&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;puts "&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; xml: #{xml}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; street_address: #{street_address.inspect}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;puts "&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Is the street address '1234 Main St' present in the XML? #{xml.include?('1234 Main St')}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Is the street_address property of the billing_address present? #{!street_address.nil?}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2013 16:11:50 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ruby-cim-trx-get-payment-profile-always-returns-nil-for-street/m-p/33255#M17781</guid>
      <dc:creator>jemminger</dc:creator>
      <dc:date>2013-02-27T16:11:50Z</dc:date>
    </item>
  </channel>
</rss>

