recurring


Create sell for recurring payment on 2checkout


working on recurring payment with 2 checkout, token is generating successfully but while making charge getting error "Unable to process the request" here is code. Can any one help me to sort out issue.
include(APPPATH.'third_party/two_checkout/Twocheckout.php');
if(isset($_POST['token']) && $_POST['token']!="")
{
$token=$_POST['token'];
Twocheckout::privateKey('503CF97F-46DA-4E55-8235-4D006C065624');
Twocheckout::sellerId('901284807');
Twocheckout::sandbox(true); #Uncomment to use Sandbox
try {
$charge = Twocheckout_Charge::auth(array(
"merchantOrderId" => "123",
"token" => $token,
"currency" => 'USD',
/*"total" => '10.00',*/
/*"recurrence" => "1 Month",*/
"billingAddr" => array(
"name" => 'Testing Tester',
"addrLine1" => '123 Test St',
"city" => 'Columbus',
"state" => 'OH',
"zipCode" => '43123',
"country" => 'USA',
"email" => 'testingtester#2co.com',
"phoneNumber" => '555-555-5555'
),
"shippingAddr" => array(
"name" => 'Testing Tester',
"addrLine1" => '123 Test St',
"city" => 'Columbus',
"state" => 'OH',
"zipCode" => '43123',
"country" => 'USA',
"email" => 'testingtester#2co.com',
"phoneNumber" => '555-555-5555'
),
"lineItems" => array(
"type" => "product",
"name" => "Gold",
"quantity" => "1",
"price" => "10.00",
"tangible" => "N",
"productId" => "GLD",
"recurrence" => "1 Month",
"duration" => "1 Year",
"startupFee" => "0"
)
), 'array');
if ($charge['response']['responseCode'] == 'APPROVED') {
echo "Thanks for your Order!";
}
} catch (Twocheckout_Error $e) {
echo $e->getMessage();
}
}
Please follow the following instructions once.
On the top please add the following code:
Twocheckout::sandbox(false);
Twocheckout::verifySSL(false);
Twocheckout::username('username');
Twocheckout::password('pass');
change the lineitems code bellow:
"lineItems" => array(
array(
"type" => 'product',
"price" => "5.00",
"productId" => "123",
"name" => "Test Product",
"quantity" => "1",
"tangible" => "N",
"startupFee" => "1.00",
"recurrence" => "1 Month",
"description" => "This is a test"
)
),
Hope this will work.
Thanks

Related Links

Is it possible to recurring a chained payment? And change the at the recurring the %?
Create sell for recurring payment on 2checkout
what do paypal agreement transaction states mean?
Recurring subsriptions
Rebilling Customers using Cron?
Calculating future revenue projection on recurring payments with various terms

Categories

HOME
c#
asp.net
stata
wifi
arcgis
boxplot
opengl-es
thermal-printer
opacity
doctrine2
yacc
ionic-native
segmentation-fault
select2
mongoimport
chef-recipe
mbed
dompdf
views
custom-component
javaagents
opengraph
fastboot
ithit-webdav-server
my.cnf
sasl
inspec
windows-mobile
mongoose-im
multiple-inheritance
drombler-fx
boosting
setup-project
sphinx4
language-detection
jcr
favorites
border-layout
instances
cowboy
idea-plugin
julia-jump
jvisualvm
mtm
servicebus
html-entities
django-tables2
google-cloud-shell
dynamic-linking
seyren
kendo-scheduler
selection-sort
jtextarea
nsalert
chain
spring-cloud-aws
timex
suitesparse
apache-commons-cli
msiexec
alfred
eclipse-mars
init
system-integration
django-taggit
supervised-learning
aws-kms
nd4j
hana-sql-script
ewam
gtkwave
wiql
xml-simple
sicstus-prolog
optimistic-locking
random-access
telerik-appbuilder
visual-studio-setup-proje
lettuce
pthreads-win32
acrofields
netbeans-plugins
svg-android
surfaceview
mosix
symbian3
msbuild-task
reference-manual
bash4
advanceddatagrid
stl-algorithm
copyfile
cherokee
vectorwise
backlight
mismatch
service-layer
nbehave
hp-trim
web-widget
appointment
lts
calendarextender
pixel-bender
ihtmldocument2
jgrowl

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App