Comments (5)
Hi @proper-systems,
first you need to generate a base64 encoded transaction envelope xdr to be sent to the third party:
$base64XdrString = $transaction->toEnvelopeXdrBase64();
next, when you receive the signed transaction from the third party (as base 64 encoded transaction envelope xdr), you need to convert it back to a transaction object and then send it to the network via the sdk:
$transaction = Transaction::fromEnvelopeBase64XdrString($base64XdrString);
$response = $sdk->submitTransaction($transaction);
Hope this helps
from stellar-php-sdk.
Here is how transaction looks and I get an error
I get an error that it needs to be signed
`// First create the sender key pair from the secret seed of the sender so we can use it later for signing.
$senderKeyPair = "SENDER";
// Next, we need the account id of the receiver so that we can use to as a destination of our payment.
$destination = "DEST";
// Load sender's account data from the stellar network. It contains the current sequence number.
$sender = $sdk->requestAccount("SENDER");
// Build the transaction to send 100 XLM native payment from sender to destination
$paymentOperation1 = (new PaymentOperationBuilder($destination, Asset::native(), "1.00"))->build();
$transaction = (new TransactionBuilder($sender))->addOperation($paymentOperation1)->addMemo(Memo::text("testing"))->build();
$envelope = $transaction->toEnvelopeXdrBase64();`
from stellar-php-sdk.
Hello @proper-systems,
can you pls. check if you are using the latest version? I think that the described issue has been fixed in the last release:
https://github.com/Soneso/stellar-php-sdk/releases/tag/0.7.2
from stellar-php-sdk.
You are right, it was a version issue.
Thank you
from stellar-php-sdk.
yw
from stellar-php-sdk.
Related Issues (20)
- Set home domain HOT 1
- Not able to hide errors HOT 5
- Bug in SetOptionsOperation HOT 5
- A bug in XdrDecoder HOT 1
- txRep HOT 2
- WebAuth Issue HOT 1
- Bip39.php does not comply with psr-4 autoloading standard. Skipping.
- Error from $sdk->submitTransaction($transaction); is propagating to api response()
- SorobanServer Class parameter error on function getNonce HOT 2
- Could not unmarshall transaction HOT 7
- Bug - Payment Error Handling HOT 1
- transactionEnvelopeXdrBase64FromTxRep
- guzzle errors are not handled and dump out to user on plain white screen/web page HOT 3
- Package [phpseclib/phpseclib] is not locked at minimum working release 3.0.* HOT 1
- Support for Protocol 20: Soroban HOT 1
- is a signature necessary for transaction->toEnvelopeXdrBase64(); HOT 2
- Call to a member function getAccountId() on null HOT 1
- A few bugs HOT 1
- Get Asset Images HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stellar-php-sdk.