-
Notifications
You must be signed in to change notification settings - Fork 54
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
Simple way to create a iDeal request? #103
Comments
Hey @Qarizma, Have you looked at the examples ? I think this is what you are looking for: https://github.com/bunq/sdk_php/blob/develop/example/request_example.php |
Okay that got me goig. Few questions:
I'm using the exact same code as the example you pointed out. Thanks! |
RequestInquiry::get returns: https://github.com/bunq/sdk_php/blob/39fd6bf95f858383caad13dc4e3ae03177f09b4b/src/Model/Generated/Endpoint/BunqResponseRequestInquiryList.php You can find this out by reading the code and or doc blocks above the methods you are using. There are plans to make SDK documentation better! But for now, please read the code and or doc blocks that are written. How do do you mean FIELD_REDIRECT_URL is not working ? What have you done/tried exactly ? And no, sandbox links indeed dont work, they are dummy links. The ones on production do work! |
@OGKevin thanks! Do you have a code example for me how to get those results into an array? About 2, I want to redirect users to a specific page after the payment. So I guessed and added FIELD_REDIRECT_URL to:
Not sure if that's correct? The response Thanks again, I think I almost know how to get this working. |
@Qarizma I don't understand, what do you want to get into an array ? And i'm not quite sure if this is really SDK related 😅. Regarding the This wont stop the redirect url from working however. If you open the bunq sandbox app and pay the request you will still get redirected to the url 👍. So in other words, the redirect url is set correctly, we just dont return it in the response while it should. |
Okay great! Well maybe it’s not fully related to the SDK, probably my PHP skills. I’m used to get API responses in JSON and decode them into an array so I can access values easier. How am I doing that with this object that is returned? Let’s say I want to save the bunq payment link in the variable $link. I already tried casting the object to an array, but that isn’t really nice I think. Thanks for your help! |
I don't understand, why would you want to cast the object to an array ? The object is populated with data and you can get the data via accessors ?
By reading the doc blocks above the methods you can see what is being returned. If you still want to make it an array, which I don't really understand why you would want to do that just to access the data, you can use this method: sdk_php/src/Model/Core/BunqModel.php Line 359 in 39fd6bf
Im closing this issue as its not an bug, feel free to comment afterwards. |
The first time that I saw the bunq PHP SDK, I was quite shocked. It looked very hard to work with and I was wondering why there are so many functions, is that really needed? Why not start with the basic things? Anyway let's proceed.
Case: I want to create an iDeal request using the API.
How am I supposed to do this? I have read the docs and still didn't got any further.
I was expecting something like this:
POST /api/ideal-request/ Params(description, amount, redirecturl, account) Results{"STATUS","REQUESTID", "PAYMENTURL"}
GET /api/ideal-request-status/$requestid Results{"ALL INFO ABOUT THE REQUEST"}
In the end, I want to be able to call a function like this:
getiDealRequest($description, $amount, $redirect);
That would return the payment URL.
Maybe someone could help me in the right direction?
The text was updated successfully, but these errors were encountered: