Header info of Credit Card Submission

Hi, im adding Credit Card to contact using https://xxx.infusionsoft.com/app/creditCardSubmission/addCreditCard everything is working, just need info regarding Header details, following is the data im receiving:

HTTP/1.1 302 Found
Cache-Control: no-cache, no-store
Content-Language: en-US
Date: Sun, 25 Jun 2017 20:44:14 GMT
Expires: Sun, 25 Jun 2017 20:44:15 GMT
Location: https://DOMAIN.com/sucess.php?expirationMonth=01&expirationYear=2018
Pragma: no-cache
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=ABC; Path=/; Secure; HttpOnly
Set-Cookie: XYZ=; path=/; Httponly; Secure
Vary: Accept-Encoding
X-FRAME-OPTIONS: SAMEORIGIN
Content-Length: 0

Header HTTP code is 302 redirecting to success URL, this also redirects to success URL when credit card expiry date is less than current date (expired card), i think this should redirect to error url?

i have implemented CC validation method and it works, i wanna know when will IS redirects to error URL?

Thanks

IS won’t redirect to error url from an api call. You are given that code so that you can handle it.

1 Like

Error code in HTTP header? where it will appear? in Redirect URL query?

your http code, 302, is your side, not IS’s side. IS doesn’t send that code. Your server is telling you it doesn’t have enough information to know what to do,…essentially

1 Like

ok got it. another issue with ship-able products, the fulfilment column shows N/A in IS
https://www.screencast.com/t/qDlerwFLW1pc

In

$app->addOrderItem()

I’ve tried following Item Types: FINANCECHARGE = 6; PRODUCT = 4; SERVICE = 3; SHIPPING = 1; SPECIAL = 7; TAX = 2; UNKNOWN = 0; UPSELL = 5

On the Job table, there is an OrderStatus field that must equal one of the following:

STATUS_INFULFILLMENT = 0 (Customer has paid some or all of the money)
STATUS_PENDINGPAYMENT = 1 (The customer has not paid yet.)

in order to affect that field

2 Likes

wow you are amazing! thanks

sorry just tested and OrderStatus returned 0 and the issue persists?

I have tons of clients it’s still working for.

example

$app->blankOrder($con[0][‘Id’],‘EKMOrder# :’.$order[0],EKMDateTime($order[3]),0,0);

My first suspicion would be your date. it must follow one of two formats. I use temporal, ie 20170101T00:00:10

You really need to just hard code an example and take all the variables out of the picture. Lookup a valid contact id and call the method:

$app->blankOrder(1234, ‘test order title’, ‘20170101T00:00:00’,0,0); where 1234 would be a contact id that is valid in the app you are using. We can’t test all your code for you. You need to echo values to the screen and start at a place that’s simple instead of plugging in all the variables hoping everything collectively is right… get a hard coded, no variables use example working first and then build on that.

im using this exact code:

$ordId = $app->blankOrder($contactId,"New Order for ".$prdctname,date(‘Ymd\TH:i:s’),0,0);
var_dump($ordId);

That is not what I suggested.

copy and past the following and ONLY replace the id with a hard coded id from your app

$app->blankOrder([put the actual id number here, not a variable],‘test order’,‘20170101T00:00:00’,0,0);

then you have to lookup the invoice id so you can add an item to the order with addOrderItem

you need to see something working without variables first so stop using variable until you have a working model to go off of