-
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
Bad schedule payment update response(sdk_php) #173
Comments
@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 |
@kojoru you mean self error or how i get error? |
@OGKevin I think you have enough information now, or do you need more? 🙂 |
|
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 ? and raw body: |
@OGKevin The actual response JSON: https://pastebin.com/jNbs9ELS |
thanks for help :) |
if that's the response of a PUT Then you can just replace sdk_php/src/Model/Generated/Endpoint/SchedulePayment.php Lines 220 to 222 in e9511e1
with sdk_php/src/Model/Generated/Endpoint/SchedulePayment.php Lines 155 to 157 in e9511e1
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 :/ |
As the error says, you must change the return type :). change
with
|
ah.. looks like it works now, thanks :) @OGKevin |
Steps to reproduce:
2.Try to update schedule payment
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
The text was updated successfully, but these errors were encountered: