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

Servicecode: sepadirectdebit #14

Open
Daboymarky opened this issue Jan 6, 2016 · 1 comment
Open

Servicecode: sepadirectdebit #14

Daboymarky opened this issue Jan 6, 2016 · 1 comment

Comments

@Daboymarky
Copy link

Hi there,

I'm using your code for a SEPA Direct Debit payment.
Now i'm having a problem. It works almost correctly, but when I do a request with the "Pay" action it's getting to Buckaroo with a statuscode 790 (Pending input: the request has been received, possibly the gateway is waiting for the customer to enter his details.)
So i need the send the customer details with it. There is an action called "ExtraInfo" for sending customer details. But my question is how too send this action together with the "Pay" action?

Here is a part of the code so far:

        // Configuration
        $websiteKey = 'xxx';
        $req = new Buckaroo\Request($websiteKey);
        $req->loadPem(public_path().'/BuckarooPrivateKey.pem');

        // Create the message body (actual request)
        $TransactionRequest = new SOAP\Body();
        $TransactionRequest->Currency = 'EUR';
        $TransactionRequest->AmountDebit = 2.10;
        $TransactionRequest->Invoice = 'DNK_PHP_1';
        $TransactionRequest->Description = 'Example description for this request';
        $TransactionRequest->ReturnURL = 'http://192.168.33.116/';
        $TransactionRequest->StartRecurrent = FALSE;

        // Specify which service / action we are calling
        $TransactionRequest->Services = new SOAP\Services();
        $TransactionRequest->Services->Service = new SOAP\Service('sepadirectdebit', 'Pay', 1);

        // Add parameters for this service
        $TransactionRequest->Services->Service->RequestParameter = new SOAP\RequestParameter('customeraccountname', 'ABNAMRO');
        $TransactionRequest->Services->Service->RequestParameter = new SOAP\RequestParameter('CustomerIBAN', 'NL91ABNA0417164300');
/*
        // Specify which service / action we are calling
        $TransactionRequest->Services->Service = new SOAP\Service('sepadirectdebit', 'ExtraInfo', 1);

        // Add parameters for this service
        $TransactionRequest->Services->Service->RequestParameter = new SOAP\RequestParameter('MandateReference', 'Basis lidmaatschap');
        $TransactionRequest->Services->Service->RequestParameter = new SOAP\RequestParameter('MandateDate', Date('d-m-Y'));
        $TransactionRequest->Services->Service->RequestParameter = new SOAP\RequestParameter('CustomerName', 'Voor Achternaam');
*/
        // Optionally pass the client ip-address for logging
        $TransactionRequest->ClientIP = new SOAP\IPAddress('123.123.123.123');

        dd($TransactionRequest);
        // Send the request to Buckaroo, and retrieve the response
        $response = $req->sendRequest($TransactionRequest, 'transaction');

        // Display the response:
        var_dump($response);
@martijngastkemper
Copy link
Contributor

Use $TransactionRequest->Services->Service[] instead of $TransactionRequest->Services->Service when you add a service to the transaction request.

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