Mangopay / mangopay2-php-sdk

PHP SDK for MANGOPAY
https://packagist.org/packages/mangopay/php-sdk-v2
MIT License
122 stars 133 forks source link

Creating Card DirectPayIn #498

Closed ideiasfrescas closed 3 years ago

ideiasfrescas commented 3 years ago

Hello,

We're having an issue while creating a Card DirectPayIn, in which we're trying to input "FORCE" on $PayIn->ExecutionDetails->SecureMode, to make sure every payment is triggering 3DSecure, but instead the Payment status ends being "SUCCEEDED" instead of "CREATED", ignoring the 3DSecure step. Input below:

{ "CreditedWalletId":"97167292", "PaymentType":"CARD", "PaymentDetails":{ "CardType":null, "CardId":"111377086", "StatementDescriptor":"cmpra jft", "IpAddress":"85.243.220.67", "BrowserInfo":null, "Shipping":{ "FirstName":"Scrooge", "LastName":"McDuck", "Address":{ "AddressLine1":"rua das camelias 5 12", "AddressLine2":null, "City":"faro", "Region":null, "PostalCode":"8888-888", "Country":"PT" }
} }, "ExecutionType":"DIRECT", "ExecutionDetails":{ "SecureMode":"FORCE", "SecureModeReturnURL":"https://somelink.example", "SecureModeRedirectURL":null, "SecureModeNeeded":true, "Billing":{ "FirstName":"Scrooge", "LastName":"McDuck", "Address":{ "AddressLine1":"rua das camelias 5 12", "AddressLine2":null, "City":"faro", "Region":null, "PostalCode":"8888-888", "Country":"PT" }
}, "SecurityInfo":{ "AVSResult":"NO_CHECK" }, "Culture":"EN", "Requested3DSVersion":null, "Applied3DSVersion":null }, "AuthorId":"97167288", "CreditedUserId":"97167288", "DebitedFunds":{ "Currency":"EUR", "Amount":1496 }, "CreditedFunds":{ "Currency":"EUR", "Amount":1496 }, "Fees":{ "Currency":"EUR", "Amount":0 }, "Status":"SUCCEEDED", "ResultCode":"000000", "ResultMessage":"Success", "ExecutionDate":1623855066, "Type":"PAYIN", "Nature":"REGULAR", "DebitedWalletId":null, "Id":"111377089", "Tag":{ "tipo":0, "produtos":[ "271" ], "transportadora":1, "ponto":"8811394+Loja CTT Penha ( Faro )+URBANIZAÇÃO DAS LARANJEIRAS À PENHA+8005-996+Faro+PT" }, "CreationDate":1623855065 }

H4wKs commented 3 years ago

Hi, It's probably related to the test card you choose to test your payin. The Sandbox does not work 100% as a real transaction. You have to choose a card that actually trigger a 3DS step within the available testing payment cards to test this: https://docs.mangopay.com/guide/testing-payments In prod, using 'FORCE' will trigger the 3DS no matter what, but not on Sandbox.

ideiasfrescas commented 3 years ago

I see.

Thank you for your help.

fredericdelordm commented 3 years ago

Hello @H4wKs, thank you for your help.

@ideiasfrescas When you have two minutes, don't hesitate to feel this feedback form regarding our API documentation and our SDK : feedback form