Closed GytisTo closed 5 years ago
@kojoru I can also simulate this error
is there is any progress?
can I get any response about that issue? cause now I even don't know are you trying to fix the issue or just leave like that.
Hello, can i get any response of this issue ? @kojoru this is very important
@basst85 or @GytisTo could you please provide a better stack trace of the error?
@kojoru you mean self error or how i get error?
@OGKevin I think you have enough information now, or do you need more? 🙂
@kojoru you mean self error or how i get error? I take it you are talking to me? I'm not @kojoru :)
I meant the error. What you have posted is enough for me to have a look at this to see what is the issue.
@OGKevin I think you have enough information now, or do you need more? 🙂 for now i have enough yes :D
Right, so it seems that the actual response is not matching what is defined on doc.bunq.com.
Could you please compare the actual response with what is described at https://doc.bunq.com/#/schedule-payment/Update_SchedulePayment_for_User_MonetaryAccount.
Once we have an example of the actual response i can show you what you can change to the code for it to work for you until @kojoru can properly fix this internally and regenerate the SDK.
I have not seen much activity from him on github, so i would suggest you to open a topic on together and spam it with gifs.
Sorry im not used to use posts, get's like that. it should be something like that ? `url: https://public-api.sandbox.bunq.com/v1/user/{userID}/monetary-account/{monetary-accountID}/schedule-payment/{itemId}
and raw body: curl https://public-api.sandbox.bunq.com/v1/sandbox-user -X POST \ --header "Content-Type: application/json" \ --header "Cache-Control: none" \ --header "User-Agent: curl-request" \ --header "X-Bunq-Client-Request-Id: $(date)randomId" \ --header "X-Bunq-Language: nl_NL" \ --header "X-Bunq-Region: nl_NL" \ --header "X-Bunq-Geolocation: 0 0 0 0 000" ` for all that im using postman @OGKevin
@OGKevin The actual response JSON: https://pastebin.com/jNbs9ELS
@OGKevin The actual response JSON: https://pastebin.com/jNbs9ELS
thanks for help :)
@OGKevin The actual response JSON: https://pastebin.com/jNbs9ELS
if that's the response of a PUT
Then you can just replace
with
Basically the response is the same as the GET response.
However, seeing the data this is from sandbox. It can be that sandbox is outdated compared to production as we have seen before.
@OGKevin still not working :/
@OGKevin still not working :/
As the error says, you must change the return type :).
ah.. looks like it works now, thanks :) @OGKevin
Steps to reproduce:
What should happen:
1.Payment should be updated and return as a success
What happens:
1.Payment updates but return as a fail.
SDK version and environment
Extra info:
`$monetaryAccountId = $monetaryAccount->getId(); $transaction_id = $dataForTransaction['transaction_id'];
$counterpartyAlias_user = new Pointer('IBAN', $payment->userIban ,$payment->userRecipient); $schedule = new Schedule($payment->endTime, 'ONCE', 1); $amount_user = new Amount($payment->userAmount, 'EUR'); $description = $transaction_id; $schedulePayment_user = new SchedulePaymentEntry($amount_user, $counterpartyAlias_user, $description);
$user_update_id = SchedulePayment::update($payment->userPaymentId, $monetaryAccountId, $schedulePayment_user, $schedule);`
Error shown:
Message: Undefined index: Id
Filename: Core/BunqModel.php
An uncaught Exception was encountered Type: Error
Message: Call to a member function getId() on null