<?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 Discover CardType is Null in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Discover-CardType-is-Null/m-p/82400#M51917</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm running into an issue when trying to display the CardType from a creditCardMaskedType for a Discover card in a PaymentProfile. Other card types return properly, but for a Discover card, the CardType field is null. Is this expected behavior for a Discover card? Or is there another way of getting the CardType?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 28 Apr 2022 15:20:31 GMT</pubDate>
    <dc:creator>erikhanson</dc:creator>
    <dc:date>2022-04-28T15:20:31Z</dc:date>
    <item>
      <title>Discover CardType is Null</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Discover-CardType-is-Null/m-p/82400#M51917</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm running into an issue when trying to display the CardType from a creditCardMaskedType for a Discover card in a PaymentProfile. Other card types return properly, but for a Discover card, the CardType field is null. Is this expected behavior for a Discover card? Or is there another way of getting the CardType?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 15:20:31 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Discover-CardType-is-Null/m-p/82400#M51917</guid>
      <dc:creator>erikhanson</dc:creator>
      <dc:date>2022-04-28T15:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Discover CardType is Null</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Discover-CardType-is-Null/m-p/82413#M51925</link>
      <description>&lt;PRE&gt; &lt;SPAN class=""&gt;public&lt;/SPAN&gt; &lt;SPAN class=""&gt;static&lt;/SPAN&gt; &lt;SPAN class=""&gt;void&lt;/SPAN&gt; &lt;SPAN class=""&gt;main&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;SPAN class=""&gt;final&lt;/SPAN&gt; String args[])&lt;/SPAN&gt;
    {
        &lt;SPAN class=""&gt;String&lt;/SPAN&gt; &lt;SPAN class=""&gt;cType&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;null&lt;/SPAN&gt;;

        System.out.println(&lt;SPAN class=""&gt;"Enter a credit card number: "&lt;/SPAN&gt;);
        &lt;SPAN class=""&gt;final&lt;/SPAN&gt; &lt;SPAN class=""&gt;Scanner&lt;/SPAN&gt; &lt;SPAN class=""&gt;input&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;new&lt;/SPAN&gt; &lt;SPAN class=""&gt;Scanner&lt;/SPAN&gt;(System.in);
        &lt;SPAN class=""&gt;final&lt;/SPAN&gt; &lt;SPAN class=""&gt;String&lt;/SPAN&gt; &lt;SPAN class=""&gt;cardNumber&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; input.next();

        &lt;SPAN class=""&gt;if&lt;/SPAN&gt; (cardNumber.startsWith(&lt;SPAN class=""&gt;"4"&lt;/SPAN&gt;))
        {
            cType = &lt;SPAN class=""&gt;"Visa"&lt;/SPAN&gt;;
        }
        &lt;SPAN class=""&gt;else&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; (cardNumber.startsWith(&lt;SPAN class=""&gt;"5"&lt;/SPAN&gt;))
        {
            cType =  &lt;SPAN class=""&gt;"MasterCard"&lt;/SPAN&gt;;
        }
        &lt;SPAN class=""&gt;else&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; (cardNumber.startsWith(&lt;SPAN class=""&gt;"6"&lt;/SPAN&gt;))
        {
            cType =  &lt;SPAN class=""&gt;"Discover"&lt;/SPAN&gt;;
        }
        &lt;SPAN class=""&gt;else&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; (cardNumber.startsWith(&lt;SPAN class=""&gt;"37"&lt;/SPAN&gt;))
        {
            cType =  &lt;SPAN class=""&gt;"American Express"&lt;/SPAN&gt;;
        }
        &lt;SPAN class=""&gt;else&lt;/SPAN&gt;
        {
            cType =  &lt;SPAN class=""&gt;"Unknown type"&lt;/SPAN&gt;;
        }

        &lt;SPAN class=""&gt;final&lt;/SPAN&gt; &lt;SPAN class=""&gt;long&lt;/SPAN&gt; &lt;SPAN class=""&gt;total&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; sumOfEvenPlaces(Long.valueOf(cardNumber)) + (sumOfOddPlaces(Long.valueOf(cardNumber)) * &lt;SPAN class=""&gt;2&lt;/SPAN&gt;);

        &lt;SPAN class=""&gt;if&lt;/SPAN&gt; (isValid(total))
        {
            System.out.println(&lt;SPAN class=""&gt;"The "&lt;/SPAN&gt; + cType + &lt;SPAN class=""&gt;" card number is valid"&lt;/SPAN&gt;);
        }
        &lt;SPAN class=""&gt;else&lt;/SPAN&gt;
        {
            System.out.println(&lt;SPAN class=""&gt;"The "&lt;/SPAN&gt; + cType + &lt;SPAN class=""&gt;" card number is invalid."&lt;/SPAN&gt;);
        }
    }&lt;/PRE&gt;&lt;DIV class=""&gt;&lt;P&gt;On a stylistic note,&lt;SPAN&gt;&amp;nbsp;Ctype&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;should start with a lower case letter (e.g.&lt;SPAN&gt;&amp;nbsp;CType&lt;/SPAN&gt;). You'll have to experiment with the use of&lt;SPAN&gt;&amp;nbsp;Scanner&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as well as I&lt;A href="https://myyapk.com/" target="_self"&gt;'&lt;/A&gt;m not sure my implementation will do what you're looking for.&lt;/P&gt;&lt;P&gt;Let me know if this doesn't work.&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 30 Apr 2022 00:34:22 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Discover-CardType-is-Null/m-p/82413#M51925</guid>
      <dc:creator>mikey445</dc:creator>
      <dc:date>2022-04-30T00:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Discover CardType is Null</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Discover-CardType-is-Null/m-p/83584#M52720</link>
      <description>&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;The issue is&amp;nbsp;CreditCardWidget&amp;nbsp;has a required parameter&amp;nbsp;onCreditCardWidgetChange&amp;nbsp;which expects a function, it's missing in your code. You should change your code to pass that:&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;CreditCardWidget(
   cardNumber: card['cardNumber'],
   expiryDate: card['expiryDate'],
   cardHolderName: card['cardHolderName'],
   cvvCode: card['cvvCode'],
   showBackView: false,
   onCreditCardWidgetChange: (brand) {
      print(brand);
   },
),&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 30 Jul 2022 18:58:27 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Discover-CardType-is-Null/m-p/83584#M52720</guid>
      <dc:creator>jimmyy</dc:creator>
      <dc:date>2022-07-30T18:58:27Z</dc:date>
    </item>
  </channel>
</rss>

