<?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 How to submit refund using customerProfileId and customerPaymentPaymentProfileId? in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-submit-refund-using-customerProfileId-and/m-p/63930#M37943</link>
    <description>&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to submit a refund using customerProfileId and customerPaymentProfileId per this documentation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also issue an unlinked refund for a customer profile transaction. In this case, the following rules apply:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You must be enrolled in Expanded Credit Capabilities (ECC). For more information about ECC, go to &lt;A href="http://www.authorize.net/content/dam/authorize/documents/ecc.pdf" target="_blank"&gt;http://www.authorize.net/content/dam/authorize/documents/ecc.pdf&lt;/A&gt;.&lt;/LI&gt;&lt;LI&gt;You must include customerProfileId and customerPaymentProfileId.&lt;/LI&gt;&lt;LI&gt;customerShippingAddressId is optional.&lt;/LI&gt;&lt;LI&gt;Do not include transId, creditCardNumberMasked, bankRoutingNumberMasked, or bankAccountNumberMasked.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Note: A refund transaction will not appear in the history of the payment profile unless you generate the refund with the payment profile.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I can't find any php source code reference to complete this transaction and I've been unsuccessful at getting anything other than this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Transaction Failed&lt;BR /&gt;Error code : 33&lt;BR /&gt;Error message : Credit card number is required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a snippet of the code I'm using so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;// Create the payment data for a credit card&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$creditCard = &lt;SPAN&gt;new&lt;/SPAN&gt; AnetAPI\CreditCardType();&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$creditCard-&amp;gt;setCardNumber(&lt;SPAN&gt;"0015"&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$creditCard-&amp;gt;setExpirationDate(&lt;SPAN&gt;"XXXX"&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$paymentOne = &lt;SPAN&gt;new&lt;/SPAN&gt; AnetAPI\PaymentType();&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$paymentOne-&amp;gt;setCreditCard($creditCard);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;//create a transaction&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; //testing purposes only&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$customerProfileId = &lt;SPAN&gt;"XXXXXXXXXX"&lt;/SPAN&gt;; &amp;nbsp;// X's have replaced actual values for display here.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$customerPaymentProfileId = &lt;SPAN&gt;"XXXXXXXXXX"&lt;/SPAN&gt;; &amp;nbsp;&lt;SPAN&gt;// X's have replaced actual values for display here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; //end test credentials&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest = &lt;SPAN&gt;new&lt;/SPAN&gt; AnetAPI\TransactionRequestType();&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest-&amp;gt;setTransactionType( &lt;SPAN&gt;"refundTransaction"&lt;/SPAN&gt;);&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest-&amp;gt;setAmount($amount);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;//$transactionRequest-&amp;gt;setPayment($paymentOne);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;//$transactionRequest-&amp;gt;setRefTransId($refTransId);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest-&amp;gt;customerProfileId = $customerProfileId;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest-&amp;gt;customerPaymentProfileId = $customerPaymentProfileId;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$request = &lt;SPAN&gt;new&lt;/SPAN&gt; AnetAPI\CreateTransactionRequest();&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$request-&amp;gt;setMerchantAuthentication($merchantAuthentication);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$request-&amp;gt;setRefId($refId);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$request-&amp;gt;setTransactionRequest( $transactionRequest);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$controller = &lt;SPAN&gt;new&lt;/SPAN&gt; AnetController\CreateTransactionController($request);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any assistance in this matter,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
    <pubDate>Sat, 28 Jul 2018 16:40:42 GMT</pubDate>
    <dc:creator>SilkySully</dc:creator>
    <dc:date>2018-07-28T16:40:42Z</dc:date>
    <item>
      <title>How to submit refund using customerProfileId and customerPaymentPaymentProfileId?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-submit-refund-using-customerProfileId-and/m-p/63930#M37943</link>
      <description>&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to submit a refund using customerProfileId and customerPaymentProfileId per this documentation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also issue an unlinked refund for a customer profile transaction. In this case, the following rules apply:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You must be enrolled in Expanded Credit Capabilities (ECC). For more information about ECC, go to &lt;A href="http://www.authorize.net/content/dam/authorize/documents/ecc.pdf" target="_blank"&gt;http://www.authorize.net/content/dam/authorize/documents/ecc.pdf&lt;/A&gt;.&lt;/LI&gt;&lt;LI&gt;You must include customerProfileId and customerPaymentProfileId.&lt;/LI&gt;&lt;LI&gt;customerShippingAddressId is optional.&lt;/LI&gt;&lt;LI&gt;Do not include transId, creditCardNumberMasked, bankRoutingNumberMasked, or bankAccountNumberMasked.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Note: A refund transaction will not appear in the history of the payment profile unless you generate the refund with the payment profile.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I can't find any php source code reference to complete this transaction and I've been unsuccessful at getting anything other than this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Transaction Failed&lt;BR /&gt;Error code : 33&lt;BR /&gt;Error message : Credit card number is required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a snippet of the code I'm using so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;// Create the payment data for a credit card&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$creditCard = &lt;SPAN&gt;new&lt;/SPAN&gt; AnetAPI\CreditCardType();&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$creditCard-&amp;gt;setCardNumber(&lt;SPAN&gt;"0015"&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$creditCard-&amp;gt;setExpirationDate(&lt;SPAN&gt;"XXXX"&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$paymentOne = &lt;SPAN&gt;new&lt;/SPAN&gt; AnetAPI\PaymentType();&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$paymentOne-&amp;gt;setCreditCard($creditCard);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;//create a transaction&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; //testing purposes only&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$customerProfileId = &lt;SPAN&gt;"XXXXXXXXXX"&lt;/SPAN&gt;; &amp;nbsp;// X's have replaced actual values for display here.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$customerPaymentProfileId = &lt;SPAN&gt;"XXXXXXXXXX"&lt;/SPAN&gt;; &amp;nbsp;&lt;SPAN&gt;// X's have replaced actual values for display here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; //end test credentials&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest = &lt;SPAN&gt;new&lt;/SPAN&gt; AnetAPI\TransactionRequestType();&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest-&amp;gt;setTransactionType( &lt;SPAN&gt;"refundTransaction"&lt;/SPAN&gt;);&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest-&amp;gt;setAmount($amount);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;//$transactionRequest-&amp;gt;setPayment($paymentOne);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;//$transactionRequest-&amp;gt;setRefTransId($refTransId);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest-&amp;gt;customerProfileId = $customerProfileId;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest-&amp;gt;customerPaymentProfileId = $customerPaymentProfileId;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$request = &lt;SPAN&gt;new&lt;/SPAN&gt; AnetAPI\CreateTransactionRequest();&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$request-&amp;gt;setMerchantAuthentication($merchantAuthentication);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$request-&amp;gt;setRefId($refId);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$request-&amp;gt;setTransactionRequest( $transactionRequest);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$controller = &lt;SPAN&gt;new&lt;/SPAN&gt; AnetController\CreateTransactionController($request);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any assistance in this matter,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jul 2018 16:40:42 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-submit-refund-using-customerProfileId-and/m-p/63930#M37943</guid>
      <dc:creator>SilkySully</dc:creator>
      <dc:date>2018-07-28T16:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to submit refund using customerProfileId and customerPaymentPaymentProfileId?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-submit-refund-using-customerProfileId-and/m-p/63931#M37944</link>
      <description>&lt;P&gt;Nevermind... figured it out. &amp;nbsp;I needed to access the profile information in a different way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;// set payment profile for customer&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$paymentProfile = &lt;SPAN&gt;new&lt;/SPAN&gt; AnetAPI\PaymentProfileType();&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$paymentProfile-&amp;gt;setpaymentProfileId( $customerPaymentProfileId );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;// set customer profile&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$customerProfile = &lt;SPAN&gt;new&lt;/SPAN&gt; AnetAPI\CustomerProfilePaymentType();&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$customerProfile-&amp;gt;setCustomerProfileId( $customerProfileId );&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$customerProfile-&amp;gt;setPaymentProfile( $paymentProfile );&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest = &lt;SPAN&gt;new&lt;/SPAN&gt; AnetAPI\TransactionRequestType();&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest-&amp;gt;setTransactionType( &lt;SPAN&gt;"refundTransaction"&lt;/SPAN&gt;);&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest-&amp;gt;setAmount( $amount );&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;$transactionRequest-&amp;gt;setProfile( $customerProfile );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jul 2018 17:13:58 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-submit-refund-using-customerProfileId-and/m-p/63931#M37944</guid>
      <dc:creator>SilkySully</dc:creator>
      <dc:date>2018-07-28T17:13:58Z</dc:date>
    </item>
  </channel>
</rss>

