Fake Data Getting Declined

You are here

2 posts / 0 new
Last post
jasoncorum
Fake Data Getting Declined

I'm attempting to use the addFakeData configuration setting to test submitting some payments, but they keep getting declined. Since I'm getting the "Declined" message, I'm assuming that the request is generally corrent and not mal-formed. addFakeData is 'true' and environment is 'cert'.

Are there other configuration settings I have to set up to successfully process a fake transaction?

Here's what I have defined in my initilization (I'm developing in Ruby BTW - hence the erb):

PayJS(['PayJS/UI', 'jquery'],
function($UI, $) {
$UI.Initialize({
clientId: "<%= @payment.client_id %>",
merchantId: "<%= @payment.mid %>",
requestType: "payment",
orderNumber: "<%= @payment.order_number %>",
amount: "<%= @payment.amount %>",
authKey: "<%= @payment.get_auth_key %>", // Calls the get_auth_key method which will generate the auth key
salt: "<%= @payment.get_salt %>", // Calls the get_salt method which will inject the salt used for the auth key
elementId: "paymentDiv",
debug: "true",
preAuth: "<%= @payment.pre_auth %>",
addFakeData: "true",
environment: "<%= @payment.environment %>",
billing: {
name: "<%= @payment.name %>",
address: "<%= @payment.address %>",
city: "<%= @payment.city %>",
state: "<%= @payment.state %>",
postalCode: "<%= @payment.zip %>"
}
});
$UI.setCallback(function(result) { // custom code that will execute when the UI receives a response
console.log(result.getResponse()); // log the result to the console
var wasApproved = result.getTransactionSuccess();
console.log(wasApproved ? "ka-ching!" : "bummer");
});
});

Here's what's in my request:

req = {
"clientId" => @client_id,
"merchantId" => @mid,
"merchantKey" => @mkey,
"requestType" => @request_type,
"orderNumber" => @order_number,
"amount" => @amount,
"salt" => @salt,
"preAuth" => @pre_auth,
"environment" => @environment
}

SDKSupport
Hello Jason,

Hello Jason,

  The following amount ranges will return a "decline" response: $2, $4, $5, and $16 will return an "UNABLE TO PROCESS" error.  All other amounts will return an "approved" response. 

Log in or register to post comments