We get this error when trying to create payment Direct PayIn with card 3d secure. We are implementing the same scenario as in this example https://github.com/Mangopay/mangopay2-php-sdk/blob/master/demos/paymentDirect/payment.php#L20 So initially we have a form that a user fills with his data like card id, ccv and that stuff. Then we use JavaScript SDK to submit this data to the MangoPay server. We also have an ajaxURL set that points to the URL on our server.
# create pay-in CARD DIRECT
payIn = MangoPay::PayIn::Card::Direct.create(CreditedWalletId: current_user.wallet_id,
CardId: card['Id'],
AuthorId: card_registration['UserId'],
Tag: 'deposit',
SecureModeReturnURL: contract_url(@contract),
DebitedFunds: { Amount: (@contract.amount*100).to_i, Currency: 'EUR' },
Fees: { Amount: 0, Currency: 'EUR' },
# payment type as CARD
PaymentDetails: { CardType: card['CardType'], CardId: card['Id'] },
SecureMode: "DEFAULT")
{"Id"=>"17198559",
"Tag"=>"deposit",
"CreationDate"=>1477642519,
"AuthorId"=>"15460637",
"CreditedUserId"=>"15460637",
"DebitedFunds"=>{"Currency"=>"EUR", "Amount"=>30000},
"CreditedFunds"=>{"Currency"=>"EUR", "Amount"=>30000},
"Fees"=>{"Currency"=>"EUR", "Amount"=>0},
"Status"=>"FAILED",
"ResultCode"=>"009199",
"ResultMessage"=>"PSP technical error",
"ExecutionDate"=>nil,
"Type"=>"PAYIN",
"Nature"=>"REGULAR",
"CreditedWalletId"=>"15460638",
"DebitedWalletId"=>nil,
"PaymentType"=>"CARD",
"ExecutionType"=>"DIRECT",
"SecureMode"=>"DEFAULT",
"CardId"=>"17198553",
"SecureModeReturnURL"=>nil,
"SecureModeRedirectURL"=>nil,
"SecureModeNeeded"=>true,
"StatementDescriptor"=>nil}
mangoPay.cardRegistration.sendDataWithAjax(
# URL to capture response
finialize_url,
# Card data
cardData,
# Result Ajax callback
(data) ->
$this.replaceWith('<p>Votre paiement a bien été reçu.</p> </br> <div id="contract_url"><a href="">Voir le contrat</a></div>')
$("#contract_url a").attr("href", contract_url)
#doRedirect = -> window.location.href = data['url']
#setTimeout doRedirect, 2000
(xhr, status, error) ->
location.reload()
# $('body').prepend("<div class='alert alert-warning'>Payment error </div>");