<?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: Accept.js with ARB python in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-with-ARB-python/m-p/59382#M33971</link>
    <description>&lt;P&gt;I've managed to get the subscription working with the accept.js, but the problem I'm having now is that it does not populate the description, the customer id, or the customer's email.&amp;nbsp; Is there something I'm missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;# Create a merchantAuthenticationType object with authentication details&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# retrieved from the constants file&lt;BR /&gt;&lt;/SPAN&gt;merchantAuth = apicontractsv1.merchantAuthenticationType()&lt;BR /&gt;merchantAuth.name = app_config.AUTHORIZE_KEYS[&lt;SPAN&gt;'apiLoginId'&lt;/SPAN&gt;]&lt;BR /&gt;merchantAuth.transactionKey = app_config.AUTHORIZE_KEYS[&lt;SPAN&gt;'transactionKey'&lt;/SPAN&gt;]&lt;BR /&gt;&lt;SPAN&gt;# Set the transaction's refId&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# Create the payment object for a payment nonce&lt;BR /&gt;&lt;/SPAN&gt;opaqueData = apicontractsv1.opaqueDataType()&lt;BR /&gt;opaqueData.dataDescriptor = request.form[&lt;SPAN&gt;'dataDesc'&lt;/SPAN&gt;]&lt;BR /&gt;opaqueData.dataValue = request.form[&lt;SPAN&gt;'dataValue'&lt;/SPAN&gt;]&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Add the payment data to a paymentType object&lt;BR /&gt;&lt;/SPAN&gt;paymentOne = apicontractsv1.paymentType()&lt;BR /&gt;paymentOne.opaqueData = opaqueData&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Create order information&lt;BR /&gt;&lt;/SPAN&gt;order = apicontractsv1.orderType()&lt;BR /&gt;&lt;SPAN&gt;order.invoiceNumber = "10101"&lt;BR /&gt;&lt;/SPAN&gt;order.description = &lt;SPAN&gt;"Your Description"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# Set the customer's identifying information&lt;BR /&gt;&lt;/SPAN&gt;customerData = apicontractsv1.customerDataType()&lt;BR /&gt;customerData.type = &lt;SPAN&gt;"individual"&lt;BR /&gt;&lt;/SPAN&gt;customerData.id = &lt;SPAN&gt;'cool_1231123"&lt;/SPAN&gt;&lt;BR /&gt;customerData.email = &lt;SPAN&gt;email@email.com&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;paymentschedule = apicontractsv1.paymentScheduleType()&lt;BR /&gt;paymentschedule.interval = apicontractsv1.paymentScheduleTypeInterval()  &lt;SPAN&gt;# apicontractsv1.CTD_ANON() #modified by krgupta&lt;BR /&gt;&lt;/SPAN&gt;paymentschedule.interval.length = &lt;SPAN&gt;1&lt;BR /&gt;&lt;/SPAN&gt;paymentschedule.interval.unit = apicontractsv1.ARBSubscriptionUnitEnum.months&lt;BR /&gt;paymentschedule.startDate = datetime.now(pytz.timezone(&lt;SPAN&gt;'US/Mountain'&lt;/SPAN&gt;))&lt;BR /&gt;paymentschedule.totalOccurrences = &lt;SPAN&gt;999&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# Giving the credit card info&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# Setting billing information&lt;BR /&gt;&lt;/SPAN&gt;billto = apicontractsv1.nameAndAddressType()&lt;BR /&gt;billto.firstName = request.form[&lt;SPAN&gt;'first'&lt;/SPAN&gt;]&lt;BR /&gt;billto.lastName = request.form['last&lt;SPAN&gt;'&lt;/SPAN&gt;]&lt;BR /&gt;billto.email = request.form[&lt;SPAN&gt;'email'&lt;/SPAN&gt;]&lt;BR /&gt;&lt;SPAN&gt;# Setting subscription details&lt;BR /&gt;&lt;/SPAN&gt;subscription = apicontractsv1.ARBSubscriptionType()&lt;BR /&gt;subscription.name = &lt;SPAN&gt;"Monthly Subscription"&lt;BR /&gt;&lt;/SPAN&gt;subscription.description = &lt;SPAN&gt;"Monthly"&lt;BR /&gt;&lt;/SPAN&gt;subscription.paymentSchedule = paymentschedule&lt;BR /&gt;subscription.amount = Decimal(request.form[&lt;SPAN&gt;'amount'&lt;/SPAN&gt;])&lt;BR /&gt;subscription.billTo = billto&lt;BR /&gt;subscription.payment = paymentOne&lt;BR /&gt;&lt;SPAN&gt;# Creating the request&lt;BR /&gt;&lt;/SPAN&gt;arbrequest = apicontractsv1.ARBCreateSubscriptionRequest()&lt;BR /&gt;arbrequest.merchantAuthentication = merchantAuth&lt;BR /&gt;arbrequest.subscription = subscription&lt;BR /&gt;&lt;SPAN&gt;# Creating and executing the controller&lt;BR /&gt;&lt;/SPAN&gt;controller = ARBCreateSubscriptionController(arbrequest)&lt;BR /&gt;controller.execute()&lt;BR /&gt;&lt;SPAN&gt;# Getting the response&lt;BR /&gt;&lt;/SPAN&gt;response = controller.getresponse()&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if &lt;/SPAN&gt;response &lt;SPAN&gt;is not None&lt;/SPAN&gt;:&lt;BR /&gt;    &lt;SPAN&gt;# Check to see if the API request was successfully received and acted upon&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;if &lt;/SPAN&gt;(response.messages.resultCode == &lt;SPAN&gt;"Ok"&lt;/SPAN&gt;):&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"SUCCESS:"&lt;/SPAN&gt;)&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"Message Code : %s" &lt;/SPAN&gt;% response.messages.message[&lt;SPAN&gt;0&lt;/SPAN&gt;][&lt;SPAN&gt;'code'&lt;/SPAN&gt;].text)&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"Message text : %s" &lt;/SPAN&gt;% &lt;SPAN&gt;str&lt;/SPAN&gt;(response.messages.message[&lt;SPAN&gt;0&lt;/SPAN&gt;][&lt;SPAN&gt;'text'&lt;/SPAN&gt;].text))&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"Subscription ID : %s" &lt;/SPAN&gt;% response.subscriptionId)&lt;BR /&gt;    &lt;SPAN&gt;else&lt;/SPAN&gt;:&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"ERROR:"&lt;/SPAN&gt;)&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"Message Code : %s" &lt;/SPAN&gt;% response.messages.message[&lt;SPAN&gt;0&lt;/SPAN&gt;][&lt;SPAN&gt;'code'&lt;/SPAN&gt;].text)&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"Message text : %s" &lt;/SPAN&gt;% response.messages.message[&lt;SPAN&gt;0&lt;/SPAN&gt;][&lt;SPAN&gt;'text'&lt;/SPAN&gt;].text)&lt;/PRE&gt;&lt;P&gt;Any help would be greatful&lt;/P&gt;</description>
    <pubDate>Tue, 15 Aug 2017 01:02:44 GMT</pubDate>
    <dc:creator>nadermx</dc:creator>
    <dc:date>2017-08-15T01:02:44Z</dc:date>
    <item>
      <title>Accept.js with ARB python</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-with-ARB-python/m-p/59352#M33944</link>
      <description>&lt;P&gt;I'm trying to create a subscription.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is this &lt;A href="https://github.com/AuthorizeNet/sample-code-python/blob/master/RecurringBilling/create-subscription.py" target="_self"&gt;python gist&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is this does it with the credit card info.&amp;nbsp; I'm trying to use the authorize.net accept.js and pass that to make the subscription.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a sample code of this?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 23:20:48 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-with-ARB-python/m-p/59352#M33944</guid>
      <dc:creator>nadermx</dc:creator>
      <dc:date>2017-08-11T23:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Accept.js with ARB python</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-with-ARB-python/m-p/59382#M33971</link>
      <description>&lt;P&gt;I've managed to get the subscription working with the accept.js, but the problem I'm having now is that it does not populate the description, the customer id, or the customer's email.&amp;nbsp; Is there something I'm missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;# Create a merchantAuthenticationType object with authentication details&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# retrieved from the constants file&lt;BR /&gt;&lt;/SPAN&gt;merchantAuth = apicontractsv1.merchantAuthenticationType()&lt;BR /&gt;merchantAuth.name = app_config.AUTHORIZE_KEYS[&lt;SPAN&gt;'apiLoginId'&lt;/SPAN&gt;]&lt;BR /&gt;merchantAuth.transactionKey = app_config.AUTHORIZE_KEYS[&lt;SPAN&gt;'transactionKey'&lt;/SPAN&gt;]&lt;BR /&gt;&lt;SPAN&gt;# Set the transaction's refId&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# Create the payment object for a payment nonce&lt;BR /&gt;&lt;/SPAN&gt;opaqueData = apicontractsv1.opaqueDataType()&lt;BR /&gt;opaqueData.dataDescriptor = request.form[&lt;SPAN&gt;'dataDesc'&lt;/SPAN&gt;]&lt;BR /&gt;opaqueData.dataValue = request.form[&lt;SPAN&gt;'dataValue'&lt;/SPAN&gt;]&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Add the payment data to a paymentType object&lt;BR /&gt;&lt;/SPAN&gt;paymentOne = apicontractsv1.paymentType()&lt;BR /&gt;paymentOne.opaqueData = opaqueData&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Create order information&lt;BR /&gt;&lt;/SPAN&gt;order = apicontractsv1.orderType()&lt;BR /&gt;&lt;SPAN&gt;order.invoiceNumber = "10101"&lt;BR /&gt;&lt;/SPAN&gt;order.description = &lt;SPAN&gt;"Your Description"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# Set the customer's identifying information&lt;BR /&gt;&lt;/SPAN&gt;customerData = apicontractsv1.customerDataType()&lt;BR /&gt;customerData.type = &lt;SPAN&gt;"individual"&lt;BR /&gt;&lt;/SPAN&gt;customerData.id = &lt;SPAN&gt;'cool_1231123"&lt;/SPAN&gt;&lt;BR /&gt;customerData.email = &lt;SPAN&gt;email@email.com&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;paymentschedule = apicontractsv1.paymentScheduleType()&lt;BR /&gt;paymentschedule.interval = apicontractsv1.paymentScheduleTypeInterval()  &lt;SPAN&gt;# apicontractsv1.CTD_ANON() #modified by krgupta&lt;BR /&gt;&lt;/SPAN&gt;paymentschedule.interval.length = &lt;SPAN&gt;1&lt;BR /&gt;&lt;/SPAN&gt;paymentschedule.interval.unit = apicontractsv1.ARBSubscriptionUnitEnum.months&lt;BR /&gt;paymentschedule.startDate = datetime.now(pytz.timezone(&lt;SPAN&gt;'US/Mountain'&lt;/SPAN&gt;))&lt;BR /&gt;paymentschedule.totalOccurrences = &lt;SPAN&gt;999&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# Giving the credit card info&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# Setting billing information&lt;BR /&gt;&lt;/SPAN&gt;billto = apicontractsv1.nameAndAddressType()&lt;BR /&gt;billto.firstName = request.form[&lt;SPAN&gt;'first'&lt;/SPAN&gt;]&lt;BR /&gt;billto.lastName = request.form['last&lt;SPAN&gt;'&lt;/SPAN&gt;]&lt;BR /&gt;billto.email = request.form[&lt;SPAN&gt;'email'&lt;/SPAN&gt;]&lt;BR /&gt;&lt;SPAN&gt;# Setting subscription details&lt;BR /&gt;&lt;/SPAN&gt;subscription = apicontractsv1.ARBSubscriptionType()&lt;BR /&gt;subscription.name = &lt;SPAN&gt;"Monthly Subscription"&lt;BR /&gt;&lt;/SPAN&gt;subscription.description = &lt;SPAN&gt;"Monthly"&lt;BR /&gt;&lt;/SPAN&gt;subscription.paymentSchedule = paymentschedule&lt;BR /&gt;subscription.amount = Decimal(request.form[&lt;SPAN&gt;'amount'&lt;/SPAN&gt;])&lt;BR /&gt;subscription.billTo = billto&lt;BR /&gt;subscription.payment = paymentOne&lt;BR /&gt;&lt;SPAN&gt;# Creating the request&lt;BR /&gt;&lt;/SPAN&gt;arbrequest = apicontractsv1.ARBCreateSubscriptionRequest()&lt;BR /&gt;arbrequest.merchantAuthentication = merchantAuth&lt;BR /&gt;arbrequest.subscription = subscription&lt;BR /&gt;&lt;SPAN&gt;# Creating and executing the controller&lt;BR /&gt;&lt;/SPAN&gt;controller = ARBCreateSubscriptionController(arbrequest)&lt;BR /&gt;controller.execute()&lt;BR /&gt;&lt;SPAN&gt;# Getting the response&lt;BR /&gt;&lt;/SPAN&gt;response = controller.getresponse()&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if &lt;/SPAN&gt;response &lt;SPAN&gt;is not None&lt;/SPAN&gt;:&lt;BR /&gt;    &lt;SPAN&gt;# Check to see if the API request was successfully received and acted upon&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;if &lt;/SPAN&gt;(response.messages.resultCode == &lt;SPAN&gt;"Ok"&lt;/SPAN&gt;):&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"SUCCESS:"&lt;/SPAN&gt;)&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"Message Code : %s" &lt;/SPAN&gt;% response.messages.message[&lt;SPAN&gt;0&lt;/SPAN&gt;][&lt;SPAN&gt;'code'&lt;/SPAN&gt;].text)&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"Message text : %s" &lt;/SPAN&gt;% &lt;SPAN&gt;str&lt;/SPAN&gt;(response.messages.message[&lt;SPAN&gt;0&lt;/SPAN&gt;][&lt;SPAN&gt;'text'&lt;/SPAN&gt;].text))&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"Subscription ID : %s" &lt;/SPAN&gt;% response.subscriptionId)&lt;BR /&gt;    &lt;SPAN&gt;else&lt;/SPAN&gt;:&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"ERROR:"&lt;/SPAN&gt;)&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"Message Code : %s" &lt;/SPAN&gt;% response.messages.message[&lt;SPAN&gt;0&lt;/SPAN&gt;][&lt;SPAN&gt;'code'&lt;/SPAN&gt;].text)&lt;BR /&gt;        &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"Message text : %s" &lt;/SPAN&gt;% response.messages.message[&lt;SPAN&gt;0&lt;/SPAN&gt;][&lt;SPAN&gt;'text'&lt;/SPAN&gt;].text)&lt;/PRE&gt;&lt;P&gt;Any help would be greatful&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 01:02:44 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-with-ARB-python/m-p/59382#M33971</guid>
      <dc:creator>nadermx</dc:creator>
      <dc:date>2017-08-15T01:02:44Z</dc:date>
    </item>
  </channel>
</rss>

