- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please help, payment form not billing correctly
Supposed to charge $49 instant then $25/week for 8 weeks. The recurring is working correctly but not charging the initial $49. Can anyone offer me advice on how to correct this? Pretty please?
<?xml version="1.0" encoding="utf-8" ?>
- <ARBCreateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
- <merchantAuthentication>
<name>3W3Jc3Efy2su</name>
<transactionKey>7vz3kX8943ATw7rZ</transactionKey>
</merchantAuthentication>
- <subscription>
<name>2012 Unique Underwriters Conference of Champions</name>
- <paymentSchedule>
- <interval>
<length>7</length>
<unit>days</unit>
</interval>
<startDate>2011-10-04</startDate>
<totalOccurrences>8</totalOccurrences>
<trialOccurrences>1</trialOccurrences>
</paymentSchedule>
<amount>25</amount>
<trialAmount>49</trialAmount>
- <payment>
- <creditCard>
<cardNumber>5555555555555555</cardNumber>
<expirationDate>2013-3</expirationDate>
</creditCard>
</payment>
- <order>
<description>Capture Page Subscription</description>
</order>
- <customer>
<email>test1@yahoo.com</email>
<phoneNumber>555-555-5555</phoneNumber>
</customer>
- <billTo>
<firstName>Test</firstName>
<lastName>test</lastName>
<address>111 Main St</address>
<city>City</city>
<state>FL</state>
<zip>55555</zip>
</billTo>
</subscription>
</ARBCreateSubscriptionRequest>
Thanks!
Judy
judysver@yahoo.com
10-10-2011 11:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The trial amount just changes the amount charged during a specified trial period. It doesn't make ARB charge the first payment immediately. If you want an immediate charge, you'll have to use AIM for that. Personally, I find it easier to integrate CIM with an automated routine to process charges, rather than have to mess with AIM + ARB + callback page.
10-10-2011 01:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have an example of how I can mofify it? I appreciate your help.
10-10-2011 05:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not if you're using XML. I use the PHP API that layers on top, it's much simpler.
10-11-2011 08:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
At this point I will try anything. I am ok if it it one or other but this form needs to do both instant and recurring with different amounts. Can you show me an example of how you are doing. I am pretty good at PHP so I should be able to follow.
10-11-2011 12:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AIM example, may need slight modifications for your needs:
$authorize = new AuthorizeNetAIM( $GLOBALS['_authorize_id'], $GLOBALS['_authorize_key']); $authorize->setSandbox(false); $fields = array( 'first_name' => $_POST['first'], 'last_name' => $_POST['last'], 'company' => $_POST['company'], 'address' => $_POST['address'], 'city' => $_POST['city'], 'state' => $_POST['state'], 'zip' => $_POST['zip'], 'country' => 'US', 'phone' => $_POST['phone'], 'email' => $_POST['email'], 'customer_ip' => $_SERVER['REMOTE_ADDR'], 'description' => "{$_POST['type']} initial fee for " . count($_POST['zips']) . " zip codes with {$population} total estimated population", 'amount' => $_POST['initial_payment'], 'card_num' => $_POST['card_number'], 'exp_date' => sprintf('%02d%02d', $_POST['card_exp_month'], ($_POST['card_exp_year'] % 1000)), 'card_code' => $_POST['card_ccv'] ); $authorize->setFields($fields); $authorize->setCustomField('payment_type', 'SINGLE'); $result = $authorize->authorizeAndCapture(); if ($result->error || $result->{'response_code'} != 1) $errors[] = "Initial charge declined - {$result->response_reason_text}";
ARB example, also may require some modification:
$authorize = new AuthorizeNetARB( $GLOBALS['_authorize_id'], $GLOBALS['_authorize_key']); $authorize->setSandbox(false); $subscription = new AuthorizeNet_Subscription; $subscription->customerId = $idn; $subscription->billToFirstName = $_POST['first']; $subscription->billToLastName = $_POST['last']; $subscription->billToCompany = $_POST['company']; $subscription->billToAddress = $_POST['address']; $subscription->billToCity = $_POST['city']; $subscription->billToState = $_POST['state']; $subscription->billToZip = $_POST['zip']; $subscription->billToCountry = 'US'; $subscription->customerPhoneNumber = $_POST['phone']; $subscription->customerEmail = $_POST['email']; $subscription->name = "{$_POST['type']} Subscription"; $subscription->orderDescription = 'For ' . count($_POST['zips']) . " zip codes with {$population} total estimated population"; $subscription->amount = $_POST['price']; $subscription->startDate = $_POST['payment_due']; $subscription->intervalLength = '1'; $subscription->intervalUnit = 'months'; $subscription->totalOccurrences = '9999'; $subscription->creditCardCardNumber = $_POST['card_number']; $subscription->creditCardExpirationDate = sprintf('%04d-%02d', $_POST['card_exp_year'], $_POST['card_exp_month']); $subscription->creditCardCardCode = $_POST['card_ccv']; $result = $authorize->createSubscription($subscription); // We want to delay this error until later if ($result->xml->messages->resultCode != 'Ok') $errors[] = "Recurring billing could not be initiated - {$result->xml->messages->message->text}"; else { // Do some success thing }
10-11-2011 08:46 PM