Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to process the request #32

Open
wiloke opened this issue Sep 3, 2017 · 1 comment
Open

Unable to process the request #32

wiloke opened this issue Sep 3, 2017 · 1 comment

Comments

@wiloke
Copy link

wiloke commented Sep 3, 2017

Hi,
I always get this message if lineItems is enabled Unable to process the request
Here is my code

`
$charge = Twocheckout_Charge::auth(array(

    "merchantOrderId" => "123",
    "token"      => $_POST['token'],
    "currency"   => 'USD',
    // "total"      => '10.00',
    "billingAddr" => array(
        "name" => 'Testing Tester 1',
        "addrLine1" => '123 Test St',
        "city" => 'Columbus',
        "state" => 'OH',
        "zipCode" => '43123',
        "country" => 'USA',
        "email" => '[email protected]',
        "phoneNumber" => '555-555-5555'
    ),
    "lineItems" => array(
		"type" => "product",
		"name" => "Tet",
		"price" => "10.00",
		// "tangible" => "Y",
		"recurrence" => "1 Month",
		"duration" => "1 Week",
		// "quantity" => 1,
		"startupFee" => "1.00",
		// "productId" => "123",
		"description" => "This is a test"
	)
));`

Could you please light me what's wrong with my code?

@arvindkalbhor
Copy link

if you are using lineitems please use this code

$charge = Twocheckout_Charge::auth(array(

    "merchantOrderId" => "123",
    "token"      => $_POST['token'],
    "currency"   => 'USD',
    // "total"      => '10.00',
    "billingAddr" => array(
        "name" => 'Testing Tester 1',
        "addrLine1" => '123 Test St',
        "city" => 'Columbus',
        "state" => 'OH',
        "zipCode" => '43123',
        "country" => 'USA',
        "email" => '[email protected]',
        "phoneNumber" => '555-555-5555'
    ),
    "lineItems" => array(
                    array(
           		"type" => "product",
	        	"name" => "Tet",
		       "price" => "10.00",
		      // "tangible" => "Y",
		      "recurrence" => "1 Month",
		     "duration" => "1 Week",
		     // "quantity" => 1,
		    "startupFee" => "1.00",
		    // "productId" => "123",
		    "description" => "This is a test"
	)
)
));`

use array inside array for lineitems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants