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
algolia
grizzly
intellij-idea
service
casting
popover
latex
x86-64
spotfire
xss
mingw
wavefront
aws-sdk-cpp
oxid
watson-dialog
tag-cloud
vivado-hls
bug-reporting
ejb-3.1
vala
typedef
gnu-screen
infinite-loop
quality-center
ecmascript-2017
functional-dependencies
mex
paper-trail-gem
tikz
log4net-configuration
luhn
microstrategy
fastadapter
tunnel
wit-ai
asp.net-webhooks
dotnetnuke-module
form-fields
google-chrome-console
socketcluster
django-cors-headers
niagara-ax
runner
react.rb
g77
pyopenssl
openxava
beanshell
runtime-permissions
photoshop-script
lightspeed
distcc
eclipse-mars
joystick
altova
hoare-logic
vitamio
gdi
hotkeys
nsoperationqueue
trendline
firefox-os
skbio
web-performance
random-sample
updating
om
traminer
jsoncpp
callfire
cakephp-2.6
glog
backtrace
apache-pivot
qf-test
parallel-port
scjp
angular-file-upload
xpand
isl
debuggervisualizer
image-preloader
email-headers
acrofields
.net-reflector
xtify
adabas
xrandr
generator-expression
django-tinymce
algol
php-gettext
jquery-ui-map
erlide
socketasynceventargs
jqueryi-ui-buttonset
towerjs
auto-compile
object-tag
onunload
silverlight-2.0
helios
wtsapi32

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